Btw, I could post my partial code, but does only the L>S part and it contains some of my other constraints (which I suppose I could squelch for the purpose).
Comment on Re: minimal superstrings/maximal substrings
It would be helpful if you posted more input data and resultant output data.
Post your current code too using the posted examples and explain what is wrong.