Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 4

Havel Hakimi Algorithm

Introduction
• It is used to check whether a given degree sequence is realizable.
• How to do:
Step 1: We have to arrange the degree sequence in the reverse order.
Step 2: Then, we have to remove the highest degree vertex and
subtract 1 from each vertex in the same order of vertices.
Step 3: Again reverse sort the degrees of remaining vertices and repeat
the previous step until we are able to get tuple of zeros.
Example
• Suppose the degree sequence is
(i) 6 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 2 , 1 , 1

Now, remove the first degree pertaining to first vertex such that we shall get following degree sequence:
(ii) 2 , 2 , 2 , 2 , 1 , 1 , 2 , 2 , 1 , 1
Now, reverse sort the degrees such that we shall get following sequence:
2,2,2,2,2,2,1,1,1,1
Now, remove the first degree of the vertex in the above series such that we shall get the following degree
sequence
(iii) 1 , 1 , 2 , 2 , 2 , 1 , 1 , 1 , 1
Again, reverse sort it and we shall get following sequence
2,2,2,1,1,1,1,1,1
Again, remove the first degree of the vertex in the above series and we shall get the following degree
(iv) 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1
Example (contd.)
• On repeating this whole process, as specified on previous slide, we
shall get
0,0,0,0,0,0,0,0

Since we are able to get a tuple of all zeros, the degree sequence is
graph realizable.

You might also like