In a DAG ,to find a hamiltonian path ,first topologocal sorting is found out and then hamiltonian path is found from the topological sort.
Hamiltonian path in a DAG exists if and only if there is unique topological sorting.
How do we justify this statement?
Suppose there is a dag,We first topologically sort it.For this dag to have a hamiltonian path every vertex must be connected to next vertex in topological order,because if it is not connected that way it won't have a hamiltonian path(we can't visit every vertex starting from anywhere). and if every vertex is connected to next vertex in topological order than there can't exist any other topological ordering.I hope it helps.