How I Solved the Shortest Superstring Problem in Excel

A while back I wrote an introduction to the shortest superstring problem and promised two follow-ups: one showing the greedy algorithm I wrote in VBA, and another showing how I bolted optimization on top to do better than greedy alone. Then I did what I usually do with “future work” and let it sit. Here, finally, is that follow-up — the whole thing in one post, because this is really the story of how I solved the shortest superstring problem in Excel with two stages of the same machine: a VBA pass that generates candidates, and an optimization model that picks the best of them.

Continue reading “How I Solved the Shortest Superstring Problem in Excel”

The shortest superstring problem

I was introduced to the shortest superstring problem by a request I got on Fiverr. The request turned out to be a waste of time but I really enjoyed learning about it.

Problem statement

The shortest common superstring problem aims to find a string with a minimal length that contains every string in a given set.

shortest superstring problem
Continue reading “The shortest superstring problem”