Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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] All of the methods above will just produce a solved Pseudoku puzzle. In order to produce a proper Pseudoku puzzle, numbers will need to be removed from the output of MAKESOLUTION and replaced with a blank character. To complete the algorithm for generating Pseudoku puzzles, in addition to the input vector row, we have the integer n, which will stipulate the number of blank entries in the final puzzle

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How does a joint venture differ from a strategic alliance?

Answered: 1 week ago