Data Str &amp; Algorithm HW Solutions 69

# Data Str &amp; Algorithm HW Solutions 69 - nected...

This preview shows page 1. Sign up to view the full content.

11 Graphs 11.1 Base Case : A graph with 1 vertex has 1(1 1) / 2=0 edges. Thus, the theorem holds in the base case. Induction Hypothesis : A graph with n vertices has at most n ( n 1) / 2 edges. Induction Step : Add a new vertex to a graph of n vertices. The most edges that can be added is n , by connecting the new vertex to each of the old ver- tices, with the maximum number of edges occurring in the complete graph. Thus, E ( n +1) E ( n )+ n n ( n 1) / 2+ n =( n 2 + n ) / 2= n ( n +1) / 2 . By the principle of Mathematical Induction, the theorem is correct. 11.2 (a) For a graph of n vertices to be connected, clearly at least | V |− 1 edges are required since each edge serves to add one more vertex to the con-
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nected component. No cycles means that no additional edges are given, yielding exactly | V | − 1 edges. (b) Proof by contradiction. If the graph is not connected, then by de f nition there are at least two components. At least one of these components has i vertices with i or more edges (by the pigeonhole principle). Given i − 1 edges to connect the component, the i th edge must then directly connect two of the vertices already connected through the other edges. The result is a cycle. Thus, to avoid a cycle, the graph must be connected. 69...
View Full Document

## This note was uploaded on 12/27/2011 for the course MAP 2302 taught by Professor Bell,d during the Fall '08 term at UNF.

Ask a homework question - tutors are online