Question: Most graph algorithms that take an adjacency-matrix representation as input require time (V 2 ), but there are some exceptions. Show how to determine whether

Most graph algorithms that take an adjacency-matrix representation as input require time Ω(V2), but there are some exceptions. Show how to determine whether a directed graph G contains a universal sink-a vertex with in-degree |V| - 1 and out-degree 0-in time O(V), given an adjacency matrix for G.

Step by Step Solution

3.51 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

We start by observing that ifa ij 1 so that I j E then vertex i cannot be a universal sink for it has an outgoing edge Thus if row i contains a 1 then vertex i cannot be a universal sink This observat... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Algorithms Questions!