You are on page 1of 15

2023

Random number generation


● ●

SUBMITTED TO: PERSENTED BY:


ABHISHEK SIR
ANITA MAM
JAYANT

www.naruto.com
Outline:-
 What is Random number?
 Application of Random number
 True Random numbers
 True Random numbers generation
 Pseudo random numbers
 Pseudo random numbers generation
 Mid Square algorithom
What is Random number
A random number is a number generated by a process, whose outcomes
is unpredictable, and which cannot be subsequentially reliably reproduced.

Example: The number is a number of arriving in a shope daily is arandom


number.
Application of Random numbers
 Science & Technology
 Art & Creativity
 Gaming
 Gambling
 Cryptography and security
 Various other fields
Application in Science & Technology
 Statistical analysis ,Mordern-day computer stimulations
 Artificial Intelligence
 Quantum Randomness

Application in Art & Creativity


 Role in procedural content generation
 Creative applications in digital art and music
Application in Gaming and Gambling
 Fairnes in game mechanics
 Random numbers and card
 Random location in game
Application in cryptography and security
 Cryptographic applications requirinig ramdomness
 Randomized alorithms in Cryptography to enhance
resistance against attacks
 random numbers to create secure encription keys
Techniques of True Random Number Generation
(Physical method)
 Throw dices
 Deal out cards
 Use digits of π
 Spinining disc
 Electric circuits
 counting gamma rays
Pseudo Random Number Generation(PRNG)
As the word ‘Pseudo’ suggest,pseudo-random numbers are not random
in the way you might expect,at least not if you’re used to dice rolls or
lottery tickets.

Essntialy, PRNGs are algoritham that use mathematical formulas or simply


precalculated tables to produce sequence of number that appear random.
Pseudo Random Number Generation(PRNG)
Important properties of good random number generation:
 Fast
 Poptable to different comuters and programming software
 Have sufficiently long cycle
 Replicable
 Use identical stream of random numbers for different system
(parallel computing)
Closely approximate the ideal statistical properties of
 uniformaly and
 independence
Pseudo Random Number Generation(PRNG)
There are many techniques to generate Pseudo random numbe. The
following shall be discussed in detail.

• Mid-Square algoritham
• linear Congruetial Generation(LCG)
Mid Square method(PRNG)
It was given by John Von Neumann and Metropolis in 1940s.

Algoritham:
 Take any integer (seed) of say a two-digit number.
 Square it and pick the middle two digit and discard the rest.
 Now again square the selection middle two digits in the previous step.
 Repeat.
Example:
linear Congruetial Generation(LCG)

Use in simulation and cryptography.


Formula: SEED= (a(initial seed)+b)mod c where a,b,c are constant.

let a=5,b=2,c=123 and initial seed=73


Seed1=(5(73)+2)mod123 = 367mod123=121
Seed2=(5(121)+2)mod123 = 607mod123=115
Seed3=(5(115)+2)mod123 = 577mod123=85
Seed4=(5(85)+2)mod123 = 427mod123=58
......
THANK
YOU

You might also like