Mirroring the Staircases (Count 'em All 18!)

A pixelated right arrow grid is a grid of squares that is made by mirroring a staircase grid along its base. For example, the figure below shows 4 pixelated right arrow grids with tiers 1, 2, 3 and 4 respectively.

Count the total number of quadrilaterals in a 30-tiered pixelated right arrow grid (that is, when a = 30 a=30 ).

Clarification:

  • A quadrilateral is a polygon that has 4 sides.

This is one part of Quadrilatorics .


The answer is 158720.

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.

1 solution

Kenneth Tan
Jul 16, 2018

The pixelated right arrow grid is made from 2 individual staircase grids. The number of quadrilaterals in each of the 2 staircase grids is a ( a + 1 ) ( a + 2 ) ( a + 3 ) 24 \frac{a(a+1)(a+2)(a+3)}{24}

Here's a quick sketch of a proof for this formula, you can see the full details of this proof in my solution to Count 'em Staircases (Count 'em All 16!) , if you've already seen it, you may safely skip this part. :D

Proof:

Suppose the number of quadrilaterals in an a × a a\times a staircase grid is Q a Q_a , we will try to find Q a + 1 Q_{a+1} .

To increase a a by 1, we simply add a + 1 a+1 squares to the hypotenuse (the yellow squares), the newly formed quadrilaterals must contain one of the yellow squares as its top-right corner square. If a quadrilateral's top-right corner square lies on a yellow square that is i i units away from the left boundary, then it must be a i a-i units away from the bottom boundary, and the number of possible locations for its bottom-left corner square is ( i + 1 ) ( a i + 1 ) (i+1)(a-i+1) .

Therefore, Q a + 1 = Q a + i = 0 a ( i + 1 ) ( a i + 1 ) = Q a + a 3 + 6 a 2 + 11 a + 6 6 Q_{a+1}=Q_a+\displaystyle \sum_{i=0}^a(i+1)(a-i+1)=Q_a+\frac{a^3+6a^2+11a+6}{6} .

Solving this recurrence relation with the initial condition Q 1 = 1 Q_1=1 , we get that Q a = a ( a + 1 ) ( a + 2 ) ( a + 3 ) 24 Q_a=\frac{a(a+1)(a+2)(a+3)}{24} . _\square

Hence, the total number of quadrilaterals in the two staircase grids is 2 × a ( a + 1 ) ( a + 2 ) ( a + 3 ) 24 = a ( a + 1 ) ( a + 2 ) ( a + 3 ) 12 2\times\frac{a(a+1)(a+2)(a+3)}{24}=\frac{a(a+1)(a+2)(a+3)}{12} .

It now remains to count the number of "crossover" quadrilaterals (quadrilaterals that cross the common boundary of both staircase grids). We'll construct the crossover quadrilaterals by picking one square from the top staircase grid as its top-right corner square, and one square from the bottom staircase grid as its bottom-left corner square.

Consider picking one square in the i i -th column ( i Z + , 1 i a ) (i\in\mathbb{Z^+},\,1\leqslant i\leqslant a) from the left of the top staircase grid. The height of that column is a i + 1 a-i+1 .

Now we pick its corresponding bottom-left corner square from the bottom staircase grid so that it forms a valid quadrilateral, all valid bottom-left corner squares for the chosen top-right corner square are indicated by an 'X' as shown in the figure above, the size of this 'X' region is i × ( a i + 1 ) i\times(a-i+1) .

Thus, the total number of quadrilaterals that can be formed with its top-right corner square in the i i -th column is i ( a i + 1 ) 2 i(a-i+1)^2 , and thus the total number of crossover quadrilaterals is i = 1 a i ( a i + 1 ) 2 = i = 1 a i [ ( a + 1 ) 2 2 ( a + 1 ) i + i 2 ] = i = 1 a [ ( a + 1 ) 2 i 2 ( a + 1 ) i 2 + i 3 ] = a ( a + 1 ) 3 2 a ( a + 1 ) 2 ( 2 a + 1 ) 3 + [ a ( a + 1 ) 2 ] 2 = a ( a + 1 ) 2 [ a + 1 2 2 a + 1 3 + a 4 ] = a ( a + 1 ) 2 ( a + 2 ) 12 \begin{aligned}\displaystyle\sum_{i=1}^ai(a-i+1)^2&=\sum_{i=1}^ai[(a+1)^2-2(a+1)i+i^2] \\ &=\sum_{i=1}^a[(a+1)^2i-2(a+1)i^2+i^3] \\ &=\frac{a(a+1)^3}{2}-\frac{a(a+1)^2(2a+1)}{3}+\left[\frac{a(a+1)}{2}\right]^2 \\ &=a(a+1)^2\left[\frac{a+1}{2}-\frac{2a+1}{3}+\frac{a}{4}\right] \\ &=\frac{a(a+1)^2(a+2)}{12} \end{aligned}

Therefore, the total number of quadrilaterals in an a a -tiered pixelated right arrow grid is a ( a + 1 ) ( a + 2 ) ( a + 3 ) 12 + a ( a + 1 ) 2 ( a + 2 ) 12 = a ( a + 1 ) ( a + 2 ) ( a + 3 + a + 1 ) 12 = a ( a + 1 ) ( a + 2 ) ( 2 a + 4 ) 12 = a ( a + 1 ) ( a + 2 ) 2 6 \begin{aligned}\frac{a(a+1)(a+2)(a+3)}{12}+\frac{a(a+1)^2(a+2)}{12}&=\frac{a(a+1)(a+2)(a+3+a+1)}{12} \\ &=\frac{a(a+1)(a+2)(2a+4)}{12} \\ &=\frac{a(a+1)(a+2)^2}{6} \end{aligned}

Now, substituting a = 30 a=30 , we would get the answer 158720 158720 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...