# answers[1] - 29 j i a has 1 = j i a if there is an edge...

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

1. The claim is FALSE. Proof: Consider two trees: and Both give list of keys “abc” for a postorder traversal. Hence, these two graphs cannot be distinguished by the list of keys “abc” and hence, list of keys does not provide enough information to reconstruct the tree. 2. ( 29 2 1 4 n n - Proof: Let’s define ) ( n T to be the total number of directed graphs having exactly n vertices. There is only 1 graph with 1 vertex. So, 1 ) 1 ( = T Let’s consider a graph with 1 - n vertices and add another vertex to it. This is vertex is necessarily having one of four relationships with all the 1 - n other vertices: “no edges”, “incoming edge”, “outgoing edge”, “two edges”. So, we can add this new vertex in 1 4 - n different ways. Hence, ( 29 ( 29 1 4 1 - - = n n T n T . ( 29 ( 29 ( 29 ( 29 2 1 2 1 4 4 ... 4 4 1 0 n n i n n n i n T - - - = = = - = 3. ( 29 2 n By definition, adjacency matrix
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ( 29 j i a , has 1 , = j i a if there is an edge from vertex i to vertex j or 0 otherwise. By the problem statement, adjacency matrix is all we have, hence, such tasks as determining a number of edges for a particular vertex and determining whether a particular vertex has edges at all require 1-n look ups assuming no prior information is available. In a connected graph, every vertex has at least 1 edge. To prove that the graph is connected, the algorithm has to find that edge. In worst case, the edge(s) will be found by last look ups. Hence, as there are ( 29 2 1-n n elements total to be checked, in worst case it takes ( 29 2 n Ω time to check connectivity using adjacency matrix....
View Full Document

## This note was uploaded on 02/13/2011 for the course CSE 2011 taught by Professor Someone during the Winter '10 term at York University.

Ask a homework question - tutors are online