MMW HW03
MMW HW03
MMW HW03
HOMEWORK 03
INSTRUCTIONS
• Use PDF format before uploading your answer in the assignment tab.
• Hand-written answer will be accepted, take a picture then convert to pdf.
• This homework is about magic squares, ken-ken puzzle, sudoku, and cryptarithm.
Question 1 (10-pts)
CROSS
● ROADS
DANGER
In this cryptarithm, each letter represents a unique digit from 0 to 9, and different
letters represent different digits. The goal is to find the digit that each letter represents.
R=8 D=6
O= 0 N=7
S=2 G=5
92882
● 80852
11765
Question 2 (14-pts)
State the rule how to solve, construct a magic square and give one example of 5 X 5 OR 4 X 4
squares.
• A magic square is a square grid of integers with the same number in each row, column, and
diagonal. The following guidelines must be followed in order to solve or create a magic
square:
1. Select the square's dimensions: Select the dimensions of the magic square you
intend to build. Any odd sized square, such as 3x3, 5x5, 7x7, etc., can be a magic
square.
2. Assign values: Using the numbers 1 to n2, begin assigning values to each cell in turn,
starting in the middle of the square. (where n is the size of the square).
3. Completing the numbers The first row's center cell should contain the number 1.
Then, place the number 2 in the cell by moving diagonally up and to the right. Move
vertically down to the following cell and enter the number there if the one you'd want
is already taken. Continue in this manner, moving diagonally up and to the right,
occasionally wrapping around to the leftmost column or top row.
4. Verify the sum: After all the cells have been filled in, make sure that the sum of each
row, column, and diagonal is the same. The magic sum is this amount.
5. Modify the square: If the numbers in the square don't add up properly, tweak them
slightly until they do. This could entail switching numbers in pairs or making tiny
adjustments to select cells.
16 + 13 + 6 + 9 = 54
Thus, the total value of every
column, row, and diagonal is 54.
21 + 45 + 6 = 42
54 - 42 = 12
21 + 45 + 6 + 12 = 54
8 + 15 + 13 = 36
54 - 36 = 18
8 + 15 + 13 + 18 = 54
9 + 19 + 12 = 40
54 - 40 = 14
9 + 19 + 12 + 14 = 54
12 + 17 + 18 = 47
54 - 47 = 7
12 + 17 + 18 + 7 = 54
21 + 16 + 7 = 44
54 - 44 = 10
21 + 16 + 7 + 10 = 54
10 + 15 + 9 = 34
54 - 34 = 20
10 + 15 + 9 + 20 = 54
20 + 6 + 17 = 43
54 - 43 = 11
20 + 6 + 17 + 11 = 54
To verify that it is indeed a magic square, we will check if the sum of each row,
column, and diagonal is 54
21 + 10 +16 +7 = 54 21 + 8 + 11 + 14 = 54
8 + 15 + 13 + 18 = 54 10 + 15 + 20 + 9 = 54
11 + 20 + 6 + 17 = 54 16 + 13 + 6 + 19 = 54
14 + 9 + 19 + 12 = 54 7 + 18 + 17 + 12 = 54
21 + 15 + 6 + 12 = 54
Question 3 (14-pts)
State the rule how to solve, construct a Ken-Ken puzzle and give one example of a 4x4 OR
5x5.
• A form of arithmetic and logical puzzle that is played on a grid of squares is called a Ken-Ken
puzzle. The goal is to fill in each square with a digit from 1 to the size of the grid (for example,
1 to 6 for a 6x6 grid), making sure that each row, column, and "cage" (a group of squares
bordered by a heavy border) contains exactly one of each digit and that each square contains
digits that satisfy the given mathematical operation and target number.
1. To begin, create a blank grid of squares and identify each row and column with a
number between 1 and the grid's size.
2. Use thick borders to delineate the limits of the grid's square cages. No two cages
may overlap or share a border, and each cage must have at least two squares.
3. Write an algebraic operation (addition, subtraction, multiplication, or division) and a
goal number inside each cage. Utilizing the digits that will be placed inside the cage,
the operation and goal number must be solvable.
4. Ensure that each cage's digits satisfy the specified mathematical operation and goal
number, and that each row and column contains each digit exactly once.
5. Verify that the puzzle can be solved by logic and deduction rather than guesswork or
trial-and-error to ensure that it has a unique answer.
6. Change the grid size, the number and size of the cages, the complexity of the
mathematical operations, and the target numbers to alter the puzzle's difficulty.
Example:
1234
2- 6x 8+
4 3 2 1
24
3-
2 1 3 4
14
4+ 2÷
3 4 1 2
13
2÷ 3
1 2 2
4 4 3
Question 4 (12-pts)
Example:
3 2 8 7 5
5 8 6 4 1 9
1 6 9 2 4
2 6 3 8
9 5 2 6
8 4 3 9
6 2 5 4 3
3 8 2 6 1 5
5 3 1 4 9
4 3 9 2 8 7 1 5 6
5 8 2 6 4 1 9 3 7
1 7 6 9 5 3 8 2 4
2 1 7 5 6 9 3 4 8
3 9 5 4 7 8 2 6 1
8 6 4 1 3 2 5 7 9
6 2 1 7 9 5 4 8 3
9 4 3 8 2 6 7 1 5
7 5 8 3 1 4 6 9 2
The puzzle in this instance is a 9x9 grid with 9 boxes of 3x3 cells. Parts of the crossword
puzzle are filled in with the numbers 1 through 9, however some cells are left empty and are
represented by zeros. To ensure that all of the numbers from 1 to 9 are present exactly once
in each row, column, and box, the remaining cells must be filled in. You would use logical
deduction and the process of elimination to fill in the remaining cells until the puzzle is
finished.