No such thing as a small change | |
PerlMonks |
Re: Divide a list of string into substringsby LanX (Saint) |
on Jun 23, 2020 at 10:16 UTC ( [id://11118378]=note: print w/replies, xml ) | Need Help?? |
Provided Re: Divide a list of string into substrings
by BillKSmith is the right interpretation... ... this smells like a problem from lattice theory plus a cost function to be minimized. Intuitively I'd try to start to take all pairs from the input and construct their decomposition. Then you repeat this step with the resulted set of distincts substrings as new input again. Keep repeating again till there are no new decompositions. Though you need to mathematically proof that intermediate steps stay optimal and that the desired solution is reached.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|