Nowhere-Neat Squaring the Rectangle

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

The goal is to completely tile a large rectangular area with squares such that no two tiles have a side in common ("nowhere-neat tiling").


A similar goal is to tile the large rectangular with squares such that no two tiles of the same size share any part of a side (apart from possibly a vertex). This is called a "no-touch" tiling. No-touch implies nowhere-neat.

(The Demonstration "Nowhere-Neat Squaring the Square" treated tiling of square area, so squares are omitted here.)


Contributed by: Karl Scherer (March 2012)
Additional contributions by: Patrick Hamlyn and Joseph DeVincentis
Open content licensed under CC BY-NC-SA



Click the board to specify the position of the bottom-right corner of a square. The program will automatically draw the largest possible square that fits.

The "board" dropdown menu lets you choose the size of the rectangular board. The menu does not offer areas that only have solutions with fault lines. The first entry in this menu shows an "overview" option. Click it to see a diagram showing which rectangles up to 30×30 have solutions. The black squares indicate for which rectangles it has been proven that no solution exists.

The number of "tiles" created is displayed underneath.

The "select" setter bar lets you go back to the start, one move back, one move forward, or jump to the last stored move.

Click the "show" setter bar to show the size for each square tile, its sequence number, or neither.

Click the "outline" setter bar to display thick or thin outlines of the square tiles or no outline at all.

Click an existing square tile to remove it from the board.

Click the "check nowhere-neat" button to get a warning whenever this rule is violated by a newly added tile.

Click the "check no-touch" button to get a warning whenever this rule is violated by a newly added tile.

In both cases, the system will only check the newest tile; so it is advisable to click these buttons before you start. Therefore the "check nowhere-neat" button is clicked at the start of this Demonstration.

The "solution" dropdown menu lets you select a solution to the current problem.


The general nowhere-neat problem was solved by the author in February 2001. A similar theorem on no-touch tilings was also found by the author at the same time. These theorems were published in the Journal of Recreational Mathematics.

In 2005 the author also proved similar theorems for squaring rectangles (saying that all rectangles above a certain size are solvable). The proofs of these theorems are attached to the Zillions game, "Square the Rectangle". There you will also find tilings (when they exist) for all rectangles up to size 50×50, for altogether over 1100 solutions! Nearly all tilings have been found by hand.


[1] K. Scherer, New Mosaics, privately published, 1997.

[2] K. Scherer, "Square the Square," "Square the Square II," "Square the Rectangle", "Square the Square Solver," Zillions of Games, (2012)

[3] K. Scherer, "A General Theorem on No-Touch Tilings of Squares and a General Theorem on Nowhere-Neat Tilings of Squares," Journal of Recreational Mathematics, 32(1), 2003–2004 pp. 1–13.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.