Questions tagged [sink-vertex]

3 questions
10
votes
7 answers

Graphs: find a sink in less than O(|V|) - or show it can't be done

I have a graph with n nodes as an adjacency matrix. Is it possible to detect a sink in less than O(n) time? If yes, how? If no, how do we prove it? Sink vertex is a vertex that has incoming edges from other nodes and no outgoing edges.
flybywire
  • 261,858
  • 191
  • 397
  • 503
5
votes
3 answers

Detecting the sink in a directed acyclic graph

Let's say that there is one vertex with the following property in a DAG: All vertices are connected to it It is not connected to any vertex This is usually called a sink vertex. Is it possible to detect this vertex in O(n), where n is number of…
Rohan Monga
  • 1,759
  • 1
  • 19
  • 31
0
votes
1 answer

Is this total sink algorithm only for dags?

I found this algorithm for digraphs that checks whether a total sink exists in a graph. https://www.geeksforgeeks.org/determine-whether-universal-sink-exists-directed-graph/ My question is : Is this valid for a non - dag digraph? Because if a cycle…
tonythestark
  • 519
  • 4
  • 15