Rectangles and squares

A rectangle of a variable size is chosen at random from the 8 × 5 8 \times 5 grid.

What is the probability the chosen rectangle has a vertex at point A ? {\color{#D61F06}A}?

2 31 \frac{2}{31} 2 27 \frac{2}{27} 1 13 \frac{1}{13} 3 29 \frac{3}{29}

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.

21 solutions

Joseph Newton
Aug 29, 2018

Every rectangle on the grid can be drawn by choosing two points on different vertical and horizontal lines and making them the corners of a rectangular box, for example: Using this, we can calculate the total number of rectangles. To pick the first point, there are 6 horizontal lines and 9 vertical lines, so the total number of places to put the first point is 6 × 9 6\times9 . For the second point, we can't put it on the same row or column, so there are only 5 × 8 5\times8 places to put it. After multiplying these together, we need to divide by 4, as each rectangle can be drawn from any of its 4 corners, and so the total number of rectangles is 6 × 9 × 5 × 8 4 = 540 \frac{6\times9\times5\times8}{4}=540 .

Now, to find the number of rectangles with a corner at A, we can just let the first point we draw the rectangle from be A and the second point be on some other vertical and horizontal line, so the total number is 5 × 8 = 40 5\times8=40 . Note that we don't need to divide by anything, because all the rectangles are being drawn from the same starting corner.

This means the probability of choosing a rectangle with a corner at A is 40 540 = 2 27 \large\frac{40}{540}=\frac{2}{27}

This is the most rustic, comprehensive explanation one could fathom. Excellent work, mate.

Marc Moncada - 2 years, 9 months ago

Sorry, I didn't understand why you divided by four the first time and not the second time

Jill Jani - 2 years, 9 months ago

Log in to reply

The first time we can draw each one of the rectangles in 4 different ways, by placing the first point at any of the four corners and the second at the opposite corner. This means we are counting each rectangle 4 times, and have to divide by 4. However, for the second time, we start drawing each rectangle in the same place (at A), and so we are not counting rectangles multiple times.

Joseph Newton - 2 years, 9 months ago

Beautiful solution. I understood it perfectly

Ethan Wahanik - 2 years, 9 months ago

I was considering also oblique rectangles :D

Tomáš Volejník - 2 years, 9 months ago

I do not understand why we're not dividing by 4 the second time. I get that we don't have to choose A, just the second, opposite corner, but even then, marking the second (opposite) corner will automatically generate two more corners ( fixed w.r.t. A and our chosen corner) and we can still draw a rectangle from all 4 points (and still have A as a corner). It just appears to me that we are deliberately choosing to not draw rectangles from other points (But still arrive at the right conclusion which is sort of confusing).

Suyash Fartyal - 2 years, 8 months ago

Log in to reply

We are deliberately choosing to draw each rectangle only from A. In the first case we divide by 4 because we counted each rectangle 4 times, but when we draw each rectangle from A each rectangle is only being counted once. The second point is the only thing that varies, and each location of the second point produces a unique rectangle when the first point is fixed at A.

Joseph Newton - 2 years, 8 months ago

where do you take into account oblique rectangles?, like the ones with length sqrt(2)x2sqrt(2)

master mansson - 2 years, 6 months ago

Log in to reply

If it were a grid of vertices, I would have to consider diagonal rectangles as well. However, the question simply states "A rectangle is chosen from the 8x5 grid." This suggests that new lines aren't being created, and so there would be no oblique rectangles.

Joseph Newton - 2 years, 6 months ago

Consider making a rectangle first and then placing point A. Since the position of A has nothing to do with the rectangle, that is valid. Now the ending of the solution is obvious: there are 54 possible places for A out of which 4 fit the conditions, so the answer is 4 54 = 2 27 \frac {4}{54}=\frac {2}{27} .

I'm not sure i follow your reasoning... Can you show a diagram of the "54 possible places for A"?

C . - 2 years, 9 months ago

Log in to reply

There are 6 x 9 place to put A point,you need to look grid as points,not lines.

Bertan Turgut - 2 years, 9 months ago

Log in to reply

Oh, so all 54 points are equiprobable? Mkay, that simplifies things. :-)

C . - 2 years, 9 months ago

Excellent solution!!!

Aaron Tang - 2 years, 9 months ago

How do 4 points satisfy the conditions? Because there are 4 points in any given rectangle?

Chris Tomlin - 2 years, 9 months ago

Log in to reply

'call a point A, then pick a rectangle R at random; what's the probability a corner of R is A?'

is equivalent to

'call a rectangle R, then pick a point at random; what's the probability the point A is a corner of R?'

let's say that if the A we pick happens to be a corner of R it's a success; what's the chance of success? there are 4 success states (the four corners) and a total of 54 points to choose from, so there's a 4/54 chance of success.

Samuele Zardo - 2 years, 9 months ago

Log in to reply

But... are those really equivalent? How would you even show that? Also, in the 1st scenario, point A was known. But in the 2nd, do we know where R is? Do we call the point picked at random "A" or is "A" the point from the problem?

C . - 2 years, 9 months ago

Log in to reply

@C . Actually,in every condition this method works.The logic is true.

Bertan Turgut - 2 years, 9 months ago

@C . yeah, I'm not saying the equivalence is obvious, I just reworded the solution a Chris had a doubt about to try to clear that specific doubt.

To try answer your doubt, though, imagine drawing a rectangle, calling it R, and then putting a grid over it with 6x9 points, 4 of which are the corners of R. None of these points is called A: we call A whatever point we happen to fall on (just as we could have called R whatever rectangle we obtained by chance in the original problem).

In this case the problem fixed the point A, and asked: considering the set with all point rectangle pairs (PointsxRectangles), some pairs (A, ?) have ? such that ? has a corner in A (good A pairs), some don't. What's the ratio bewteen the good pairs with A and the total pairs with A (ratioA)?

But, if a good pair, in general, is a point-rectangle pair where the point is a corner of the rectangle, that ratio is the same as the one between good pairs an total pairs (Overall ratio, Oratio), as i'll show. Note that ratioA=ratioB, so the sum of all ratios is n(ratioA), for n points. but the sum of all ratios is also (A,RwithA)/(A, any R)+ (B, RwithB)/(B, any R)+ ..., so let' calculate it another way.

the denominators are the same number, which is (total pairs)/n. So, the numerator of the sum is the sum of the numerators, which is total number of good pairs.

So, the sum is (good pairs)/((pairs)/n)=n(good pairs)/pairs= n*Oratio.

that gives us ratioA=Oratio, and you can imagine the same argument can be made for the rectangles: ratioR=Oratio.

Therefore ratioA=ratioR, therefore fixing one or the other doesn't change the result.

I'm sure there's a simple explanation, or an explanation on the same idea simpler to read, but that's the best I could manage.

Samuele Zardo - 2 years, 9 months ago

Log in to reply

@Samuele Zardo Almost convincing, but you assume that ratioA = ratioB... Which, again, isn't necessarily obvious. :-(

But thanks for spending the time trying to clarify these things. :-bd

C . - 2 years, 9 months ago

"Specify a particular letter of the alphabet, then pick a random surname from the phone book; what's the probability that the surname begins with the chosen letter?" is not equivalent to "Select a name from the phone book, then pick a random letter of the alphabet; what's the probability that letter begins the surname"

The first probability will vary depend on the letter chosen. If you specify 'B' the probability will be greater than if you specify 'X'. The second probability is always 1/26. (For example, select the name 'Smith' and a random letter has a 1/26 chance of being S.)

You are assuming that the position of A is irrelevant to the answer. Why? It may be that if the diagram above placed A in a corner, then the probability of a random rectangle having a vertex at A would be different from the probability when A is in the more central position shown. (Even if the position of A is indeed irrelevant, this is not immediately obvious and needs to be proved.)

Paul Cockburn - 2 years, 8 months ago

I got it! First, we can prove that whatever A located in, the probability is the same. Thus the problem is equivalent to "point A is random as well as rectangle R is random". Thus the problem is equivalent to "rectangle R is fixed and point A is random". How to prove this? We can see Joseph Newton's method, the most upvoted solution.

LosAnky Raw - 2 years, 8 months ago

It supposes that the probability we are looking for is the same for any position of the point A. You would need to prove that as well!

John Smith - 2 years, 9 months ago
Bertan Turgut
Aug 28, 2018

I think you need to clarify that we consider rectangles with sides on a grid lines. It is possible to create rectangles with sides having neither horizontal nor vertical direction.

@Andy Hayes

Maria Kozlowska - 2 years, 9 months ago

Log in to reply

Thanks for comment,I get the point but this might be too hard to solve and the first idea that we get when we looked to question is "I need to calculate horizantal and vertical combinations."But thanks for the idea,interesting perspective...

Bertan Turgut - 2 years, 9 months ago

Since you said rectangles only, I calculated as you but excluded the squares, 540 -100 = 440 possible rectangles. Then out of the ones with corner point also excluded the squares. 40 - 10 = 30. So my answer is 3/44.

A Former Brilliant Member - 2 years, 9 months ago

Log in to reply

I understand,when I contributed the question;the explanation was different.In my first explanation,I mentioned about it.Nearly 3 weeks later,I think Brilliant Staff controlled the English for “Problem Of The Week”and they corrected the vocabulary mistakes.So I think,square is also a rectangle.

Bertan Turgut - 2 years, 9 months ago

Log in to reply

Okay thanks! then it is 2/27 :D

A Former Brilliant Member - 2 years, 9 months ago

If I recall, a square has all properties of a rectangle so I guess it qualifies ;)

