How should the objects be split ????


Therefore:


S = all possible subsets of {1 , 2, 3,...., n}; Initialize minArea: s_{1} ∈ S; // Pick the first subset in S best_A = s_{1} best_B = {1,2,3,...,n}  s; // Completement set minArea = AreaOfBB(objects in A) + AreaOfBB(objects in B); /* ================================================= Brute force: test every possible split... ================================================= */ for ( each subset s ∈ S  s_{1} ) do { A = s; B = {1,2,3,...,n}  s; Area = AreaOfBB(objects in A) + AreaOfBB(objects in B); if ( Area < minArea ) { minArea = Area; // New best !!! best_A = A; best_B = B; } } 

This O(n^{2}) algorithm is described in this reference paper: click here
(I have not studied the algorithm and this topic is outside the scope of the course)