solve two problems. p15 solution is not good (however it's a common algorithm to find all paths) and can be done in a formular