

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Sort a list that has n <= 10 elements. Find the minimum of n <= 2 elements.
Sort a list that has n > 10 elements. Find the minimum of n > 2 elements.
Divide the large instance into k >= 2 smaller instances. Solve the smaller instances somehow. Combine the results of the smaller instances to obtain the result for the original large instance.
Sort 15 elements by dividing them into 2 smaller lists. One list has 7 elements and the other has 8. Sort these two lists using the method for small lists. Merge the two sorted lists into a single sorted list.
Divide into two groups of 10 elements each. Find the minimum element in each group recursively. The recursion terminates when the number of elements is <= 2. At this time the minimum is found using the method for small instances. Compare the minimums of the two groups to determine the overall minimum.
A chessboard is an n x n grid, where n is a power of 2.
1x1 2x2 4x4 8x
A defective chessboard is a chessboard that has one unavailable (defective) position.
1x1 2x2 4x4 8x
Place (n 2 - 1)/3 triominoes on an n x n defective chessboard so that all n 2 - 1 nondefective positions are covered.
1x1 2x2 4x4 8x
Divide into four smaller chessboards. 4 x 4
One of these is a defective 4 x 4 chessboard.
Find the lightest and heaviest of n elements using a balance that allows you to compare the weight of 2 elements.
Minimize the number of comparisons.
maxElement = 0; for (int i = 1; i < n; i++)
if (w[maxElement] < w[i]) maxElement = i;