algorithmgraphgraph-theoryhamiltonian-patheuler-path

Difference between hamiltonian path and euler path


Can some one tell me the difference between hamiltonian path and euler path. They seem similar!


Solution

  • An Euler path is a path that passes through every edge exactly once. If it ends at the initial vertex then it is an Euler cycle.

    A Hamiltonian path is a path that passes through every vertex exactly once (NOT every edge). If it ends at the initial vertex then it is a Hamiltonian cycle.

    In an Euler path you might pass through a vertex more than once.

    In a Hamiltonian path you may not pass through all edges.