Context: MCA / Library Reading Assignment
Book Review: By Aditya Gopalakrishnan
Book: Art of Computer Programming: Donald E Knuth
Random numbers are actually nothing but pseudo random numbers i.e. a sequence of numbers in which any particular number does not have any correlation with its predecessor. However, a machine being capable of executing only finite sequence of operations, can never generate truly random numbers.
They have a huge number of applications - from lotteries to casinoes to helping executives make decisions.
There are many ways of generating random numbers - e.g. by squaring an n digit number and then taking the next number as its middle n digits. E.g. 35^2 = 1225, thus the next number is 22. Then, 22^2 is 484, thus the next number is 48. 48^2 is 2304, so the next number is 30 giving the sequence
35,22,48,30,90,......
This, though not the best is still quite a random looking sequence.
2 questions which I wanted to ask which the book prompts are :
Q.1. If there are a sequence of a million digits, what are the chances that all occur exactly 100000 times? Further, what is it that a sequence should have for you to consider it truly random?
Q.2. What is the successor of 10101010 by the middle square method? And it's successor?
No comments:
Post a Comment