Ni Ze - 2 years, 9 months ago
Chew-Seong Cheong
Sep 10, 2018

We note that any pair of vertical lines and any pair of horizontal lines in the grid form a rectangle. Since it is a 8 × 5 8 \times 5 grid, there are 9 vertical lines and 6 horizontal lines, and the total number of possible rectangles can be formed is N = ( 9 2 ) ( 6 2 ) = 540 N = \dbinom 92 \dbinom 62 = 540 .

By fixing A A , we fix a vertical line and horizontal line through A A for the two sides the rectangle, we can only select the remaining vertical line from the remaining 8 vertical lines and the remaining horizontal lines from the remaining 5 horizontal lines. The the number of rectangles with a vertex at A A is N A = ( 8 1 ) ( 5 1 ) = 40 N_A = \dbinom 81 \dbinom 51 = 40 .

Therefore, the probability of rectangles with a vertex at A A is p = N A N = 40 540 = 2 27 p = \dfrac {N_A}N = \dfrac {40}{540} = \boxed{\dfrac 2{27}} .

Vineet Arora
Sep 10, 2018

There are 9x6 = 54 potential vertices to create a rectangle in this box. A rectangle has 4 vertices (a square is a type of rectangle). So the probability that A is one of those is 4/54 = 2/27

This is by far the simplest and best solution. I really liked the most upvoted one, and liked it best, until I saw this.

