Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 A magic square is an arrangement of 4x4 integer numbers such that the addition of all the entries -numbers- in any of the four

image text in transcribed

2 A magic square is an arrangement of 4x4 integer numbers such that the addition of all the entries -numbers- in any of the four rows and in any of the four columns yield the same value, say k. We say that the magic square is of order k. We call one such square a K-magic square. To find a magic 4x4 square and its order, we can use the following method. Givern eight integer numbers A, B, C, D, W, X, Y, and Z form a 4x4 square according to the arrangement given in the Table 1. We find the order of this magic square by adding up the numbers in any of the rows or columns Table 1: 4x4 Magic Square General Pattern A-W C+W+Y B+X-Y D-X D+W-Z C-X+Z A-W+Z. B+X-Z B+XD-W-Y A-X+Y C+W Let us call the task of finding a 4x4 magic square -and its order- given eight integer numbers "The 4x4 k-Magic Square Problem" (2 pts) Identify and give a description of the problem's parameters (2 pts) Give a statement describing a request for the construction of a 4x4 magic square and its order (3 pts)] Write a Python program that inputs values for the parameters of the problem and outputs what is requested in the problem statement. Include in your submission a file with the Python program to solve this problem (1 pt) Using your program, solve the instance given by 1, 2, 3, 4, 5, 6, 7 and 8. Submit the result of the execution of your program with this instance of the

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

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

Explain why elasticity of demand is measured in percentages.

Answered: 1 week ago