Solving the Hamiltonian path problem using optical fiber network