Results 1 to 1 of 1
- 09-09-2012, 07:36 PM #1Member
- Join Date
- Jul 2011
- Rep Power
How many double objects on a tile
Say I had 400 tiles (20 x 20) and 50 objects. If I put these objects RANDOMLY on the 20x20 tiles. What is the chance that I have atleast 2 objects that are placed on the same tile?
What I did was in a double for loop, I counted the amount of random generated objects. If I got an amount of 2 duplicates, I would divide this by 400 and then multiply it by 100 so I would get for example here: 0.5%.
Is this correct?
- By Lundager in forum Java 2DReplies: 5Last Post: 05-19-2012, 09:09 PM
- By DrCooksAlot in forum New To JavaReplies: 8Last Post: 01-25-2012, 04:12 PM
- By sgthale in forum Java AppletsReplies: 9Last Post: 06-17-2011, 12:20 PM
- By snozzla in forum New To JavaReplies: 3Last Post: 03-02-2011, 01:06 PM
- By GrInd3r in forum New To JavaReplies: 0Last Post: 12-08-2010, 06:18 PM