Random Walk for 3SAT — Markov Chain Demo
Random Walk for 3SAT
At each step: pick a uniformly random unsatisfied clause, then flip a uniformly random variable from it. Track the Hamming agreement with a fixed satisfying assignment, visualized as a 1-D Markov chain on states 0..n.
Clauses
Agreement with fixed assignment nodes 0..n
After selecting a clause with k literals matching the fixed assignment, the step goes “towards” the fixed solution with probability (3−k)/3 and “away” with probability k/3.