Havel - Hakimi 定理

本文介绍Havel Hakimi算法,一种用于确定给定度序列是否能构成简单图的方法。通过实例演示了算法步骤,包括度序列的调整直至验证其图形性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转载自

Coddicted


The Havel Hakimi Algorithm

The Havel Hakimi algorithm gives a systematic approach to answer the question of determining whether it is possible to construct a simple graph from a given degree sequence.
 
Take as input a degree sequence S and determine if that sequence is graphical
That is, can we produce a graph with that degree sequence?
 
Assume the degree sequence is S 
havelhakimi
 

Example 1:

S = 4, 3, 3, 3, 1

Where n = 5 (no. of vertices)

Step 1. Degree of all vertices is less than or equal to n ( no.of vertices)

Step 2. Odd number vertices  are four.

Step 3. There is no degree less than zero.

Step 4. Remove ‘4’ from the sequence and subtract 1 from the remaining new sequence and arrange again in non-increasing order to get

S = 2,2,2,0

Step 5. Again remove ‘2 ‘ from the sequence and subtracting 1 from the remaining new sequence and arrange in non-increasing order we get

S=  1,1,0

Repeating the above step

S= 0,0

Step 6. Since all the deg remaining in the sequence is zero, the given sequence is graphical.

 

Example 2:

Consider the degree sequence: S = 7, 5, 5, 4, 4, 4, 4, 3

Where n = 8 (no. of vertices)

Step 1. Degree of all vertices is less than or equal to n ( no.of vertices)

Step 2. Odd number vertices  are four.

Step 3. There is no degree less than zero.

Step 4. Remove ‘7’ from the sequence and subtract 1 from the remaining new sequence and arrange again in non-increasing order to get

S = 4, 4, 3, 3, 3, 3, 2

Step 5. Now remove the first ‘4 ‘ from the sequence and subtract 1 from the remaining new sequence to get:

S = 3, 2, 2, 2, 3, 2

rearrange in non-increasing order to get:

S = 3, 3, 2, 2, 2, 2

Repeating the above step we get following degree sequences:

S = 2, 2, 2, 1, 1

S = 1, 1, 1, 1

S = 1, 1, 0

S = 0, 0

Step 6. Since all the deg remaining in the sequence is zero, the given sequence is graphical (or in other words, it is possible to construct a simple graph from the given degree sequence).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值