Jump to content

Welcome to BrainDen.com - Brain Teasers Forum

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 :-)
Guest Message by DevFuse

Anza Power

Member Since 18 May 2012
Offline Last Active Oct 16 2013 11:12 PM

Topics I've Started

[0,1] to (0,1)

17 September 2013 - 10:39 PM

Find a one-to-one and on mapping from the closed segment [0,1] to the open segment (0,1).

Random Number API - Part 3...

08 August 2013 - 09:27 PM

Even though Part 2 we still don't know in case of irrational numbers,, we continue.


Same as last time, except this time I'm allowing you to choose a descrete generator over an infinite range, for example a Poisson random variable, can you choose one thatyou can use to generate something with probability of 1/n where you can guarantee the number of times you'll need it beforehand?



Random Number API - Part 2...

06 August 2013 - 07:01 PM

You must solve Part 1 before reading this one.


Ok so we saw that a uniform binary number generator (fair coin) isn't good for us when we want to generate stuff with probability 1/n where n isn't a power of 2.


So instead of a [0.5 , 0.5] generator, I am allowing you to customize your own random generator, namely you choose some k>1 and give me {p1...pk} and I will give you a random number generator that generates numbers between 1 and k with those probabilities.


What kind of generator do you choose and how will you use it to generate numbers with probability 1/n?


(note again I ask that your algorithm guarantee not to run for ever, as in for every n exists M such that you use the customized generator at most M times)

Random Number API - Part 1...

05 August 2013 - 11:08 PM

You are a programmer, you want to make a function rand(n) that takes an integer n>1 and returns a random integer in the range {1...n} with uniform probability.


At you disposal is a binary random number generator which generates 0's and 1's with equal probability (a fair coin) you can use it as many times as you want.


Can you do this and guarantee your program won't run forever?

Divisor Take-Away Game 2

01 August 2013 - 08:57 PM

This is a continuation on BMAD's Divisor Take-Away Game.


Ok so same rules as before, assume that N>d:


  1. If d=2, which player has the winning strategy given N?
  2. If d=3, which player has the winning strategy given N?
  3. What is the general rule for arbitrary N and d?