Given a set N = {1...n} of n items with positive integers w1,.....,wn and Sum S, the subset sum problem (SSP) is to find a subset N such that the corresponding sum of the subset is equal to S.
a) Explain how the subset problem is solvable using dynamic programming and it specifies the basics of dynamic programming.
b) Write down a dynamic programming-based algorithm that can solve the subset sum problem. Give an explanation of your steps.