Exercise 3
Random Experiments, Pre-Image, Collision
Generate random numbers between and for a given upper limit in any programming language, until …
-
a predefined value is output (simulates pre-image)
-
a value is output that matches one of the previously generated values (simulates collision)
Count the number of generated numbers until the event occurs.
Verify by averaging the experiments that for …
-
on average numbers need to be generated
-
on average approximately numbers need to be generated