Image for post
Image for post

The Boolean Satisfiability Problem vilely censured.

Here I expose some ultimate techniques to make great tools for logic operations. Apologies: someone hacked the article to avoid sharing this technology.

Juan Manuel Dato
Jun 3, 2019 · 8 min read

Some initial operators

Improving our notation

Image for post
Image for post
(A | B | C)·(A | D | E) = 1
Image for post
Image for post
Image for post
Image for post
Matrix1 and Matrix2 = Matrix3
>>> from numpy import matrix
>>> A
matrix([[ True, False, False],
[False, True, True],
[False, True, True]])
>>> B
matrix([[ True, False, True],
[False, True, False],
[ True, False, True]])
>>> A&B
matrix([[ True, False, False],
[False, True, False],
[False, False, True]])
def cMatrix(clauseC, clauseR):
R = matrix([[True] * len(clauseC)] * len(clauseR))
for i, X in enumerate(clauseC):
if X in clauseR:
j = clauseR.index(X)
R &= matrix([[(i==col) == (j==row) \
for col in range(len(clauseC))] \
for row in range(len(clauseR))])
return R
>>> cMatrix((1, 2, 4, 5), (1, 2, 3, 6, 7))
matrix([[ True, False, False, False],
[False, True, False, False],
[False, False, True, True],
[False, False, True, True],
[False, False, True, True]])

Coherence between more than two clauses

Image for post
Image for post
Example of a formula of 4 clauses: (A1| … |An)·(B1| … |Bn)·(C1| … |Cn)·(D1| … |Dn) = 1
Image for post
Image for post
Other way to represent (A1| … |An)·(B1| … |Bn)·(C1| … |Cn)·(D1| … |Dn) = 1
Image for post
Image for post
Adding Ck to matrix [Ai·Dl]
tables[(C,D)] &= tables[(A, D)]*tables[(C, A)]
Image for post
Image for post
You have to use every two matrices before eliminating a clause in the group of matrices

Some additional warnings

Image for post
Image for post
Every cell without a 1 is a 0, but a 0 is remarked
Image for post
Image for post
You can superpose three cases: Blue + Orange = Purple
Image for post
Image for post
You chose to eliminate the Blues

The Startup

Medium's largest active publication, followed by +681K people. Follow to join our community.

Sign up for Top Stories

By The Startup

A newsletter that delivers The Startup's most popular stories to your inbox once a month. Take a look

Create a free Medium account to get Top Stories in your inbox.

Juan Manuel Dato

Written by

An obsessive Medium’s Programmer is censoring my articles.

The Startup

Medium's largest active publication, followed by +681K people. Follow to join our community.

Juan Manuel Dato

Written by

An obsessive Medium’s Programmer is censoring my articles.

The Startup

Medium's largest active publication, followed by +681K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store