Manuscript Offprint
arXiv:2609.01998New Upper bounds on the Mondrian Art Problem
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
THOMAS GARRISON, CHRIS SEILER, AND ALIAKSEI SEMCHANKAU
ABSTRACT. We present a new upper bound on the defect of the Mondrian Art Problem. The Mondrian Art Problem asks for a partition of an square with rectangles of distinct dimensions such that the difference (defect) between the largest and smallest rectangle areas is minimized. We prove that for any square, there exists a partition with defect , improving upon the previously conjectured upper bound. We also implement an algorithm that provides empirical evidence supporting our theoretical bound.
1. INTRODUCTION
Piet Mondrian's art has inspired many works across mathematics and beyond. The Mondrian art problem appears to have originated in recreational-mathematics circles around 2015–2016 [3, 1], popularized by a Numberphile video featuring Gordon Hamilton. In the Mondrian Art Problem we want to partition an square with distinct dimension rectangles such that the difference in area between the smallest and largest area rectangles is minimized (we count and as the same rectangle and not distinct ones). We define the defect as the difference between the area of the smallest and largest rectangles in the partition. See Figure 1 for an example of an optimal partition.
Much computational work has been done on the Mondrian Art Problem, including calculating the minimum defect for squares of size [4, 1]. Another big computation result in a different direction is a backtracking algorithm showing no square of sidelength less than or equal to 1000 can have a defect zero [2]. Finally, a third approach to this problem uses number theory to show a lower bound on the density of values of with nonzero defects [5].
It was thought from computer experimentation that the best upper bound on the defects of an square was [4]. We prove a polynomial improvement over the past upper bound.
Thomas Garrison: University of Florida, tgarrison2@ufl.edu. Chris Seiler: cseiler@alumni.cmu.edu. Aliaksei Semchankau: Carnegie Mellon University. asemchan@andrew.cmu.edu.
THOMAS GARRISON, CHRIS SEILER, AND ALIAKSEI SEMCHANKAU

FIGURE 1. Mondrian partition of . This partition has a defect from Wolfram Demonstrations Project “Mondrian Art Problem” [3]
1.1. Organization. This paper is organized as follows. In the second section, we prove an upper bound via our algorithm that yields a defect of , with the implementation in the third section.
In our proof of Theorem 2.2, we plan to find a strip tiling of the grid. A strip tiling consists of first partitioning the square into vertical strips, then tiling each strip with rectangles. The way we do this is, first, to show that the widths of all our strips sum to if we pick widths . Then we pick distinct heights of size varying by . This gives us rectangles of area with a defect of as claimed. We invoke Theorem 2.4 twice, once to show that the widths sum to and again to show that the heights will sum to .
Theorem 2.2. There exists such that for , there exists a Mondrian partition of the square with defect .
Lemma 2.3. For any number in the set there is a subset of that sums to .
This follows from the triangle number formula .
Lemma 2.4. Let be positive integers such that . Fix and let be the smallest positive integer such that . Then for any integer with there exists a subset of summing to .
Before proving Theorem 2.4, let us prove a useful corollary.
Corollary 2.5. For any number in the range there is a subset which sums up to .
Proof. Write with . Let be minimal such that . . Dividing by , we have . Then we have . For the upper bound, we have . Dividing by , we have . Since we have both sides holding, we can use Theorem 2.4 to conclude that we can find a subset summing to .
Remark. The +1s in the range can be removed with a little more effort.
The proof of Theorem 2.4 is structured into two parts. In the first part, we want to get rid of the residue by adding up elements in the set . In the second part of our proof we want the remaining tiles to add up to the number of multiples of we have left. This allows us to cover an entire row of the strip tiling.
Proof of Theorem 2.4. Part 1:
Let us write , where . We have . We can see this because if is minimal, then . Then we have so and giving the desired inequalities.
Let be a subset that sums up to (assuming ; otherwise we take the empty set). Setting we have that the elements of this set sum to , where . Part 2:
What remains is to find a set which sums up to , which we denote by . Let . It contains exactly numbers. The set
THOMAS GARRISON, CHRIS SEILER, AND ALIAKSEI SEMCHANKAU
contains no numbers of the form or with : its elements have the form with , and was chosen disjoint from . We also notice that one can create all the multiples of up to as follows:
Since and , we have , hence . Therefore, there exists a set of numbers of the form and , which sums up to .
Finally, setting we get
which completes the proof.
In our next proof, we prove Theorem 2.2, showing that we can use this algorithm for tiling strips to partition the whole square and choose to be the size of our tiles and to be the size of our defect.