Andrei Rotenstein - 2 years, 8 months ago
Uros Stojkovic
Sep 10, 2018

Generalization :

For n × m n\times m grid the probability is: 4 ( n + 1 ) ( m + 1 ) \dfrac{4}{(n+1)(m+1)}

A rectangle is defined by two pairs of parallel grid lines. There are ( n + 1 2 ) ( m + 1 2 ) \binom{n+1}{2} \cdot \binom{m+1}{2} of them in total.

A point A A is defined as an intersection of two perpendicular lines. It follows that the number of rectangles with vertex A A is equal to ( n + 1 1 1 ) ( m + 1 1 1 ) = n m \binom{n+1-1}{1} \cdot \binom{m+1-1}{1} = n\cdot m .

The probability is the ratio of these two quantities: n m ( n + 1 2 ) ( m + 1 2 ) = n m ( n + 1 ) n 2 ( m + 1 ) m 2 = 4 ( n + 1 ) ( m + 1 ) \dfrac{n\cdot m}{\binom{n+1}{2} \cdot \binom{m+1}{2}} = \dfrac{n\cdot m}{\frac{(n+1)n}{2}\cdot \frac{(m+1)m}{2}} = \dfrac{4}{(n+1)(m+1)}

Binky Mh
Sep 9, 2018

For a vertex to land on A A , both a horizontal line and a vertical line must land on A A .

The chance of the first chosen vertical line landing on A A is 1 9 \frac{1}{9} . For the remaining 8 9 \frac{8}{9} times where the line misses, there is now a 1 8 \frac{1}{8} chance of the second vertical line landing on A A . This gives us a 1 9 + 1 8 × 8 9 = 2 9 \frac{1}{9}+\frac{1}{8}\times \frac{8}{9}=\frac{2}{9} chance of one of the vertical lines being correct.

Similarly, the chance of a horizontal line landing on A A is 1 6 + 1 5 × 5 6 = 2 6 \frac{1}{6}+\frac{1}{5}\times \frac{5}{6}=\frac{2}{6} .

The chance of both of these conditions being true is therefore 2 9 × 2 6 = 2 27 \frac{2}{9}\times \frac{2}{6}=\boxed{\frac{2}{27}} .

