added three hamiltonian path related algorithm