Count 'em All 21!

The figure above shows an 8 × 8 8\times8 grid but this time with more holes than before!

Count the total number of quadrilaterals in the grid above.

Clarifications :

  • A quadrilateral is a polygon that has 4 sides.
  • The quadrilaterals cannot contain holes! I don't like holes.
  • I think the culprit was a mouse.

This is one part of Quadrilatorics .


The answer is 654.

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 25, 2018

Relevant wiki: Principle of Inclusion and Exclusion - Multiple Sets

Let's label the holes like so:

Let's imagine that the mouse didn't make it as dinner and the holes aren't there. Then from this note , the number of quadrilaterals in the 8 × 8 8\times8 grid is ( 9 2 ) × ( 9 2 ) = 8 × 8 × 9 × 9 4 = 1296 {9\choose2}\times{9\choose2}=\frac{8\times8\times9\times9}{4}=1296

Now, since I don't like holes, we need to remove quadrilaterals that contain the holes.

Denote n ( ) n(\square) as the number of quadrilaterals that contain at least the specified holes (for example n ( A , C ) n(A, C) would equal to the number of quadrilaterals that contain the holes A A , C C , which might also contain B B and D D ), then by PIE , the total number of desired quadrilaterals (Reminder! Quadrilaterals without holes!) is n ( A ) + n ( B ) + n ( C ) + n ( D ) n ( A , B ) n ( A , C ) n ( A , D ) n ( B , C ) n ( B , D ) n ( C , D ) + n ( A , B , C ) + n ( A , B , D ) + n ( A , C , D ) + n ( B , C , D ) n ( A , B , C , D ) \begin{aligned}&n(A)+n(B)+n(C)+n(D) \\ &-n(A, B)-n(A, C)-n(A, D)-n(B, C)-n(B, D)-n(C, D) \\ &+n(A, B, C)+n(A, B, D)+n(A, C, D)+n(B, C, D) \\ &-n(A, B, C, D) \end{aligned}

Man, that looks like it's going to be a really messy calculation! Don't worry, we have some shortcuts.

One way to construct quadrilaterals is by choosing two horizontal lines and two vertical lines from the grid. For a quadrilateral to contain the specified holes, its left vertical edge must be on the left of all the specified holes, and its right vertical edge must be on the right of all the specified holes. Similarly, its top horizontal edge must be above all the specified holes, and its bottom horizontal edge must be below all the specified holes.

With that in mind, we can note that n ( A , B , C ) = n ( A , B ) n(A, B, C)=n(A, B) , n ( B , C , D ) = n ( B , D ) n(B, C, D)=n(B, D) and n ( A , B , C , D ) = n ( A , B , D ) n(A, B, C, D)=n(A, B, D) , the above expression simplifies to n ( A ) + n ( B ) + n ( C ) + n ( D ) n ( A , C ) n ( A , D ) n ( B , C ) n ( C , D ) + n ( A , C , D ) \begin{aligned}&n(A)+n(B)+n(C)+n(D) \\ &-n(A, C)-n(A, D)-n(B, C)-n(C, D) \\ &+n(A, C, D) \end{aligned}

Doesn't look that messy now! :D


Consider n ( A ) n(A) , for quadrilaterals to contain A A , its left edge must be on the left of A A , its right edge must be on the right of A A , its top edge must be above A A , and its bottom edge must be below A A . There are 4 4 vertical lines on the left of A A , 5 5 vertical lines on the right of A A , 5 5 horizontal lines above A A and 4 4 horizontal lines below A A . We choose 1 from each of them, hence n ( A ) = 4 × 5 × 5 × 4 = 400 n(A)=4\times5\times5\times4=400

With the same logic, n ( B ) = 3 × 6 × 7 × 2 = 252 n ( C ) = 4 × 5 × 7 × 2 = 280 n ( D ) = 6 × 3 × 6 × 3 = 324 n(B)=3\times6\times7\times2=252 \\ n(C)=4\times5\times7\times2=280 \\ n(D)=6\times3\times6\times3=324


Consider n ( A , C ) n(A, C) , for quadrilaterals to contain A A and C C , its left edge must be on the left of both A A and C C , its right edge must be on the right of both A A and C C , its top edge must be above both A A and C C , and its bottom edge must be below both A A and C C . n ( A , C ) = 4 × 5 × 5 × 2 = 200 \therefore n(A, C)=4\times5\times5\times2=200

I bet you can see where this is going. :) n ( A , D ) = 4 × 3 × 5 × 3 = 180 n ( B , C ) = 3 × 5 × 7 × 2 = 210 n ( C , D ) = 4 × 3 × 6 × 2 = 144 n(A, D)=4\times3\times5\times3=180 \\ n(B, C)=3\times5\times7\times2=210 \\ n(C, D)=4\times3\times6\times2=144


n ( A , C , D ) = 4 × 3 × 5 × 2 = 120 n(A, C, D)=4\times3\times5\times2=120


n ( A ) + n ( B ) + n ( C ) + n ( D ) n ( A , C ) n ( A , D ) n ( B , C ) n ( C , D ) + n ( A , C , D ) = 400 + 252 + 280 + 324 200 180 210 144 + 120 = 642 \begin{aligned}\therefore &n(A)+n(B)+n(C)+n(D)-n(A, C)-n(A, D)-n(B, C)-n(C, D)+n(A, C, D) \\ &=400+252+280+324-200-180-210-144+120 \\ &=642 \end{aligned}

Therefore, there are 642 642 quadrilaterals that contains holes, the total number of quadrilaterals that don't contain holes in the original grid is 1296 642 = 654 1296-642=654 .

What do you mean by holes? I found the answer 1296. But the holes??|!!

Alapan Das - 2 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...