Highlights
Consider the problem of solving Hitori puzzles. Hitori is played in an n × n grid of cells, where each cell contains a number j ∈ {1, . . . , n}. The objective is to remove cells (marked as black), so that the three following rules are satisfied.
No number appears more than once in a row or
The eliminated black cells cannot be horizontally or vertically
The remaining numbered (white) cells must be connected to each other, e., any white cell is reachable from another white cell by vertical or horizontal movements through white cells.
Task 1
Write an ASP program (hitori.lp) that solves the puzzle for any instance. Your program will receive as input a set cell/3 of triples r, c, n such that the grid has number n in row r, column c. The output of your program is a set cellblack/2 of pairs r, c such that the cell at row r, column c is eliminated.
Document your code so the following is clear.
Task 2
Write a short report on answer set programming related to the problem:
Provide, in up to words, two arguments for and two arguments against using answer set programming to solve this problem.
Discuss, in up to words, whether the logic programming paradigm is suitable for this problem or whether another paradigm of your choice is more appropriate, based on your previous arguments.
The word limits are an upper limit, not a target length. Text longer than the word limit for each point may be ignored. Clearly mark each argument in your answer of the first point and indicate whether it is for or against. Only provide two arguments for and against; additional arguments will be ignored.
This CMT304 - IT Computer Science has been solved by our PhD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.