Rudolf Adamkovič Personal site


Algorithm

  1. Start with a random variable assignment.
  2. If the formula is satisfied, return the current assignment.
  3. Flip a variable that maximizes the number of satisfied clauses. †
  4. If more flips are allowed, go to step 2.
  5. If more tries are allowed, go to step 1.
  6. Return a failure.

† Ties are broken randomly.


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.