Question: 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

 This seventh task is intentionally vague to allow for all sorts

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!