K T
Sep 13, 2018

A random rectangle is selected by apppointing two different horizontal lines, and two different vertical lines. The probability that A is on one of the chosen horizontal lines is 2 6 \frac{2}{6} , the probability that A is on one of the chosen vertical lines is 2 9 \frac{2}{9} . The probability that A is on a vertex corresponds to the probability that both above conditions are met, and (since the choices of horizontal and vertical lines are independent) this is just their product: 2 6 \frac{2}{6} × 2 9 \frac{2}{9} = 2 27 \frac{2}{27} .

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include<stdio.h>

#define W 8
#define H 5
#define Ax 3
#define Ay 2

int main() {
    int count = 0;
    int countA = 0;

    for (int x = 0; x < W; x++) for (int y = 0; y < H; y++)
        for (int xx = x+1; xx <= W; xx++) for (int yy = y+1; yy <= H; yy++) {
            count++;
            if ((x == Ax || xx == Ax) && (y == Ay || yy == Ay)) countA++;
        }

    printf("%d / %d \n", countA, count);
}

Output: 40 / 540 , which we reduce to 2 / 27 \boxed{2/27} .

And what did this program print?

C . - 2 years, 9 months ago

Log in to reply

It printed 40 / 540 , which of course reduces to 2 / 27 \boxed{2/27} .

(I typed that in my solution, but for some reason Brilliant does not display text after a code block in the solutions.)

Arjen Vreugdenhil - 2 years, 9 months ago

Log in to reply

Oh, i see it now. It's still there, but hidden behind the code! You can see it by using the "expand" button in the top-right of the code. I guess a dirty workaround is to add more line breaks between the code and the text following it?

C . - 2 years, 9 months ago

Arjen -- Is that written in C ?

Jesse Otis - 2 years, 8 months ago

Log in to reply

Yes, this is traditional C.

Arjen Vreugdenhil - 2 years, 8 months ago

Log in to reply

Thanks. I thought that it looks familiar - but wasn't sure. Have you dabbled with C# ?

Monty McGee - 2 years, 8 months ago

Log in to reply

@Monty McGee No, I have worked with C++ and Java, but not with C#.

Arjen Vreugdenhil - 2 years, 8 months ago
Richard Delwiche
Sep 14, 2018

There are 6 horizontal lines where two sides of the rectangle may lie, so 1 / 3 1/3 may have a vertex on A. Of these 2 / 9 2/9 verticals will have a vertex on A. So the probability will be 1 / 3 2 / 9 = 2 / 27 1/3 * 2/9 = 2/27 .

This is the solution I used. There is no need to count the ways to choose the lines. If we assume that the random distribution is such that each horizontal line is chosen as frequently as any other horizontal line, all we need to know is the relative density of chosen lines, 2/6. Same applies to vertical lines, 2/9.

Tapani Lindgren - 2 years, 7 months ago
Matt Maloney
Sep 13, 2018

It doesn't matter the shape or layout of the 4 selected vertices. There are 54 (9 * 6) potential vertex points, and there are always 4 chosen vertices. 4/54 = 2/27.

This is even simpler than the solution I used. If a rectangle is defined by its vertices, and we have a random distribution where each such rectangle is equally likely, then each point in the grid is equally likely to be a vertex.

Of course there are many ways to skim the cow. For example, we could have a random distribution where each possible width and height of the rectangle were equally likely. This would favor the points near the extremities of the grid. The choice of the random variables does matter.

Tapani Lindgren - 2 years, 7 months ago
Farzeen H
Sep 15, 2018

Here's how i found the answer without actually solving it. I counted the number of possibilities in the sample space (9x6=54) and found the denominator from given options which is a multiple of 54.

Prem Chebrolu
Sep 12, 2018

I just made a guess, I only know that the total number of rectangles in the figure is 540... So, we need to find the probability of a rectangle having vertex A A ,

\therefore , it is obvious that the denominator should be 540 540 .. and in the options the only number which is a factor of 540 is 27!

Hence, the answer is 2 27 \frac{2}{27} !

Michael Zheng
Sep 12, 2018

The total number of rectangles is ( 9 2 ) {9}\choose{2} × \times ( 6 2 ) {6}\choose{2} .

The number of rectangles with vertex A can be divided up into 4 sections.

For each section we only have to count the different possible opposite corners:

