5. Many newspapers feature a puzzle called KenKen in the recreational section. The KenKen puzzle is similar

Question:

5. Many newspapers feature a puzzle called KenKen in the recreational section.

The KenKen puzzle is similar to Sudoku except that arithmetic relations are involved. Write a Prolog program that solves a 4 × 4 KenKen puzzle taken from a newspaper.

Hint: You will need the uniq predicate used for the Sudoku problem for the rows and for the columns. It will also be convenient to define two auxiliary predicates, sub and div, where sub(x, y, z) holds when either z = x − y or z = y − x, and div(x, y, z) holds when either z = x ÷ y or z = y ÷ x.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: