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

Home > Probability
Four Points in a Square (Posted on 2023-01-12) Difficulty: 4 of 5
Four points are chosen at random inside a square. Each point is chosen by choosing a random x-coordinate and a random y-coordinate.

A convex quadrilateral is drawn with the the four random points as the vertices.

Determine the probability that the center of the square is inside this quadrilateral.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Code for sanity check | Comment 9 of 10 |
(In reply to re: Sanity check on classification -- last part got cut off by Charlie)

This was placed in the various spots of classification:


      outgrid=repmat('.',60,100);
      y1=round((y+1)*30)+1; x1=round((x+1)*50)+1;
      for i=1:4 
       outgrid(y1(i),x1(i))='*';
      end
      outgrid(30,50:51)='xx';
      outgrid(31,50:51)='xx';
      disp(outgrid)
      disp(' ')

The + 1's were to prevent index of zero, which is not allowed in Matlab, so this is another aspect of the coarseness of the grid and rounding error.

  Posted by Charlie on 2023-01-13 08:35:34
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 (5)
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