added linear_sum_recursion