Previous page Next page Navigation bar


2001/2002 Puzzles

21 May 2001 (Shrinking Squares)

Diagram of nested colored squares; click for a full description. The problem statement from the Ole Miss Problems of the Week page is:

Square ABCD is divided and shaded as shown in the diagram to the left. The shaded square is one-fourth the area of square ABCD. If the pattern continued forever and ever, what percentage of the original square would be shaded?

Sounds like with just a small prybar, we could force this to be a computation we could — gasp! who would have thought we could possibly choose this approach — program on our programmable CFX-9850G or FX-7400G!

Let us see. That big shaded square, we are told, is one quarter of the entire square. Then there is another shaded square that is one quarter of one quarter of the entire square. Then there is another shaded square that is one quarter of one quarter of one quarter of the entire square. Hmm. I guess if we wrote a program to add

¼ + ¼2 + ¼3 + ...

we would have an answer.

We quickly pound out the following program, available here in text or as a download as a text file with .CAT file contents. As with other programs on this site, text starting with a semicolon (“;”) are comments and is not to be entered into the calculator.

; Variables:
;   A is the size of the current square
;   B is the total shaded so far
;   C is the total shaded plus the current coverage
; Symbols:
;   -> is assignment arrow
;   / is divide operator
;   <> is not equal relational
1->A               ; Initialize size of square to 1
0->C               ; Initialize fraction shaded to 0
Do                 ; Loop down through smaller squares
A/4->A             ;   One-quarter of current square size is shaded
C->B               ;   Get copy of current shaded coverage
A+B->C             ;   Add in new shaded coverage
LpWhile C<>B       ; Loop until there is no change
100B               ; Report the percentage

Running this program, we quickly get:


So 33.33333333% of the square is shaded, to within round-off error.

Of course, the problem did not say “approximately what percent.” It said “what percent.” Now, is that .33333333% actually .33333333%, or is it 1/3 percent?

Let us go back for a minute to one of our preliminary steps. We had the fraction of the square covered as:

¼ + ¼2 + ¼3 + ...

Thinking hard, we realize this is a geometric sum — each term is a multiple of the term in front of it. The first term in this example is ¼, and the ratio is (coincidentally) ¼. The formula for a geometric sum is:

S = (first term)/(1 - ratio)

where S is the sum, first term is the first term, and ratio is the ratio. So the sum — the proportion of the square ABCD that is shaded — is ¼/(1-¼) = ¼/¾ = 1/3.

Of course, if we happen not to remember the formula for a geometric sum, we are stuck. Or are we? Thinking about it, we realize that since the series of squares inside squares is infinite, we can add another at the end without changing anything. We can add another square at either end. In particular, we can add another square outside the squares and not change anything. So suppose some proportion p is shaded. The proportion shaded does not change if we make what we have the inner set of squares — that is, if we add another set of squares around it. We add 1 shaded square and 2 white squares to make 4 squares total, and the ratio p is unchanged. So

p = (1 + p)/4, or 4p = 1 + p, or 3p = 1, or p = 1/3.

So the proportion covered is exactly 1/3, and the percentage covered is exactly 33 1/3%.

Sounds like a plan to me.

[ Previous page | Top of page | Next page ]

Previous page Top of page Next page Navigation bar

Copyright © 2001 Brian Hetrick
Page last updated 25 November 2001.

Brian’s Casio Calculator Corner








15 April 2002

11 February 2002

1 October 2001

24 September 2001

13 August 2001

30 July 2001

18 June 2001

4 June 2001

21 May 2001

7 May 2001

30 April 2001

23 April 2001

9 April 2001

18 February 2001

4 February 2001

29 January 2001

Previous years

In memoriam: Dijkstra

Site Information

Your Privacy

Site Map


Site Technical Data