Skip to content

Instantly share code, notes, and snippets.



  • London
View GitHub Profile
import re
from random import randint
dfa = re.compile('((000|011|101)*(110(010|100|111)*001)*)*$')
def issum(A, B, C):
"""Return True iff non-negative integers A+B == C"""
strings = [bin(n)[:1:-1] for n in [A,B,C]]
maxlen = max(len(s) for s in strings)
padded = (s+'0'*(maxlen-len(s)) for s in strings)
ovolve / sumperms1234.ipynb
Last active May 17, 2016
Brute forcing a menacing maths problem
View sumperms1234.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.