2 A magic square is an arrangement of 4x4 integer numbers such that the addition of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. Given 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 C+W+Y B+X-Y B C A D D-W-Y A-X+Y A-W D+W-Z C-X+Z B+X D-X A-W+Z. B+X-Z 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 problem. 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. Given 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 C+W+Y B+X-Y B C A D D-W-Y A-X+Y A-W D+W-Z C-X+Z B+X D-X A-W+Z. B+X-Z 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 problem.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
What are two emerging technology developed outside of the US?
-
Let r and s be solutions to the quadratic equation x 2 b x + c = 0. For n N, define d0 = 0 d1 = r s dn = b dn1 c dn2 (n 2) Prove that dn = r n s n for all n N. [4 marks] (b) Recall that a commutative...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
k) Assume that one of these portfolio's is the Market Portfolio and all portfolios, except Portfolio G, are fairly priced according to the CAPM. What is the highest utility score that can be achieved...
-
Would you argue that the traditionalist political sub-culture is still dominant in Texas or has there been a change? Assess how the traditionalist political sub-culture dominates (or not) Texas and...
-
In each case, examine whether or not repetitions of the stated experiment conform to the model of Bernoulli trials. Where the model is appropriate, determine the numerical value of p or indicate how...
-
Digital Controls Inc. makes electric thermostats for homes and offices. The Westplains division makes one product, Autotherm, that has a standard cost of $37, consisting of $22 of materials and $15...
-
On January 1, Year 6, HD Ltd., a building supply company, JC Ltd., a construction company, and Mr. Saeid, a private investor, signed an agreement to carry out a joint operation under the following...
-
If I toss a fair coin seven times and the o on the next toss is a) 0.5 b) less than 0.5
-
Add minimum and maximum cardinality notation to each of the following figures, as appropriate: a. Figure 2-5 b. Figure 2-10a c. Figure 2-11b d. Figure 2-12 (all parts) e. Figure 2-13c f. Figure 2-14
-
The data below shows the number of downloads per week of a particular song for a sample of 10 weeks. Compute for the data the mean, median, mode, and midrange. Give exact values. 198, 361, 416, 207,...
-
2. Soho Enterprises distributes a wide range of household items. They have a September 30 financial year end. The chief accountant has provided you with the following summarised financial data:...
-
Hardaway Fixtures' balance sheet at December 31, 2020, included the following: Shares issued and outstanding: Common stock, $1 par Nonconvertible preferred stock, $50 par $ 940,000 15,000 On July 21,...
-
The Anti-Federalists turned out to be right. Our federal government has grown exponentially past what the Founders envisioned and in so doing has limited our civil liberties and rights and abused the...
-
Viking Voyager specializes in the design and production of replica Viking boats. On January 1, 2024, the company issues $2,000,000 of 8% bonds, due in 10 years, with interest payable semiannually on...
-
The y-intercept of a graph of a function is the point on the graph with x-coordinate 0. Thus, to find the y-intercept, set x = 0 in the equation and solve for y. The x-coordinate of the X-intercept...
-
This information relates to Bramble Real Estate Agency. Oct. 1 Stockholders invest $29,300 in exchange for common stock of the corporation. 2 Hires an administrative assistant at an annual salary of...
-
Juarez worked for Westarz Homes at construction sites for five years. Bever was a superintendent at construction sites, supervising subcontractors and moving trash from sites to landfills. He...
-
Define x and y as symbolic variables and create the two symbolic expressions Use symbolic operations to determine the simplest form of S T. Use the subs command to evaluate the numerical value of...
-
Create the following matrix E: (a) Create a 2 3 matrix F from the second and third rows, and the third through the fifth columns of matrix E. (b) Create a 4 4 matrix G from all rows and the third...
-
In a one-dimensioni random walk, the position x of a walker is computed by: xj = xj + s where s is a random number. Write a program that calculates the number of steps required for the walker to...
-
In the month of June, Andrea's Beauty Salon gave 2,500 haircuts, shampoos, and permanents at an average price of \($30\). During the month, fixed costs were \($18,000\) and variable costs were 70% of...
-
Jain Company had \($150,000\) of net income in 2002 when the selling price per unit was \($150\), the variable costs per unit were \($90\), and the fixed costs were \($750,000\). Management expects...
-
First Strike Software has 7 percent coupon bonds on the market with 10 years to maturity. The bonds make semiannual payments and currently sell for 94 percent of par. What is the effective annual...
Study smarter with the SolutionInn App