Section 1: 3 3 × \times 2 2 = = 6 6 . Section 2: 5 5 × \times 2 2 = = 10 10 . Section 3: 3 3 × \times 3 3 = = 9 9 . Section 3: 5 5 × \times 3 3 = = 15 15 .

Adding those up and dividing them by the to total number of rectangles gives up the answer:

Jam M
Sep 11, 2018

There are ( 6 2 ) × ( 9 2 ) = 5 × 6 × 8 × 9 4 = 540 \binom{6}{2} \times \binom{9}{2} = \dfrac{5 \times 6 \times 8 \times 9}{4} =540 sub-rectangles in the given 8 × 5 8 \times 5 grid of which 40 40 sub-rectangles have A as a vertex. As such, the desired probability is 40 540 = 2 27 \dfrac{40}{540} = \dfrac{2}{27} .

Ervyn Manuyag
Sep 11, 2018

(2x2)/(9x6)=2/27

John Norman Beren
Sep 11, 2018

For you to be able to draw a rectangle from a grid, you need 2 parallel vertical and horizontal lines. So to get the total number of rectangles you can draw in an 8x5 grid, you can choose 2 from 9 vertical lines and 2 from 6 horizontal lines. Thus, ( 9 2 ) \binom 92 x ( 6 2 ) \binom 62 = 36 x 15 = 540.

You can separate the 8x5 grids into four quandrants setting point A as the origin. Here you will be able to create 4 smaller grids (3x2, 5x2, 3x3 and 5x3). To make sure that the vertex of the rectangle falls on point A, you can set the vertical and horizontal line already passing at point A. This means that for the 3x2 grid, you only get to choose 1 from the 3 remaining vertical lines and 1 from the 2 remaining vertical lines. Thus, ( 3 1 ) \binom 31 x ( 2 1 ) \binom 21 = 3 x 2 = 6. Applying to the other grids, you obtain 10, 9 and 15 respectively.

Thus, the probability the rectangle has a vertex at point A is 6 + 10 + 9 + 15 540 \frac{6+10+9+15}{540} = 2 27 \frac{2}{27} .

Ossama Ismail
Sep 10, 2018

Alexandr Baklanov
Sep 10, 2018

The probability of random rectangle is touching vertex A by any of its vertices is 1/(6x9) = 1/54. Since every rectangle has 4 vertices, the probability is 4/54 => 2/27.

Vinod Kumar
Sep 10, 2018

Answer = 40/540

Zain Majumder
Sep 9, 2018

The total number of rectangles with the top left being the first square on the grid is 8 × 5 8 \times 5 . The total number of rectangles with the top left being the second square on the grid is 7 × 5 7 \times 5 . This pattern continues, so the total number of rectangles with the top left being on the first row of the grid is 8 × 5 + 7 × 5 + 6 × 5 + . . . 1 × 5 = 5 × ( 8 + 7 + 6 + . . . + 1 ) 8 \times 5 + 7 \times 5 + 6 \times 5 + ... 1 \times 5 = 5 \times (8+7+6+...+1) .

The same logic can be applied to the second row, but the column length is four instead of five, so the total number of rectangles with the top left being on the second row of the grid is 4 × ( 8 + 7 + 6 + . . . + 1 ) 4 \times (8+7+6+...+1) . The pattern continues, so the total number of rectangles is 5 × ( 8 + 7 + 6 + . . . + 1 ) + 4 × ( 8 + 7 + 6 + . . . + 1 ) + 3 × ( 8 + 7 + 6 + . . . + 1 ) + . . . + 1 × ( 8 + 7 + 6 + . . . + 1 ) = ( 5 + 4 + . . . + 1 ) ( 8 + 7 + 6 + . . + 1 ) = ( 5 × 6 2 × 8 × 9 2 = 15 × 36 5 \times (8+7+6+...+1) + 4 \times (8+7+6+...+1) + 3 \times (8+7+6+...+1) + ... + 1 \times (8+7+6+...+1) = (5+4+...+1)(8+7+6+..+1) = (\frac{5\times 6}{2} \times \frac{8\times 9}{2} = 15 \times 36 .

If any square is chosen on the grid, a unique rectangle can be created with A A and that square being opposite corners of the rectangle. Therefore the total number of rectangles with point A A as a vertex is 8 × 5 = 40 8 \times 5 = 40 .

The total probability, therefore, is 40 15 × 36 = 2 27 \frac{40}{15 \times 36} = \boxed{\frac{2}{27}} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...