Note that there are some explanatory texts on larger screens.

plurals
  1. POReduction algorithm from the Hamiltonian cycle
    primarykey
    data
    text
    <p>I believe that the Hamiltonian cycle problem can be summed up as the following:</p> <blockquote> <p>Given an undirected graph <code>G = (V, E)</code>, a Hamiltonian circuit is a tour in <code>G</code> passing through every vertex of <code>G</code> once and only once.</p> </blockquote> <p>Now, what I would like to do is reduce my problem to this. My problem is:</p> <blockquote> <p>Given a weighted undirected graph <code>G</code>, integer <code>k</code>, and vertices <code>u, v</code> both in <code>G</code>, is there a simple path in <code>G</code> from <code>u</code> to <code>v</code> with total weight of AT LEAST <code>k</code>?</p> </blockquote> <p>So knowing that the Hamiltonian cycle problem is NP-complete, by reducing this problem to the Hamiltonian, this problem is also proved NP-complete. My issue is the function reducing it to Hamiltonian.</p> <ol> <li>The big issue is that the Hamiltonian problem does not deal with edge weights, so I must convert my graph to one that doesn't have any weights.</li> <li>On top of that, this problem has a designated start and finish (u and v), whereas the Hamiltonian finds a cycle, so any start is the same as the finish.</li> </ol> <p>For (1), I am thinking along the lines of passing a graph with all simple paths of total weight LESS THAN k taken out. For (2), I am thinking that this is not really an issue, because if there is a Hamiltonian cycle, then the simple path from u to v can be sliced out of it.</p> <p>So, my real questions are:</p> <ol> <li>Is my solution going to give me the right answer?</li> <li>If yes, then how can I take out the edges that will produce simple paths of total weight less than k WITHOUT affecting the possibility that one of those edges may be required for the actual solution? Because if an edge e is taken out because it produces a simple path of weight &lt; k for a subset of E, it can still be used in a simple path with a different combination of edges to produce a path of weight >= k.</li> </ol> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload