0
   

A pen is falling on a notepad

 
 
Reply Wed 14 Jan, 2015 09:01 am
I would like to solve the following problem:

A rectangle of area A is drawn in the middle of a notepad of area B. If I randomly let a pen , which we will assimilate to a rectangle of area C (B >> C > A), fall from the top of the notepad, what is the probability that the pen touches the rectangle of area A when it lands. In other words, what is the probability that the rectangles of area A and C at least partly overlap?

I came up with a solution using coordinates and integrals, but I am convinced that there must exist a solution which does not involve complicated maths.

I would greatly appreciate your help !
Thanks in advance!
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 901 • Replies: 13
No top replies

 
maxdancona
 
  2  
Reply Wed 14 Jan, 2015 09:19 am
@arthur99,
Your question isn't clear. Could you tell me what the word "assimilate" means in this context?
arthur99
 
  1  
Reply Wed 14 Jan, 2015 09:23 am
@maxdancona,
What I mean by "assimilate" is that we can suppose that since a pen is of rectangular shape (sort of), I am assuming that the pen is a rectangle. You may replace "assimilate" with "equate".

Thanks for asking, I am happy to clarify.
Ragman
 
  1  
Reply Wed 14 Jan, 2015 11:01 am
@arthur99,
A pen is a cylindrical shape - NOT a rectangle at all.
markr
 
  1  
Reply Wed 14 Jan, 2015 07:05 pm
@Ragman,
One projection of a cylinder onto a plane is a rectangle.
0 Replies
 
markr
 
  1  
Reply Wed 14 Jan, 2015 07:14 pm
@arthur99,
1. Is C constrained to lie wholly within B?
2. Are the sides of A parallel to the sides of B?
3. May the sides of C not be parallel to the sides of B?

I think dimensions are more relevant than area. If the answers to 1 and 3 are yes, then an extremely thin C (very small area) that is roughly as long as the diagonal of B will always overlap with (even a very small) A.
arthur99
 
  1  
Reply Thu 15 Jan, 2015 12:28 am
@markr,
Thanks for your interest!
1. Yes
2. Yes
3. Yes

I agree with your analysis, if C is roughly as long as the diagonal of B. But what if B is much larger than C? What if, instead of a notepad, the pen falls randomly on a table?
Just a side note related to question 1: I am not very interested with the edges (what happens if the pen falls on the side of the notepad and so on...)
engineer
 
  1  
Reply Thu 15 Jan, 2015 06:15 am
@arthur99,
Why don't you assume that the pen forms a line segment of length L instead of a rectangle. Then the problem is what is the chance that a random line segment of length L fully contained in area B contacts area A.
arthur99
 
  1  
Reply Fri 16 Jan, 2015 06:55 am
@engineer,
And how would I calculate such a probability? I am genuinely asking.
markr
 
  1  
Reply Fri 16 Jan, 2015 12:38 pm
@arthur99,
That would simplify things, but I don't see how you're going to avoid integrals. Relaxing the "C wholly contained in B" constraint will also simplify things. Otherwise, you get into issues defining a uniform distribution near the borders of B.

My approach would probably be a double integral over x and y: (x,y) is the center of C. The function that is integrated provides the probability (fraction of 180 degrees) of intersecting A. Divide the result by the area of B. Otherwise, a triple integral over x, y, and theta where the integrated function yields zero or one. This changes the above-mentioned constraint to "the center of C is contained in B." I believe this will give you a uniform distribution.
0 Replies
 
engineer
 
  1  
Reply Fri 16 Jan, 2015 12:51 pm
@arthur99,
Here's how I would do it. (Might not be the easiest way.) Let's first consider your original problem of two rectangles in a larger rectangle. If I reduce it to one dimension, the problem becomes if I have two line segments L1 and L2 on a longer segment L, what is the probability that the two segments do not interact. If we assume the first segment starts at point x, the probability P that the second segment will not interact with the first segment is

P = (x-L2)/(L-L2)

To find the total one dimensional probability for all values x, integrate P over the range L2 to L-L1 and divide the result by (L-L1) which is the range for possible x's. (For x<L2, the probability is zero, x cannot be greater than L-L1 since the first segment must fit in the overall length.)

This is a simple integration leaving you with

Code: (L^2/2 + L1^2/2 + L2^2/2 - LL2 - LL1 + L1L2)
--------------------------------------------------
(L-L1)(L-L2)


This is the probability that segment two is to the left of segment one. The probability that segment one is to the left of segment two yields the same result and is mutually exclusive, so the total probability that the X axis segments do not overlap is 2x this equation or:

Code: (L^2 + L1^2 + L2^2 - 2LL2 - 2LL1 + 2L1L2)
P = ---------------------------------------------
(L-L1)(L-L2)


Now that you have the one dimensional solution, you need the two dimensional solution. In order for the two rectangles to have an overlap, they must overlap on both the X and Y axes. So you use the above equation on both axes and take Pt = 1 - (1-Px)(1-Py)

Now for the variable pencil. The probability for the pencil will change depending on how it falls. The L2x and W2y (width on the other axis) values for the pencil are Lp (length of pencil) cos(angle) and Lp sin(angle). If you integrate the total probability function over 0 to 2pi and divide by 2pi you can get the total probability.
engineer
 
  1  
Reply Fri 16 Jan, 2015 01:33 pm
@engineer,
Note that the derivation assumes that it is possible to have no overlap. If L1+L2 > L, the formula will give you a probability but the true probability is zero.
0 Replies
 
markr
 
  1  
Reply Fri 16 Jan, 2015 02:00 pm
@engineer,
In the last paragraph, are you projecting the rotated rectangle (pen) onto the x-axis and the y-axis and checking for x overlap and y overlap with the static rectangle?

If so, won't that conclude that these overlap (assume the diamond is a rectangle rotated 45 degrees)?

Code:
/\
/ \
/ \
/ \
/ \
\ /
\ /
\ /
-------- \ /
| | \/
| |
| |
--------
engineer
 
  1  
Reply Fri 16 Jan, 2015 02:08 pm
@markr,
Yes, you are right. My solution works for rectangles but the pencil could fall such that the rectangle made by it conflicts but the actual pencil does not. If the pencil falls at the bottom portion of your diamond and falls up to the left, my equation would say that conflicts when it clearly doesn't. Good catch.


Darn.
0 Replies
 
 

 
  1. Forums
  2. » A pen is falling on a notepad
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/01/2024 at 05:26:55