BigMoosie Posted August 28, 2005 Posted August 28, 2005 If I have x number of balls in a lottery, how many times will I have to draw a ball at random and replace it before I draw a ball that has already been drawn once before? I developed an algorithm to solve this, I think it works, not entirely sure. But I was wondering how to solve it algebraicly, here is my algorithm: t = number of balls in lottery x = 1 n = 0 while (x>0.5) { n = n + 1 x = x * (t - n + 1) / t } Answer = n
matt grime Posted August 28, 2005 Posted August 28, 2005 the question is badly worded. and the answer is x+1 if we assume you mean "have to draw a ball that has been drawn before". obviously, by the pigeon hole principle in x+1 draws there is at elast one repetition, and in x draws it is possible to get each balle xactly once. however, you might mean "draw with probability freater than 1/2 a balll that has been drawn before, and that is a simple exercise in probability (geometric i think).
BigMoosie Posted August 28, 2005 Author Posted August 28, 2005 Yes, sorry matt. You are right, drawn with a probabilitiy greater than half. Would you care to show me how you would solve this?
matt grime Posted August 29, 2005 Posted August 29, 2005 what is the probablitly that after n draws you have n different things?
BigMoosie Posted August 29, 2005 Author Posted August 29, 2005 [math]\frac{n!}{n^n}[/math] But how does that help? EDIT: OK, perhaps this is better, but I how would I then solve for n? [math]\frac{t!}{t^n.(t-n)!}<0.5[/math]
BigMoosie Posted September 1, 2005 Author Posted September 1, 2005 that is a simple exercise in probability (geometric i think). Is it harder than you realised or have you moved on?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now