Skip to content

Instantly share code, notes, and snippets.

View DavidParamonov's full-sized avatar

DavidParamonov

View GitHub Profile
@huyen-nguyen
huyen-nguyen / generate-cnf.js
Created November 20, 2020 05:11
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
}