IBM interview question

Show that there are atleast two nodes with same degree in any graph

Interview Answers

Anonymous

11 May 2009

pigeon hole principle on degree of vertices

1

Anonymous

1 Sept 2009

Let the graph have n vertices. Degree of these vertices could range between 0 and n-1. If this maximum possible range is considered, all n vertices could have different degrees, however it is not possible that a graph could have two nodes one with degree 0 and the other with degree n-1. Hence degrees would have restricted range and then owing to Pigeon hole principle, there must be at least two vertices with the same degree.