Say we want to simulate an N sided die.
Jump to content
|Welcome to BrainDen.com - Brain Teasers Forum. Like most online communities you must register to post in our community, but don't worry this is a simple free process. To be a part of BrainDen Forums you may create a new account or sign in if you already have an account.
As a member you could start new topics, reply to others, subscribe to topics/forums to get automatic updates, get your own profile and make new friends.
Of course, you can also enjoy our collection of amazing optical illusions and cool math games.
If you like our site, you may support us by simply clicking Google "+1" or Facebook "Like" buttons at the top.
If you have a website, we would appreciate a little link to BrainDen.
Thanks and enjoy the Den :-)
Posted by gavinksong on 09 April 2015 - 03:09 AM
Say we want to simulate an N sided die.
This splits the probability space into:
- 2M "large" outcomes of probability (1/2M)(1-1/N) and
- 2M "small" oucomes of probability (1/2M)(1/N)
We have to assign these outcomes to the faces of the die such that the probability of each face sums to 1/N. Notice that all of the above outcomes have a common denominator of N*2M.
To simplify the problem, let's pretend that we're actually assigning balls to bins, where each of N bins can hold 2M units of space, each of 2M large balls take up N-1 units of space, and each of 2M small balls take up 1 unit of space.
Since K*(N-1) < 2M for some K, we can first assign K large balls into each of the first N-1 bins without running out of large balls or overflowing the bins. Since 2M - K*(N-1) < K, we can throw the remaining 2M - K*(N-1) large balls into the last bin without overflowing it. Finally, we can fill out the remaining space in the bins with the 1-unit balls.
Posted by gavinksong on 13 March 2015 - 04:30 AM
Posted by gavinksong on 13 March 2015 - 04:23 AM
"Composite" refers to the number having at least two distinct positive integer divisors.
Actually, that's not quite true as 1 is also a positive integer divisor.
Composite really just means "not prime".
Posted by gavinksong on 12 March 2015 - 01:13 PM
"I'm getting quite a collection of bonanova stars. (emoticon with big grin)
Well, if you don't toot your own horn, others probably won't come along and do it for you.
Someone should send you some ointment to put on your back where you have been frequently patting it.
My sincerest apologies to Perhaps check it again for offending his fragile sensibilities. My colon-D resulted in a goofier-looking grin than I had intended. In the future, I will make a better effort to contain my raging inner narcissist.
As a token of apology, I'd like to share some of my ointment with Perhaps check it again as he has no doubt developed some of his own abrasions after making that devastatingly witty comment of his.
Posted by gavinksong on 11 March 2015 - 02:43 PM
I'm getting quite a collection of bonanova stars.
Posted by gavinksong on 15 February 2015 - 08:00 PM
Spoiler forweigh two bottles from one box against one each from the other two. The three possible outcomes - lighter/equal/heavier tell you which type they are. Example: the densities are 3 4 5. 3+3 < 4+5. 4+4 = 3+5. 5+5 > 3+4.
Close, but TSLF said that there can be only one bottle in each pan.
I'm going to have to steal the correct answer from you.
Posted by gavinksong on 23 October 2014 - 12:25 PM
This is incorrect because the minimum requirement only advances three months at a time. It does not suddenly jump forward by a year.
Spoiler for One key to this puzzle is that a person does not necessarily apply for a bus pass the day they reach the retirement age.Let the younger person apply for a bus pass on the same day he reaches 66, and this day happens immediately before the day the minimum age becomes 67. On that same day, let the older person be two days shy of 67. On the subsequent day, the older 66-year-old would not be permitted to apply for a bus pass, as the minimum age would be 67, and he would still be shy by 1 day. Thus, the answer is D, the younger would be just under 1 year younger and have a free bus pass, while the elder could not get one (until the next day).
Posted by gavinksong on 23 October 2014 - 12:19 PM
Posted by gavinksong on 23 October 2014 - 11:13 AM
Posted by gavinksong on 16 October 2014 - 05:27 PM
Posted by gavinksong on 13 July 2013 - 12:08 PM
This also reminds me of this (Concave and Convex by MC Escher):
Community Forum Software by IP.Board 3.4.7
Licensed to: BrainDen