How many clean rectangles can we form from an chocolate bar? Assume that square is corrupted?
Clarifications:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Since a rectangle is formed by 2 horizontal segments and 2 vertical segments, the total number of rectangles (clean and corrupted) can be found by picking 2 of the 9 possible horizontal lines and picking 2 of the 9 vertical lines, which is ( 2 9 ) ⋅ ( 2 9 ) = 1 2 9 6 .
The number of corrupted rectangles can be found by picking 1 of the 4 possible horizontal lines above the corrupted piece, 1 of the 5 possible horizontal lines below the corrupted piece, 1 of the 4 possible vertical lines to the left of the corrupted piece, and 1 of the 5 possible horizontal lines to the right of the corrupted piece, which is ( 1 4 ) ⋅ ( 1 5 ) ⋅ ( 1 4 ) ⋅ ( 1 5 ) = 4 0 0 .
The number of clean rectangles is the difference between the total and the corrupted, which is 1 2 9 6 − 4 0 0 = 8 9 6 .