Reduction: ZOE → RUDRATA CYCLE
Two steps:
- Prove that ZOE can be reduced to a generalization of RUDRATA CYCLE, called RUDRATA CYCLE WITH PAIRED EDGES
- How to get rid of the extra features of the problem and reduce it to the plain RUDRATA CYCLE
RUDRATA CYCLE with paired edges
Given a graph and a set of pairs of edges. We seek a cycle that
- visits all vertices once
- For every pair of edges in , traverses exactly one of either or .
Reduction: ZOE ⇒ RUDRATA CYCLE WITH PAIRED EDGES
Given an instance of ZOE, (A is matrix with only 0-1 entries), the graph we can construct is:
It’s a cycle that connects collections of parallel edges!
For each variable we have two parallel edges corresponding to .
For each equation involving variables, we have parallel edges, one for every variable in the equation.
Therefore
- Any RUDRATA CYCLE in this graph must traverse the collections of parallel edges one by one, choosing one dge from each collection.
- The cycle “chooses” for each variable a value
However, the structure of matrix must be reflected somewhere ⇒ and that is the set of pairs of edges such that exactly one edge in each pair is traversed.
- For every equation, and for every variable in it,
- Add to the pair where is the edge corresponding to the appearance of in the equation (on the left side of the figure), and is the edge corresponding to the variable assignment (on the right side of the figure)
The construction is now complete, we claim the values chosen are a solution to the original instance of ZOE
- If a variable has value 1, then edge is not traversed, and all edges associated with on the equation side must be traversed.
- Therefore each equation exactly one of the variables appearing in it has value - all equations are satisfied
Getting rid of edge pairs
Suppose Figure 8.12 a) is a part of a larger graph in such a way that only the four endpoints touch the rest of the graph. We claim that this graph has the important property:
- In any Rudrata cycle of the subgraph shown must be traversed in one of the two ways shown in bold in Figure 8.12(b) and (c)
- Suppose that the cycle first enters the subgraph from vertex continuing to , then it must continue to vertex (because has degree 2 and it must be visited immediately after one of its adjacent nodes is visited).
- Hence we must go on to node and here we seem to have a choice
- continue to
- return to
- How are we going to visit the rest of the subgraph?
- Go on and on…
- Basically: This gadget behaves just like the two edges
To reduce RUDRATA CYCLE WITH PAIRED EDGES to RUDRATA CYCLE,
- we go through the pairs in one by one.
- For each pair , replace the two edges with the gadget in Fig 8.12(a)
- For any other pair in that insolves , we replace the edge with the new edge , where is from the gadget
- Because the traversal of indicates that whether in the old graph would be traversed.
- Similarly, for any other pair in that involves , replace with .
- After such replacements (each performed in polynomial time), we are done!