Data Structures & AlgorithmsVery hardGATE CS · Advanced

A directed graph on the vertices A–E has the arcs C→B, C→A, B→C, B→E, B→A, D→E, E→B, E→A, A→C, A→B, A→D. Every vertex has equal in-degree and out-degree and the graph is strongly connected. How many distinct Eulerian circuits does it have, where two circuits are the same if one is a cyclic rotation of the other?

  1. A. 32
  2. B. 8
  3. C. 4
  4. D. 40

Correct answer: A. 32

BEST theorem: ec = t(G) * product over v of (outdeg(v) - 1)!, with t(G) = 8 spanning arborescences (from a Laplacian cofactor) and the factorial product = 4, giving 32; an enumeration of all circuits confirms this.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic