Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Random Algebra

Name: Anonymous 2016-08-05 16:07

Given functions
f(a,b) = random(a) < random(b)
and
g(a,b) = a < random(a+b)

which if of them is more likely to result into 1, if random(n) returns arbitrary number in range of [0;n)?

Justify your answer.

Name: Anonymous 2016-08-05 20:12

Suppose a < b, what is the probability that random(a) < random(b)?

First let x < b, then the probability x < random(b) is (b-x)/b = 1 - x/b

So summing over all possible values of x uniformly, probability = 1/a integral x = 0 to a, 1 - x/b dx = a^2/a (1 - 1 / b)

idk?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List