Graph Theory37 sections · 1633 units
Open in Course

Bridge Algorithm Walkthrough

(Step-by-step execution)

Graph: 010-1, 121-2, 020-2, 131-3. Start DFS at 00. Visit 00: disc[0]=0, low[0]=0. Visit 11: disc[1]=1, low[1]=1. Visit 22: disc[2]=2, low[2]=2. Back edge 202-0: low[2]=min(2,0)=0. Backtrack to 11: low[1]=min(1,0)=0.

Visit 33: disc[3]=3, low[3]=3. Backtrack to 11: check low[3]=3 > disc[1]=1, so edge 131-3 is a bridge. Final bridges: {13}\{1-3\}. All other edges are part of the cycle 01200-1-2-0.