Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Tenner Grid is a Mathematical puzzle that consists of a rectangular grid of width ten cells. The task is to fill in the grid so
Tenner Grid is a Mathematical puzzle that consists of a rectangular grid of
width ten cells. The task is to fill in the grid so that each row contains the
numbers 0 to 9. Numbers must not be repeated in rows. In columns the numbers
may be repeated and the numbers in a column must add up to a given target
sum. Therefore, the bottom numbers give the sum of the numbers in column.
The digits in contiguous cells (even diagonally contiguous cells) must be
different.
The rules of Tenner Grids math puzzles:
1. Numbers appear only once in a row.
2. Numbers may be repeated in columns.
3. Numbers in the columns must add up to the given sums.
4. Numbers in connecting cells must be different.
5. The given sum in the grid (last row) could be explicitly specified or assumed or taken as input from the user (Not necessarily random numbers). Also, the columns and the empty cells.
Write a complete java program to generate and solve the game Tenner Grid by modelling
it as constraint satisfaction problem. Your program must solve a randomly
generated Tenner Grid Puzzle in Simple backtracking, Backtracking with the
MRV heuristic, and Forward checking.
You can configure your program to either solve 10 by 3 Tenner Grid Puzzles,
10 by 4 Tenner Grid Puzzles, 10 by 5 Tenner Grid Puzzles, or 10 by 6 Tenner
Grid Puzzles.
For each algorithm, show the initial state (randomly generated state), final CSP
Tenner variable assignments, number of variable assignments and number of
consistency checks, the solution found (final state), and time used to solve the
problem
Analyze the mean(average) number of consistency checks (over five runs) required to
solve the problem and show the results in term of which algorithm is better to
solve the problem.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started