Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This seventh task is intentionally vague to allow for all sorts of creative solutions, as long as they are well explained. Putting everything together We

image text in transcribed

This seventh task is intentionally vague to allow for all sorts of creative solutions, as long as they are well explained. Putting everything together We now have all the ingredients to generate a solved puzzle given a row vector called row. The next task will in- volve generating the initial four-element vector called puzzle from row using MAKEVECTOR(row), trying all cyclic permutations (using PERMUTERow(puzzle, x, y, z) for all combinations of x, y and z) to see if the returned vector returns TRUE for both CHECK GRIDS and COL CHECKS. Task 8: Complete the following function template: function MAKESOLUTION(row) end function This function will take the four-element vector row as input, which is the same input for the function MAKEVEC- TOR. The function should return a solved Pseudoku puzzle such that all column and sub-grid Pseudoku conditions are satisfied. The function will generate a vector using MAKEVECTOR(row), then try cyclic permutations on this vector using PERMUTERow(puzzle, x, y, z) until a set of permutations is found such that all Pseudoku conditions are satisfied (checked using CHECKGRIDS and COLCHECK). To be able to get full marks you should call the functions MAKEVECTOR, PERMUTEROW, CHECKGRIDS and COLCHECK. [6 marks]

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

How do books become world of wonder?

Answered: 1 week ago