Reduction: Rudrata (s,t) Path → Rudrata Cycle

The RUDRATA CYCLE problem: Given a graph, is there a cycle that passes through each vertex exactly once?

RUDRATA (s,t)(s,t)-PATH: Two vertices ss and tt are specified, we want a path starting at ss and ending at tt that goes through each vertex exactly once.

Reduction: maps an instance (G=(V,E),s,t)(G = (V,E), s, t) of RUDRATA (s,t)(s,t)- Path into an instance G=(V,E)G’ = (V’, E’) of RUDRATA CYCLE as follows: GG’ is simply GG with additional vertex xx and 2 additional edges {s,x},{x,t}\{s,x\}, \{x,t\}.

To recover a Rudrata (s,t)(s,t)-path in GG given any Rudrata cycle in GG’, we simply delete edges {s,x},{x,t}\{s,x\}, \{x,t\} from the cycle.

To confirm the validity of this reduction, we show that it works in the case of either outcome depicted:

  1. When the instance of RUDRATA CYCLE has a solution
    1. Since the new vertex xx has only two neighbors, {s,t}\{s, t\}
      1. any Rudrata cycle in GG’ must consecutively traverse the edges {t,x}\{t,x\} and {x,s}\{x,s\}.
    1. The rest of the cycle then traverses every other vertex en route from ss to tt.
    1. Thus deleting the two edges from the Rudrata Cycle gives a Rudrata path from ss to tt in the original graph GG.
  1. When the instance of RUDRATA CYCLE does not have a solution
    1. We must show that the original instance of RUDRATA (s,t)(s,t)-PATH cannot have a solution either.
      1. Usually easier to prove the contrapositive: If there is a solution of the original problem in GG, then there is a solution of the problem in GG’
      1. Just add the two edges {t,x}\{t,x\} and {x,s}\{x,s\} to the Rudrata path to close the cycle.