Implemented generate function.

Trying the solution with generating all smallest subset of the largest
string, and compare it with the smaller string. Still need to modify the
generate function to work with seq.