Skip to content

Instantly share code, notes, and snippets.

View DavidParamonov's full-sized avatar

DavidParamonov

View GitHub Profile
@DavidParamonov
DavidParamonov / generate-cnf.js
Created February 26, 2023 23:22 — forked from huyen-nguyen/generate-cnf.js
Generate DIMACS CNF formula for N-queens problem
// helper functions
// cnf formula exactly one of the variables in the chosen list to be true
function ext_one(list) {
let temp = ""
temp=temp+atl_one(list)
temp=temp+atm_one(list)
return temp
}