Professional Documents
Culture Documents
Lecture 6
Lecture 6
CS3610
Solve examples
Algorithm LoopAndRecurse(A[1..n]);
int i;
if n > 1 then
1. Depth-First Search
Prove that if a magic square of order n exists, the sum in question must be
equal to n(n2 + 1)/2.
Describe an exhaustive search algorithm to solve this problem.