Computer scienceAlgorithms and Data StructuresData structuresGraphsGraphs: basics

Nodes, cycles and paths

Cycles

Report a typo

Below is an undirected graph:

The cycles in the graph

What is the number of cycles in the graph that include the nodes 00 and 11? Print all these cycles in the field below. For example, your output may look like this:

0 3 4 1 0
0 5 2 1 0

Take the following restrictions into account:

  • All cycles should be simple.
  • Each cycle should start and end with the node 00.
  • Cycles with reversed order of nodes are the same. For example, 01200-1-2-0 and 02100-2-1-0 are the same cycles.
Enter a short text
___

Create a free account to access the full topic