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.
- Winter '10
- Computer Science