論理式を簡単にするアルゴリズムです
http://en.wikipedia.org/wiki/Quine%E2%80%93McCluskey_algorithm
git clone https://github.com/takada-at/makurasan.git
cd makurasan
python setup.py install
>>> import makurasan as qm
>>> a, b, c, d = qm.Bool.create('abcd')
>>> z = ~a & ~b & c & d | b & c & d | a & b & ~c | a & ~b & c & d
>>> obj = qm.QuineMcCluskey(z)
>>> obj.compute()
c & d | (a & b) & ~c