xkcd 1313: Regex Golf

regexalgorithmspythonset-covergreedy-algorithmspuzzle

Abstraction: Greedy set-cover algorithm finds shorter regex than xkcd's genetic algorithm

Key points:

Connections: Peter Norvig · Randall Munroe · Regular Expressions · Greedy Algorithms · Set Cover

Source: http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313.ipynb