All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
points or pigeons in square? (Posted on 2019-08-05) Difficulty: 2 of 5
Given 5 points inside a square of side 10 cm, what is the probability that at least two of the points are within 8cm of each other?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
computer soln | Comment 1 of 8
For me this is easier by simulation, although to do it analytically is 
tractable and would be fun. I get the probability to be about 0.442. 

I wonder if this problem is equivalent to asking this question: "If you connect two random points and do this 10 times, what are the chances that two or more distances will be >8?" I think it is the same. 

(Later....) I answered my own q. - The answer is no. The prob. that 2 or more of 10 random line segments are longer than 8 cm is about 0.455. Distinctly larger probability. This makes the analytic path a bit more complex...

 exp = 6 below means 10^6 random cases.

 exp prob            5  0.442479998    

 exp prob            6  0.441929996    

 exp prob            7  0.442253202    


        program sq5

        implicit none

        integer seed,pa(2,10),flag,i,j,exp,big,cntng

        real x(5),y(5),dx2,dy2,d,prob,xbig

        data pa/1,2,1,3,1,4,1,5,2,3,2,4,2,5,3,4,3,5,4,5/

        seed=time8()

        call srand(seed)

1       print*,'exp?'

        read*,exp

        big=10**exp

        xbig=big

        if(exp.eq.0)stop

        cntng=0

           do i=1,big

                do j=1,5

                x(j)=10*rand()

                y(j)=10*rand()

                enddo

           flag=0

                do j=1,10

                dx2=(x(pa(1,j))-x(pa(2,j)))**2

                dy2=(y(pa(1,j))-y(pa(2,j)))**2

                d=dx2+dy2

                   if(d.ge.64)then

                   if(flag.eq.1)go to 2

                   flag=1

                   endif

                enddo

           cntng=cntng+1

2          enddo

        prob=(xbig-cntng)/xbig

        print*,'exp prob ',exp,prob

        go to 1

        end


Edited on August 5, 2019, 12:22 pm
  Posted by Steven Lord on 2019-08-05 11:04:11

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information