Answered step by step
Verified Expert Solution
Link Copied!

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.

Write an AI 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, 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. Conduct a comparison of various CSP algorithms (Backtracking, BT+MRV. Forward Checking, and FC+MRV) on Tenner Grid problem. Analyze the mean(average) 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.

source code must be in java

image text in transcribed

Solution \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline 4 & 6 & 2 & 0 & 9 & 1 & 3 & 8 & 5 & 7 \\ \hline 3 & 0 & 1 & 7 & 8 & 6 & 5 & 4 & 9 & 2 \\ \hline 6 & 4 & 5 & 0 & 2 & 9 & 3 & 7 & 1 & 8 \\ \hline 13 & 10 & 8 & 7 & 19 & 16 & 11 & 19 & 15 & 17 \\ \hline \end{tabular} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline & & 1 & & 3 & 8 & 6 & 9 & & 2 \\ \hline 6 & 2 & & & 1 & & & 7 & 4 & 3 \\ \hline 7 & 4 & 5 & & 0 & 6 & & & 8 & \\ \hline & & 8 & & 4 & 9 & 5 & 7 & & \\ \hline 7 & 9 & 1 & 0 & & & 4 & 8 & 5 & 2 \\ \hline 26 & 20 & 15 & 27 & 14 & 35 & 21 & 34 & 23 & 10 \\ \hline \end{tabular} Solution \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \hline 4 & 5 & 1 & 7 & 3 & 8 & 6 & 9 & 0 & 2 \\ \hline 6 & 2 & 0 & 8 & 1 & 9 & 5 & 7 & 4 & 3 \\ \hline 7 & 4 & 5 & 9 & 0 & 6 & 1 & 3 & 8 & 2 \\ \hline 2 & 0 & 8 & 3 & 4 & 9 & 5 & 7 & 6 & 1 \\ \hline 7 & 9 & 1 & 0 & 6 & 3 & 4 & 8 & 5 & 2 \\ \hline 26 & 20 & 15 & 27 & 14 & 35 & 21 & 34 & 23 & 10 \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago