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”

Favorite movie quotes

I am a movie fan and also a movie quotes fan. I quote movies all the time but I am going to list only movie quotes that I actually liked the moment I heard them in the movie. The first time. Sometimes you are quietly watching and something you hear hits you sort of like an epiphany. A punch in the face. A revelation. Something that had to be said or you had to hear. Many times how you receive a quote depends on your state of mind at the moment, and the same quote would have felt different in any other circumstance. Anyways, in no particular order, these are my favorite quotes.

favorite-movie-quotes
Continue reading “Favorite movie quotes”

Lessons from the 2019 letter from Warren Buffett to Berkshire Hathaway investors

After a few years of reading the famous annual letter from Buffett (tag) to his investors, and three years of following the live Yahoo! stream of the annual meeting in Omaha, last year I shared my impressions for the first time. Here is the second installment.

Animated illustration of Warren Buffett
Continue reading “Lessons from the 2019 letter from Warren Buffett to Berkshire Hathaway investors”

The Greater Fool

The greater fool theory of finance says it’s sometimes possible to make money by purchasing overvalued assets (items whose purchase price exceeds their intrinsic value) and reselling them for a higher price later.

This theory states that prices go up when people can sell overvalued securities to the “greater fool,” regardless of whether the securities are overvalued. Suppose one “fool” purchased an overpriced asset, hoping that he could sell it to an even “greater fool” who would profit from it. A system like this can only work if new “greater fools” are willing to purchase the asset at ever-higher prices. Continue reading “The Greater Fool”