Mandatory edges

Report a typo

Given below is a connected unweighted graph:

Mandatory edges in a connected unweighted graph

As you know from the theory, a graph may have several spanning trees. However, it turns out that some edges of the graph have to be included in every spanning tree.

Find all such edges and print them to the field below. Your output is expected to be in the following format (each edge on a separate line):

0 1
1 2
2 3

If no such edges exist in the graph above, output no.

Such edges are called bridges or cut-edges. They play an important role in graph theory.
Enter a short text
___

Create a free account to access the full topic