Was it fair to say that G transformed to G-> or vice versa?
Yet we could see that it was easier to identify cycles in non-directed so we did want
to be able to change from a directed to a non-directed.
Specifically, in order to consider the problem Since we can't do a transformation by using
DHC iff UHC directly, we must try an alternate approach.
So, the first thing needed is to define a function f: G-> --> G
Is it easy to see that with our transformation, G-> has a HC iff G has a HC? For my own ease, let's first just discuss it with only one edge for each vertex: for each u in
V, we create (< u,1 >,< u,2 >)
recall
Proof
G-> has a HC => G has a HC
(< u,1 >,< u,2 >,< v,1 >,< v,2 >, . . . , < z,1 >,< z,2 >)
hence the same cycle is preserved
G has a HC => G-> has a HC
At this point, you may ask Look carefully at the proof above. Are we sure of all of our assumptions? Can you fairly make the assumptions? What assumptions you ask...
Remember how I asked, "Could you give an algorithm for the Hamiltonian Cycle now?"
Note that we could have "neighbors" on the graph that are not on the hamiltonian cycle. Since
we have no direction anymore we want to make sure that we choose in the undirected graph only valid paths.
Hopefully: a neighbor on a hamiltonian cycle ==> a neighbor on the graph
consider
Here one goes from a (< p,1 >,< q,2 >) which should be OK
but we really want it to go through (< p,1 >,< q,2 >) only where p = q Now you can't just say in your algorithm that it has to go through (< p,1 >,< q,2 >)
such that p = q. Why not? Hints: If we make our path go through (< u,1 >,< u,2 >,< u,3 >) then we are assured that we do not access two
edges of the directed graph that were both heads (or tails).
Specifically, now, for our verification, we know we cannot come to (< u,1 >) and leave without going through (< u,2 >). We need this since we can only
visit each node once.
If we do this, then we know that any valid hamiltonian cycle will look like
The important aspect about the pattern is hence the appearance of < u,2 > since it only
exists between < u,1 > and < u,3 >
Note how this is used in the proof of G has an UHC iff G-> has a DHC
Finally, note that what we did here was take a given directed graph and find a solution for the
Hamiltonian Cycle Problem using this transformation. The proof above is not a reduction proof.
How do you show a reduction? UHC Original above example graph
G-> has a HC iff G has a HC
we had to first make a valid transformation. Only then can we consider
whether one problem reduces to the other.
that would maintain the information about the direction of arrows on the edges so
that we could check back and see if the proper corresponding arrows were used in the
determination of the HC.
i.e., that our transformation preserves the information of a HC whether I have direction or not?

if G-> has a HC, then let its DHC = (u, v, w, . . . , z)
will also be a cycle since (< u,1 >,< u,2 >) are simply artifacts of the transformation that represent the same point (u) and
each (< u,2 >,< v,1 >) represent actual directed edges (u,v) in G->
if (< u,1 >,< u,2 >,< v,1 >,< v,2 >, . . . , < z,1 >,< z,2 >)
has a HC, then (u,v)->, (v,w)-> existed in G->
for the same reason as above, the same cycle still exists
Why in class did you show each node become 2 edges? (< u,1 >,< u,2 >,< u,3 >)
All we showed
so far is that G has a HC iff G-> has a HC if the undirected cycle follows the "expected" direction
Note, in fact, that we really cannot "use" (< p,1 >,< q,2>). Why not?
(< u,1 >,< u,2 >,< u,3 >,< v,1 >,< v,2 >, < v,3 >, ...)
So, we preserve a direction without "forcing" it since the only way to
access the < x,2 > nodes are to go though 1 to 3
DHC ?