add UniqePath,solved in a mathematic way