Random Numbers RANDOM VS PSEUDO RANDOM. Truly Random numbers  From Wolfram: “A random number is a number chosen as if by chance from some specified distribution.

Slides:



Advertisements
Similar presentations
Spread Spectrum Chapter 7. Spread Spectrum Input is fed into a channel encoder Produces analog signal with narrow bandwidth Signal is further modulated.
Advertisements

Order Analysis of Algorithms Debdeep Mukhopadhyay IIT Madras.
1 Chapter 8 Objects and Classes Lecture 2 Prepared by Muhanad Alkhalisy.
Generating Random Numbers
Random Number Generation Graham Netherton Logan Stelly.
Random variables 1. Note  there is no chapter in the textbook that corresponds to this topic 2.
Random Number Generation. Random Number Generators Without random numbers, we cannot do Stochastic Simulation Most computer languages have a subroutine,
Lecture 7: Spread Spectrum
BAYESIAN INFERENCE Sampling techniques
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Random Sources.
Alice in Action with Java Chapter 5 Random Numbers.
FIN 685: Risk Management Topic 5: Simulation Larry Schrenk, Instructor.
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
Lecture 14 Go over midterm results Algorithms Efficiency More on prime numbers.
1 Random Number Generation H Plan: –Introduce basics of RN generation –Define concepts and terminology –Introduce RNG methods u Linear Congruential Generator.
Random Numbers Dick Steflik. Pseudo Random Numbers In most cases we do not want truly random numbers –most applications need the idea of repeatability.
Pseudorandom Number Generators
Programming Assignment 8 CS113 Spring Programming Assignment 8 Implement the sorting routine of your choice. Compare average performance of your.
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
Repetition Structures: Do-while Loop Random Number Generation CSC 1401: Introduction to Programming with Java Week 6 Wanda M. Kunkle.
1 Random numbers Random  completely unpredictable. No way to determine in advance what value will be chosen from a set of equally probable elements. Impossible.
1 Chapter 7 Generating and Processing Random Signals 第一組 電機四 B 蔡馭理 資工四 B 林宜鴻.
APPENDIX D RANDOM NUMBER GENERATION
Genome Sciences 373 Genome Informatics Quiz Section 9 May
15-853Page :Algorithms in the Real World Generating Random and Pseudorandom Numbers.
1 Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1, 5.6.
Pseudorandom Number Generators. Randomness and Security Many cryptographic protocols require the parties to generate random numbers. All the hashing algorithms.
Random Number Generation Pseudo-random number Generating Discrete R.V. Generating Continuous R.V.
ETM 607 – Random Number and Random Variates
Random Number Generators CISC/QCSE 810. What is random? Flip 10 coins: how many do you expect will be heads? Measure 100 people: how are their heights.
Random Numbers CSE 331 Section 2 James Daly. Randomness Most algorithms we’ve talked about have been deterministic The same inputs always give the same.
Random-Number Generation Andy Wang CIS Computer Systems Performance Analysis.
CPSC 531: RN Generation1 CPSC 531:Random-Number Generation Instructor: Anirban Mahanti Office: ICT Class Location:
Chapter 7 Random-Number Generation
Modeling and Simulation Random Number Generators
Random Number Generators 1. Random number generation is a method of producing a sequence of numbers that lack any discernible pattern. Random Number Generators.
Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Experimental Method and Data Process: “Monte Carlo Method” Presentation # 1 Nafisa Tasneem CHEP,KNU
1 Building Java Programs Chapter 5 Lecture 5-2: Random Numbers reading: 5.1, 5.6.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
Pseudo Randomness (in digital system) PRESENTED BY GROUP 8 SHU-YU HUANG, FONG-JHENG LIN
Nicholas Bulinski.  Informally it is the question of if a computer can quickly verify that a solution to a problem is true then can the computer solve.
CS 615: Design & Analysis of Algorithms Chapter 7: Randomized Algorithms (Weiss Chap.: 10.4)
Let’s not leave anything to chance. How that process to generate random numbers takes places requires some complicated statistics that are outside the.
Effective C# Item 10 and 11. Understand the Pitfalls of GetHashCode Item 10.
CS 115 Lecture 9 Augmented assignment; Boolean logic; random numbers Taken from notes by Dr. Neil Moore.
Module 9.2 Simulations. Computer simulation Having computer program imitate reality, in order to study situations and make decisions Applications?
Chapter 3 Generating Uniform Random Variables. In any kind of simulation, we need data, or we have to produce them. Especially in Monte Marco simulation.
1 Building Java Programs Chapter 5 Lecture 11: Random Numbers reading: 5.1, 5.6.
Introduction to programming in java Lecture 16 Random.
Why they aren't really random
Building Java Programs
Python Random numbers Peter Wad Sackett.
Generating Random Numbers
Random Numbers Until now, all programs have behaved deterministically - completely predictable and repeatable based on input values Some applications.

Random numbers Taken from notes by Dr. Neil Moore
Development of Inter-model differences
Random numbers What does it mean for a number to be random?
Random Number Generation
Random-Number Generation
Pseudo-random numbers
Random vs pseudo random
Lecture 2 – Monte Carlo method in finance
Building Java Programs
Python Random numbers Peter Wad Sackett.
CS150 Introduction to Computer Science 1
Computer Simulation Techniques Generating Pseudo-Random Numbers
4-9问题的形式化描述.
Building Java Programs
Presentation transcript:

Random Numbers RANDOM VS PSEUDO RANDOM

Truly Random numbers  From Wolfram: “A random number is a number chosen as if by chance from some specified distribution such that selection of a large set of these numbers reproduces the underlying distribution. Almost always, such numbers are also required to be independent, so that there are no correlations between successive numbers”  Another word that characterizes true randomness is unpredictability. Natural phenomenon is our best known source of random values.  Examples of natural phenomena producing truly random values are radioactive decay, atmospheric noise, background radiation, and turbulence.

Pseudo Random Numbers  Pseudo random numbers are number produced by an algorithm that appear unpredictable, uncorrelated and when produced in sequence form a distribution that is representative of the underlying distribution.  Computers generate pseudo random numbers very easily and efficiently. To humans a well implemented algorithm will produce a sequence of pseudo random numbers that look unpredictable, uncorrelated and distributed fairly evenly from among the set of all possible integers that the computer can represent, for example in Java, -2 billion to +2 billion.  Pseudo random numbers are extremely useful in all fields of science where “realistic” sequences of random values are needed.

Java’s Random generates pseudo random numbers.

Each call to nextInt() returns the next number from the sequence

.nextInt() vs.nextInt( modulus )

I want a random number between LO and HI inclusive

I want a random number between 0 and 1 or 1 and 6

Seeding the Random number generator

Output created by a SEEDED random number generator

Same code BUT with NO SEED in the initialization of generator

Now the sequence is different every time you run the program