This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # nondeterminism library: https://github.com/aeporreca/nondeterminism | |
| from collections import defaultdict | |
| from nondeterminism import nondeterministic, guess | |
| # SAT solver | |
| @nondeterministic | |
| def satisfiable(formula): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Code inspired by https://tex.stackexchange.com/q/520968 | |
| % Compile with LuaLaTeX (or, I think, XeLaTeX if you don't need Harfbuzz) | |
| \documentclass{article} | |
| \usepackage{fontspec} | |
| \usepackage{amsthm} | |
| \newtheorem{theorem}{Theorem} | |
| \newfontfamily{\emoji}{Apple Color Emoji}[Renderer=Harfbuzz] | |
| % I think it's just \newfontfamily{\emoji}{FontName} for other fonts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from pycryptosat import Solver | |
| from itertools import product | |
| from argparse import ArgumentParser | |
| from random import randrange, sample | |
| from timeit import default_timer as timer | |
| class Graph: |