As an undergraduate, I was curious if it's possible to cut a square into seven equal parts using three straight lines. I later wrote an Excel VBA macro that attempts to solve the problem iteratively. In each iteration, the lines that intersect the square move a little, and if the iteration step reduces the relative standard deviation (RSD) between the areas, that step becomes the starting point for the next iteration. If moving the intersecting lines doesn't improve the RSD, I try smaller steps. If the step size reaches a chosen small value, or after many iterations the RSD doesn't improve, the program stops. It's an interesting and challenging mathematical problem that requires finding the optimal placement and orientation of the lines.
Later on, when applying the program, I found out that there is no solution to the problem. The iterations always converge to the point where the 3 lines divide the square into 6 equal areas, so the unit square is divided into 7 parts as follows: (0, 1/6, 1/6, 1/6, 1/6, 1/6, 1/6). One of the areas is zero because the lines only divide the square into six parts. The smallest RSD of this sequence is around 44.05% when divided by the mean. Throughout multiple runs of the program, no state was found where the RSD divided by the mean improved.
In the current version of the program, I have extended the possibilities to apply it to other regular polygons outside of the square, with any number of lines and any number of divided areas. It works quite well with a low number of lines. Regular polygons with more sides converge to the same solution as the square. However, with the regular triangle, at the end of the iterations, the area ratio is as follows: (1/16, 2/16, 2/16, 2/16, 3/16, 3/16, 3/16). In this case, the RSD divided by the mean is around 33.07%.
At least four straight lines are required to divide a square into seven equal areas.
The Excel file containing the macro can be downloaded from the following link. Once downloaded, the macro can be launched by clicking a designated control button on the first worksheet. It is important to note that before using the macro, you will need to enable macro execution in Excel settings.