FIGURE 2. Example partition produced by the Partition-Square algorithm. The width of each vertical strip is , and the heights within each strip are chosen so that all rectangle areas are approximately equal and have heights .
Proof of Theorem 2.2. In this proof we use four constants: , the constant in front of the defect; , the constant for the tile whose area we are approximating; , the constants representing the smallest and largest strip widths. Let be half of the max allowable defect ( is permitted to be a large constant).
Let be an area we will try to approximate ( is a small constant). All areas will be in the range giving a defect of .
Now we partition the rectangle into sub-rectangles such that all are distinct and come from the range . To make this partition cover the whole range, we just need
Each of the strips we will partition into rectangles in such a manner that holds, so as to ensure that all dimensions across different strips are distinct. Explicitly, take any two rectangles with dimensions and ; even if they have the same widths, their heights must be different so the rectangles have different dimensions. We also have since and , so the heights and widths can never be equal, so we cannot have rectangles with height and width dimensions swapped. We also want all to have areas in .
Given a strip , let us write , . Then we want all sides to be in the interval . In terms of the lemma above, we have , .
Notice, that as , inequalities hold automatically.
Claim 2.6. We can choose constants such that all the numbers from can be covered by the steps in our algorithm.
By Theorem 2.5, we can pick heights for strips of width that sum to if lies in the range . Since the +1 adds a term that is at most , it is enough to show lies in up to . Substituting in for this range becomes . To have number contained in this range we need inequalities
and
to hold.
THOMAS GARRISON, CHRIS SEILER, AND ALIAKSEI SEMCHANKAU
We can do that. For instance, our inequalities are satisfied with constants .
This completes the proof.
The number of tiles this algorithm uses is .
3. IMPLEMENTATION
The construction in Section 2 lends itself to finding partitions of the square efficiently. We provide an algorithm PARTITION SQUARE which, given an integer n, produces a Mondrian partition of the square with defect .
Our main algorithm has a key component RANGESUBSETSUM, which given positive integers and a target value , outputs a subset such that , for any positive integer value of satisfying and . In the Appendix, we provide RANGESUBSETSUM and the function it calls BASICSUBSETSUM. Here denotes the median strip width constant, so that RANGE-SUBSETSUM returns distinct widths centered on .
Algorithm 1: PARTITION SQUARE
Input: Parameter
Output: A set of rectangles , where each denotes a rectangle with one corner at and the opposite corner at
def PARTITION SQUARE(n)
for to do
for to do
end
end
return R
Here, we have chosen the arbitrary constant , as argued in the previous section, to be large enough to be valid for the input to RANGESUBSETSUM.
By Theorem 2.2, every rectangle has area , yielding defect .

FIGURE 3. We use our code to create a plot of defects of squares of size in increments of .
4. CONCLUDING REMARKS
We analyze strip tilings and apply them to lower the upper bound on the defect of the Mondrian Art Problem. We proved an upper bound of for large . Then we show an algorithm that achieves this upper bound.
While trying to find optimal Mondrian partitions we have observed that often the limiting factor is the largest shared face (either two rectangles next to each other or two rectangles that share one of the same dimensions). Face-sharing inherently limits the size of tiles you can use by forcing shared dimensions. With less or no face-sharing, we can use more distinct factorizations of tilings than with face-sharing. Finally, for a Mondrian partition to have defect zero, it could not have any face-sharing because two tiles that share one face and have the same area must have the same dimension, which is disallowed. This leads us to two questions.
(1) Can you get a better upper bound if face-sharing is disallowed?
(2) How can one create families of these partitions?
Another open question we have is: Are there more optimal algorithms that give a better upper bound on the defect?
APPENDIX A.
The correctness of BASICSUBSETSUM is straightforward.
To show correctness of RANGESUBSETSUM, note that , an invariant we maintain at every iteration. Further, , so .
THOMAS GARRISON, CHRIS SEILER, AND ALIAKSEI SEMCHANKAU
Algorithm 2: BASICSUBSETSUM
Input: Parameter ; Target value
Output: A subset such that
Precondition:
Runtime:
for downto 1 do
if then
end
end
return
Algorithm 3: RANGESUBSETSUM
Input: Parameters ; Target value
Output: A subset such that
Precondition: and
def RANGESUBSETSUM(m, L, N)
// ,
if is odd then
end
while do
end
return
Now,
REFERENCES
-
Hannes Bassen, Further insight into the mondrian art problem, https://mathpickle.com/mondrian-art-puzzles-solutions/, 2016, Accessed: 2024-11-01. 1, 1
-
Natalia García-Colín, Dimitri Leemans, Mia Müßig, and Érika Roldán, There is no perfect Mondrian partition for squares of side lengths less than 1001, Discrete Applied Mathematics (2024), Preprint: https://arxiv.org/abs/2311.02385. 1
-
Ed Pegg Jr., Mondrian art problem, Wolfram Demonstrations Project, 2016, https://demonstrations.wolfram.com/MondrianArtProblem/. 1, 1
-
OEIS Foundation Inc., Sequence a276523, Online Encyclopedia of Integer Sequences, 2024, https://oeis.org/A276523. 1
-
Cooper O’Kuhn, The mondrian puzzle: A connection to number theory, arXiv preprint arXiv:1810.04585, 2018, https://arxiv.org/abs/1810.04585. 1