Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for the 8 numbers in a cross. Im not understanding how I got a wrong. From my understanding we're suppose to place the

This is for the 8 numbers in a cross. Im not understanding how I got a wrong. From my understanding we're suppose to place the numbers that are presented in the helper array, and according placethe numbers that belong in each square of the cross. I thought i did it correctly. If not I would love any corrections. Also how would you go about b? thank you.

image text in transcribed

13. One of the projects we worked on this semester is "Eight Numbers in a Cross." The idea was to write a program which allocates the integers 1-8 to the squares in the figure above, subject to the restrictions that no two adjacent squares contain consecutive integers. By adjacent we meant vertically, horizontally, or diagonally. We used an array int Q[8] to correspond to the sub-squares in the cross and the helper array a: int a[8][5]=\{ {1}, {0,1}, {0,1}, {0,1,2,1}, {0,1,3,1}, {1,4,1}, {2,3,4,1}, {3,4,5,6,1} \} Question: a. Using the array a [8][5], show which sub-square of the cross correspond to which value of array Q[]. Write your answer in the diagram above. (5 points) b. Explain in detail (and by example) how you determined this correspondence. (10 points)

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_2

Step: 3

blur-text-image_3

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

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

Prepare an ID card of the continent Antarctica?

Answered: 1 week ago

Question

What do you understand by Mendeleev's periodic table

Answered: 1 week ago

Question

1. Where do these biases come from?

Answered: 1 week ago

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago