Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer in Pseudocode Please answer TASK 8 by referring the above functions. Putting everything together The above functions are all the ingredients to generate
Please answer in Pseudocode Please answer TASK 8 by referring the above functions. Putting everything together The above functions are all the ingredients to generate a solved puzzle given a row vector called row. The next task will involve 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 CheckGrids and ColChecks. 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 MakeVector. 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] Please answer in Pseudocode
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started