Data Structures & AlgorithmsModerateGATE CS · Product-company placement

The connected undirected graph with edges A–C, A–F, B–C, B–D, B–G, B–H, C–D, C–F, D–E, D–G, F–H, G–H must be walked so that every edge is traversed at least once, starting and ending at the same vertex. If repeated traversals are allowed, what is the minimum number of edges that must be added (duplicated) to make an Euler circuit possible, assuming every pair of odd vertices can be joined by a new edge?

  1. A. 4
  2. B. 1
  3. C. 2
  4. D. 3

Correct answer: C. 2

Euler circuit ⇔ connected and every degree even. There are 4 odd-degree vertices; each added edge fixes two of them, so 2 edges are needed.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic