In this assignment, you are expected to implement a solution in Prolog to the N-Tiles Problem.N-Tiles
problem is problem of placing N copies of a tile T (TX/TY) on an SxS square grid so that no two copies
touch each other. Namely, N-Tiles problem takes three inputs:
• S: Grid Size
• N: Number of copies to place
• T : Tile definition in (TX,TY) form.
and produces an N-sized set of points on the grid satisfying the non-touching condition.
A call to ntiles predicate should fail if there exists no solution for the problem specified with parameters.
Below is given examples for a no-solution case and a case with 4 different solutions.
>ntiles(2/1,3,3,P).
No
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment