Recursion and Combinatoric algorithms homeworks