2
$\begingroup$

I've been straggling a little proving the argument "a hamiltonian directed acyclic graph has a single topological sort".

This is pretty much the idea of what I've come along:

  • lets prove by contradiction. so lets assume a hamiltonian DAG has at least 2 topological sorts.
  • If there're few topological sorts - it means one of the following options:
  • either there're at least 2 vertices that aren't dependent. meaning both of these vertices could be with 0 in-degree. but it contradicts the fact that the graph is hamiltonian (there's a hamilton path in G)
  • either there exists a vertex that splits to 2 branches. such that the neighboring vertices could appear in different order in the topological sort. but it contradicts that the graph is hamiltonian because in such a case - after choosing a branch, we won't be able to visit the vertices of the second branch. however if we do have this possibility, we have come to a cycle that ends in the vertex that split to 2 branches. (contradiction to the graph being a DAG)
  • Finally we get contradiction to our assume - thus the original statement is correct.

Would appreciate your thoughts and suggestions about the idea of proof.

$\endgroup$
  • $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$ – D.W. Mar 22 '17 at 22:08
  • $\begingroup$ @sgrmshrsm7, it's great that you want to edit the question to improve it. However, when making edits, we prefer that you try to improve as many aspects as possible. I'd discourage an edit that only changes the capitalization in the first word of the title, and makes no other change -- that bumps the question to the top of the front page and can take attention away from other worthy posts, and takes up time from three other community members to review the edit suggestion. See meta.stackexchange.com/q/74430/160917 and meta.stackexchange.com/a/82895/160917. $\endgroup$ – D.W. Mar 26 '17 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.