\myheading{Gray code in MaxSAT}
\label{Gray_MaxSAT}

\renewcommand{\CURPATH}{gray_code/MaxSAT}

This is remake of gray code generator for Z3 (\ref{Gray_Z3}).

Here is also \emph{ch[]} table, but we add soft clauses for it here.
The goal is to make as many \emph{False}'s in \emph{ch[]} table, as possible.

\lstinputlisting[style=custompy]{\CURPATH/gray_SAT.py}

So it does, for 5-bit Gray code:

\lstinputlisting{\CURPATH/5.txt}

... for 6-bit Gray code:

\lstinputlisting{\CURPATH/6.txt}

