[SOLVED] 代写 C++ Java math python AI CSE4705 – Introduction to Artificial Intelligence October 20, 2019 Problem Set 2 – Constraint Satisfaction

30 $

File Name: 代写_C++_Java_math_python_AI_CSE4705_–_Introduction_to_Artificial_Intelligence_October_20,_2019_Problem_Set_2_–_Constraint_Satisfaction.zip
File Size: 1328.22 KB

SKU: 1996227577 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


CSE4705 – Introduction to Artificial Intelligence October 20, 2019 Problem Set 2 – Constraint Satisfaction
Overview: For this problem set, you will need to download/install the ORTools package from Google. OR refers to Operations Research, an area of study where many of these constraint satisfaction prob- lems arise. Classic problems in OR include industrial problems like scheduling jobs on different types of factory machines or the optimal way to cut specific pieces from steel slabs to minimize waste. The eas- iest way to install for most students will be to install the Python libraries using pip as outlined here: https://developers.google.com/optimization/install. There are also versions of the library for C++ or Java if you prefer.
1. Cryptarithmetic Puzzles
One popular type of AI puzzle is the Cryptarithmetic Puzzle. These puzzles consist of a mathematical
equations among unknown numbers whose digits are represented by letters. To solve the puzzle, one
must find a corresponding digit for each letter that makes the given equation valid. You can view an ex-
ample, and sample solution using ORTools, here: https://developers.google.com/optimization/cp/cryptarithmetic. For this question, write a program using ORTools CP-SAT solver to solve the following Cryptarith-
metic Puzzle first published by Henry Dudeney in the July 1924 issue of Strand Magazine.
SEND + MORE =MONEY
2. Magic Series
Another classic puzzle is the Magic Series. A set of n distinct numbers taken from the interval [1, n2] form a magic series if their sum is the nth magic constant given by:
Mn = 1n(n2 +1) 2
Some magic series for different values of n are:
Notice that these Magic Series are sets. So, there is no ordering associated with the numbers in one of these magic series. Writing a simple model to solve for the Magic Series may give us multiple identical results. For instance, the solution {1, 5, 9} and {1,9,5} are identical.
In order to prevent identical solutions from being reported more than once, we need to add additional constraints to break symmetries between different identical solutions produced by the model. In my solution, I added constraints that ensured that the array of values in the magic series were listed in in- creasing order. That is, I added constraints that enforced that elements[i-1] < elements[i]. Implement your solution so that it accepts the value n as a command-line argument and can solve any magic series given this value n.1 n Magic Series1 {1]}2 {1,4}, {2,3}3 {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}3. SudokuSudoku is a popular math puzzle typically played with a 9 ¡Á 9 grid. In the grid are placed digits 0 – 9 with particular constraints. All of the digits in a row must be different. All digits in a column must be different. And, finally, each of the nine 3 ¡Á 3 subgrids that compose the larger 9 ¡Á 9 grid must be composed of digits which are all different. See the Wikipedia page for more information regarding Sudoku puzzles: here.For this problem, write a program which can solve a Sudoku puzzle by creating 81 variables with the domain 0 – 9, adding all of the appropriate AllDifferent constraints outlined above. Also, your program should be able to solve the puzzle below. You may hard-code the values for the assigned variables in the given puzzle. 2

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 C++ Java math python AI CSE4705 – Introduction to Artificial Intelligence October 20, 2019 Problem Set 2 – Constraint Satisfaction
30 $