Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a multi-undirected graph, how can I find the number of different paths from Node A to B using every node in the graph (means shortest path algorithms are useless)

In some cases there may be no way to achieve this. I am looking for the number of available different paths.

Note: You have to use every node and use them once.

share|improve this question
1  
This is surely NP-Hard. Hamiltonian Path can easily be reduced to it. –  Aryabhata Dec 15 '10 at 3:33
add comment

1 Answer

up vote 3 down vote accepted

This problem is #P-complete. Informally, that essentially means that the best you can do is try every possible path.

See http://cstheory.stackexchange.com/questions/2396/counting-the-number-of-hamiltonian-cycles-in-cubic-hamiltonian-graphs for a more complete discussion of this problem.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.