Stochastic Simulation of

Size: px
Start display at page:

Download "Stochastic Simulation of"

Transcription

1 Stochastic Simulation of Communication Networks -WS 2014/2015 Part 2 Random Number Generation Prof. Dr. C. Görg VSIM 2-1

2 Table of Contents 1 General Introduction 2 Random Number Generation 3 Statistical i Evaluation 4 ComNets Class Library (CNCL) 5 OPNET 6 network simulator (ns) 7 SDL 8 Simulation Speed-Up Methods Prof. Dr. C. Görg VSIM 2-2

3 Random Number Generators Stochastic simulation experiments require random number sequences: x 1, x 2, x 3,... of a random variable X Requirements: Distribution Correlation Length of sequence -... Ideas? Which random number generators do you know? How can random numbers be generated? Prof. Dr. C. Görg VSIM 2-3

4 Random Variables: Discrete: Dscrete Uniform uniform(n,k)... Continuous: Examples Uniform: uniform(a,b) Negative Exponential: negexp(λ) Erlang-k: erlang(k,λ) Normal: normal(μ,б) Pareto: pareto(...)... Types of generators? Prof. Dr. C. Görg VSIM 2-4

5 Techniques & Issues Pseudo random numbers Based on an independent d continuous uniform distribution uniform(0,1) Special techniques Physical random numbers Table generators Correlation: Independent random numbers (Defined) Correlated random numbers Prof. Dr. C. Görg VSIM 2-5

6 Base Generator - uniform(0,1) Requirements: Continuous Independent Uniformly distributed Techniques: Discrete random numbers: discrete uniform (1,N) continuous uniform(0,1)? Independent bits: discrete uniform (0,1) continuous uniform(0,1)? Prof. Dr. C. Görg VSIM 2-6

7 Pseudo Random Number Generators u:=uniform(0,1); Pseudo? deterministic calculation following a defined mathematical formula Next value of sequence d n+1 := f(d n ) depends only on parameter d n Or more generally d n+1 := f(d n-k,...,d n ) with k=1..n Sequence depends on the so-called seed or random seed (d 0 ) Prof. Dr. C. Görg VSIM 2-7

8 Generating Random Numbers Many algorithms for random number generators (RNGs) exist: Simple example: Linear Congruential Generator: d n+1 := (a d n + b ) mod m, e.g., d n+1 := (5 d n + 1 ) mod 16 where d n+1 is the new integer random number Example parameters: Initial value or seed: d 0 = 5 Resulting sequence of random numbers: 10, 3, 0, 1, 6, 15, 12, 13, 2, 11, 8, 9, 14, 7, 4, 5 (and here we are back again!, cycle length: 16), 10, 3,... Division by 15 gives numbers between 0 and 1, to be interpreted as random numbers in [0,1], e.g.: uniform(0,1) Prof. Dr. C. Görg VSIM 2-8

9 Multiplicative Linear Congruential Generator MLCG:d n+1 := (a d n ) mod m LEHMER 1949: RANDU a := = m := 2 31 = d 0 := 929 This generator has been used for a long time. It has been shown to have some bad characteristics, see [Knuth81]!!! (CNCL a:= 16807, m:=2 31-1) Prof. Dr. C. Görg VSIM 2-9

10 Proof of RNG Characteristics Cycle Length of MLCGs d n+1 := (a d n ) mod m with m prime has full cycle length m-1 generating every integer in [1,m-1], 1] if a is a primitive element modulo m; that t is if a i - 1 is a multiple ltil of m for i=m-1 but for no smaller i. Why not cycle length m? Prof. Dr. C. Görg VSIM 2-10

11 Proof of RNG Characteristics (cont.) Cycle Length of LCGs d n+1 := (a d n + c) mod m with c > 0 has full cycle length m generating every integer in [0,m-1] 1], if c and m are relatively prime a-1 is a multiple of every prime p which divides m a-1 is a multiple of 4 if 4 divides m e.g. d n+1 := (a d n + c) mod 2 n is full cycle, cl if c is odd and a has the form 4k + 1 Prof. Dr. C. Görg VSIM 2-11

12 Random Generator Tests Tests only show that a generator has passed a test. A random number generator is good until some test proves the opposite! Knuth: innocent, until proven guilty Tests: correlation tests: e.g. one step serial correlation, runs up and down, multidimensional uniformity,... [Knuth81] Prof. Dr. C. Görg VSIM 2-12

13 Mixed Lagged Fibonacci Generator Shown to have good qualities (until now!!) Intermediate values v i and c i are generated to calculate d i v i := ( v i-97 v i-33 ) mod 2 32 c i := ( c i ) mod 2 32 d i := ( v i c i ) mod 2 32 N = ( ) 2 96 N : cycle length (Periodenlänge) Seeds? Prof. Dr. C. Görg VSIM 2-13

14 RNGs based on Physical Phenomena Measurement of physical phenomena E.g., Radioactive i decay (Poisson) E.g., Electronic Semiconductor Noise Use the given distribution as a basis Sequence of 0,1 bits CD with bits [Richter1992] Prof. Dr. C. Görg VSIM 2-14

15 Other Generator Principles Transcendental Numbers: e.g. = = Inversive Congruential Generator ICG: x -1 * -1 n :=f(x n-1 ) [Hel95] ( x x ) mod m = 1 Cryptography RSA-Generator [Ric92] (Rivest, Shamir, Adleman) inefficient as online generator used as table generator x d n :=x n-1d mod m with m:= p q (p and q large prime numbers) 1=gcd[d,(p-1)(q-1)] )] last log 2 (m) bit pseudo random long cycle length... Prof. Dr. C. Görg VSIM 2-15

16 Discrete RNGs RV X: parameter p (0 p 1) start; generate u ; if u < (1-p) then x := 0 else x := 1 end; return (x); (Electronic Wheel, Comm. Netw. II) Prof. Dr. C. Görg VSIM 2-16

17 Geometrically Distributed RV Number of trials i until success (success in each trial with probability p) p Probability Mass Function (pmf) P(i)? start ; x := 1; Which random variable do you get for X:=0? generate u ; while u < (1-p) do x := x+1 ; generate u ; end do; return (x); pmf? Prof. Dr. C. Görg VSIM 2-17

18 Negative Binomial Distribution X: geometrically distributed n trials: Y = i=1..n X i result in the (neg.) binomial distribution pmf? How many y( (0,1)-numbers are needed? Prof. Dr. C. Görg VSIM 2-18

19 General Discrete Distribution RV R pmf: P(r) = p r, r = 0, 1,.. k CDF: F R (r) = P{ R r } = i=0..r p i F R (k)=1, F R (-1)=0 start; generate u; r:=0; while u > F R (r+1) then r:=r+1 end; return (r); Prof. Dr. C. Görg VSIM 2-19

20 Random Variates by Inverse Transformation Given RV X with cumulative distribution function F X (x) Claim: u F (x) is uniformly distributed between 0 and 1 X Proof: F U ( u) PU 1 1 u P( F ( X) u) P( X F ( u)) F ( F ( u)) u X Hence, if F -1 X is easy to compute, derive RV X with distribution F X (x) by computing a random number u uniformly distributed between 0 and 1, and apply F -1 X (u) to obtain the random number x Same principle as the General Discrete Distribution X X X Prof. Dr. C. Görg VSIM 2-20

21 Inverse Transformation (cont.) Example: X exponentially distributed F (x) u X 1 ) ( e x F u x X ) ( 1 u F x X ) 1 ln( ) / 1 ( 1 ) ( u x e x F u X (x) F x 1 x u 0 Prof. Dr. C. Görg VSIM x 0

22 Normal Distribution Inverse not available Special generation procedure after Box and Muller [Devroye86] Pair of independent d normally distributed RV X 1 and X 2 with mean μ=00 and variance σ Interpret pair as vector in the complex plane: x 1 + i x 2 = γ [cos (φ) + i sin (φ)] γ follows Rayleigh distribution: CDF 1 - e-x²/ 2v Prof. Dr. C. Görg VSIM 2-22

23 Normal Distribution Inverse available for Rayleigh distribution: γ (u :=[-2 (1-u 1/2 1 ) ν ln 1 )] φ assumes all values uniformly distributed ibut d between 0 and 2 Generate φ := 2 u 2 Generate x 1 (u 1,u 2 ):= γ (u 1 ) cos (2 u 2 ) x 2 (u 1,u 2 ):= γ (u 1 ) sin (2 u 2 ) Need to prove independence and normal distribution Prof. Dr. C. Görg VSIM 2-23

24 G/G/1 Model: Random Number Generators Arrival (λ a ) Server (λ b ) b 1 b FIFO - Queue Prof. Dr. C. Görg VSIM 2-24

25 e.g. G/G/1: Some Pitfalls use one generator for interarrival i time another generator for service time ensure independence: use the same base generator use a new seed known to be far enough away from the original seed use another type of generator Prof. Dr. C. Görg VSIM 2-25

26 How to choose input distributions Traces of a real system can be used directly to drive a simulation e.g.: take a set of recorded interarrival times and service times from a computer network to drive simulation program Traces can be aggregated into an empirical distribution function Or an analytical distribution function is chosen on a hypothetical/principal basis: several rules of thumb exist on how to choose one or several good candidates (use mean, coefficient i of variation, skewness, etc. as a guideline). Generate random numbers from this distribution Important: Perform a goodness-of-fit test to check whether the chosen distributions does indeed match the empirical data with sufficient accuracy, e.g. Kolmogorov-Smirnov test Prof. Dr. C. Görg VSIM 2-26

27 CNCL: Communication Networks Class Library Base Generators: Prof. Dr. C. Görg VSIM 2-27

28 CNCL Examples CNACG: Additive Congruential Generator (GNU-library libg++ ) CNFiboG: Fibonacci Generator CNFileG: File Generator CNLCG: Linear Congruential Generator CNMLCG: Multiple LCG CNTausG: Tausworthe Shift Register Generator Prof. Dr. C. Görg VSIM 2-28

29 CNCL: Communication Networks Class Library Random Number Generators: Prof. Dr. C. Görg VSIM 2-29

30 CNCL Examples e.g. CNHyperExp is a mixed distribution of two negative exponential distributions (H 2 ) CNHyperExp (double p, double m1, double m2, CNRNG *gen) Initializes a CNHyperExp distribution ib ti with a base random number generator gen, the mix probability bilit p and the intensity parameters m1 and m2. Prof. Dr. C. Görg VSIM 2-30

Stochastic Simulation of Communication Networks

Stochastic Simulation of Communication Networks Stochastic Simulation of Communication Networks Part 2 Amanpreet Singh (aps) Dr.-Ing Umar Toseef (umr) (@comnets.uni-bremen.de) Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 2-1 Table of Contents 1

More information

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary CPSC 531: Random Numbers Jonathan Hudson Department of Computer Science University of Calgary http://www.ucalgary.ca/~hudsonj/531f17 Introduction In simulations, we generate random values for variables

More information

Uniform random numbers generators

Uniform random numbers generators Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly

More information

UNIT 5:Random number generation And Variation Generation

UNIT 5:Random number generation And Variation Generation UNIT 5:Random number generation And Variation Generation RANDOM-NUMBER GENERATION Random numbers are a necessary basic ingredient in the simulation of almost all discrete systems. Most computer languages

More information

Systems Simulation Chapter 7: Random-Number Generation

Systems Simulation Chapter 7: Random-Number Generation Systems Simulation Chapter 7: Random-Number Generation Fatih Cavdur fatihcavdur@uludag.edu.tr April 22, 2014 Introduction Introduction Random Numbers (RNs) are a necessary basic ingredient in the simulation

More information

Random Number Generation. CS1538: Introduction to simulations

Random Number Generation. CS1538: Introduction to simulations Random Number Generation CS1538: Introduction to simulations Random Numbers Stochastic simulations require random data True random data cannot come from an algorithm We must obtain it from some process

More information

How does the computer generate observations from various distributions specified after input analysis?

How does the computer generate observations from various distributions specified after input analysis? 1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.

More information

Sources of randomness

Sources of randomness Random Number Generator Chapter 7 In simulations, we generate random values for variables with a specified distribution Ex., model service times using the exponential distribution Generation of random

More information

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring

Independent Events. Two events are independent if knowing that one occurs does not change the probability of the other occurring Independent Events Two events are independent if knowing that one occurs does not change the probability of the other occurring Conditional probability is denoted P(A B), which is defined to be: P(A and

More information

Stochastic Simulation of Communication i Networks

Stochastic Simulation of Communication i Networks Stochastic Simulation of Communication i Networks and their Protocols - WS 2014/2015 Dr. Xi Li Prof. Dr. Carmelita Görg xili cg@comnets.uni-bremen.de Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-1

More information

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint Chapter 4: Monte Carlo Methods Paisan Nakmahachalasint Introduction Monte Carlo Methods are a class of computational algorithms that rely on repeated random sampling to compute their results. Monte Carlo

More information

Statistics, Data Analysis, and Simulation SS 2013

Statistics, Data Analysis, and Simulation SS 2013 Mainz, May 2, 2013 Statistics, Data Analysis, and Simulation SS 2013 08.128.730 Statistik, Datenanalyse und Simulation Dr. Michael O. Distler 2. Random Numbers 2.1 Why random numbers:

More information

Uniform Random Number Generators

Uniform Random Number Generators JHU 553.633/433: Monte Carlo Methods J. C. Spall 25 September 2017 CHAPTER 2 RANDOM NUMBER GENERATION Motivation and criteria for generators Linear generators (e.g., linear congruential generators) Multiple

More information

Generating pseudo- random numbers

Generating pseudo- random numbers Generating pseudo- random numbers What are pseudo-random numbers? Numbers exhibiting statistical randomness while being generated by a deterministic process. Easier to generate than true random numbers?

More information

Stochastic Simulation of Communication Networks and their Protocols

Stochastic Simulation of Communication Networks and their Protocols Stochastic Simulation of Communication Networks and their Protocols Dr.-Ing Umar Toseef umr@comnets.uni-bremen.de Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-1 Table of Contents 1 General Introduction

More information

How does the computer generate observations from various distributions specified after input analysis?

How does the computer generate observations from various distributions specified after input analysis? 1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.

More information

( x) ( ) F ( ) ( ) ( ) Prob( ) ( ) ( ) X x F x f s ds

( x) ( ) F ( ) ( ) ( ) Prob( ) ( ) ( ) X x F x f s ds Applied Numerical Analysis Pseudo Random Number Generator Lecturer: Emad Fatemizadeh What is random number: A sequence in which each term is unpredictable 29, 95, 11, 60, 22 Application: Monte Carlo Simulations

More information

Stream Ciphers. Çetin Kaya Koç Winter / 20

Stream Ciphers. Çetin Kaya Koç   Winter / 20 Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2016 1 / 20 Linear Congruential Generators A linear congruential generator produces a sequence of integers x i for i = 1,2,... starting with the given initial

More information

Random Number Generators

Random Number Generators 1/18 Random Number Generators Professor Karl Sigman Columbia University Department of IEOR New York City USA 2/18 Introduction Your computer generates" numbers U 1, U 2, U 3,... that are considered independent

More information

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 18

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 18 EEC 686/785 Modeling & Performance Evaluation of Computer Systems Lecture 18 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org (based on Dr. Raj Jain s lecture

More information

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 19

EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Lecture 19 EEC 686/785 Modeling & Performance Evaluation of Computer Systems Lecture 19 Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org (based on Dr. Raj Jain s lecture

More information

Monte Carlo Techniques

Monte Carlo Techniques Physics 75.502 Part III: Monte Carlo Methods 40 Monte Carlo Techniques Monte Carlo refers to any procedure that makes use of random numbers. Monte Carlo methods are used in: Simulation of natural phenomena

More information

Outline. Simulation of a Single-Server Queueing System. EEC 686/785 Modeling & Performance Evaluation of Computer Systems.

Outline. Simulation of a Single-Server Queueing System. EEC 686/785 Modeling & Performance Evaluation of Computer Systems. EEC 686/785 Modeling & Performance Evaluation of Computer Systems Lecture 19 Outline Simulation of a Single-Server Queueing System Review of midterm # Department of Electrical and Computer Engineering

More information

Slides 3: Random Numbers

Slides 3: Random Numbers Slides 3: Random Numbers We previously considered a few examples of simulating real processes. In order to mimic real randomness of events such as arrival times we considered the use of random numbers

More information

Random numbers and generators

Random numbers and generators Chapter 2 Random numbers and generators Random numbers can be generated experimentally, like throwing dice or from radioactive decay measurements. In numerical calculations one needs, however, huge set

More information

Notation Precedence Diagram

Notation Precedence Diagram Notation Precedence Diagram xix xxi CHAPTER 1 Introduction 1 1.1. Systems, Models, and Simulation 1 1.2. Verification, Approximation, and Validation 8 1.2.1. Verifying a Program 9 1.2.2. Approximation

More information

Uniform Random Binary Floating Point Number Generation

Uniform Random Binary Floating Point Number Generation Uniform Random Binary Floating Point Number Generation Prof. Dr. Thomas Morgenstern, Phone: ++49.3943-659-337, Fax: ++49.3943-659-399, tmorgenstern@hs-harz.de, Hochschule Harz, Friedrichstr. 57-59, 38855

More information

Computer Applications for Engineers ET 601

Computer Applications for Engineers ET 601 Computer Applications for Engineers ET 601 Asst. Prof. Dr. Prapun Suksompong prapun@siit.tu.ac.th Random Variables (Con t) 1 Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday

More information

Pseudo-Random Numbers Generators. Anne GILLE-GENEST. March 1, Premia Introduction Definitions Good generators...

Pseudo-Random Numbers Generators. Anne GILLE-GENEST. March 1, Premia Introduction Definitions Good generators... 14 pages 1 Pseudo-Random Numbers Generators Anne GILLE-GENEST March 1, 2012 Contents Premia 14 1 Introduction 2 1.1 Definitions............................. 2 1.2 Good generators..........................

More information

Contents LIST OF TABLES... LIST OF FIGURES... xvii. LIST OF LISTINGS... xxi PREFACE. ...xxiii

Contents LIST OF TABLES... LIST OF FIGURES... xvii. LIST OF LISTINGS... xxi PREFACE. ...xxiii LIST OF TABLES... xv LIST OF FIGURES... xvii LIST OF LISTINGS... xxi PREFACE...xxiii CHAPTER 1. PERFORMANCE EVALUATION... 1 1.1. Performance evaluation... 1 1.2. Performance versus resources provisioning...

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 41 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/13/16 2 / 41 Outline 1 Introduction 2 Some Lousy Generators We Won t

More information

Basic concepts of probability theory

Basic concepts of probability theory Basic concepts of probability theory Random variable discrete/continuous random variable Transform Z transform, Laplace transform Distribution Geometric, mixed-geometric, Binomial, Poisson, exponential,

More information

Dr. Maddah ENMG 617 EM Statistics 10/15/12. Nonparametric Statistics (2) (Goodness of fit tests)

Dr. Maddah ENMG 617 EM Statistics 10/15/12. Nonparametric Statistics (2) (Goodness of fit tests) Dr. Maddah ENMG 617 EM Statistics 10/15/12 Nonparametric Statistics (2) (Goodness of fit tests) Introduction Probability models used in decision making (Operations Research) and other fields require fitting

More information

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples:

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples: Monte Carlo Methods Interested in Examples: µ E f X = f x d x Type I error rate of a hypothesis test Mean width of a confidence interval procedure Evaluating a likelihood Finding posterior mean and variance

More information

Random number generators

Random number generators s generators Comp Sci 1570 Introduction to Outline s 1 2 s generator s The of a sequence of s or symbols that cannot be reasonably predicted better than by a random chance, usually through a random- generator

More information

Simulation. Where real stuff starts

Simulation. Where real stuff starts 1 Simulation Where real stuff starts ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3 What is a simulation?

More information

2008 Winton. Review of Statistical Terminology

2008 Winton. Review of Statistical Terminology 1 Review of Statistical Terminology 2 Formal Terminology An experiment is a process whose outcome is not known with certainty The experiment s sample space S is the set of all possible outcomes. A random

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 44 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/29/17 2 / 44 Outline 1 Introduction 2 Some Lousy Generators We Won t

More information

2 Random Variable Generation

2 Random Variable Generation 2 Random Variable Generation Most Monte Carlo computations require, as a starting point, a sequence of i.i.d. random variables with given marginal distribution. We describe here some of the basic methods

More information

Random Number Generation. Stephen Booth David Henty

Random Number Generation. Stephen Booth David Henty Random Number Generation Stephen Booth David Henty Introduction Random numbers are frequently used in many types of computer simulation Frequently as part of a sampling process: Generate a representative

More information

ISyE 6644 Fall 2014 Test #2 Solutions (revised 11/7/16)

ISyE 6644 Fall 2014 Test #2 Solutions (revised 11/7/16) 1 NAME ISyE 6644 Fall 2014 Test #2 Solutions (revised 11/7/16) This test is 85 minutes. You are allowed two cheat sheets. Good luck! 1. Some short answer questions to get things going. (a) Consider the

More information

Basic concepts of probability theory

Basic concepts of probability theory Basic concepts of probability theory Random variable discrete/continuous random variable Transform Z transform, Laplace transform Distribution Geometric, mixed-geometric, Binomial, Poisson, exponential,

More information

Simulation. Where real stuff starts

Simulation. Where real stuff starts Simulation Where real stuff starts March 2019 1 ToC 1. What is a simulation? 2. Accuracy of output 3. Random Number Generators 4. How to sample 5. Monte Carlo 6. Bootstrap 2 1. What is a simulation? 3

More information

CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms CS483 Design and Analysis of Algorithms Lectures 2-3 Algorithms with Numbers Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: STII, Room 443, Friday 4:00pm - 6:00pm or by appointments

More information

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002 EE/CpE 345 Modeling and Simulation Class 5 September 30, 2002 Statistical Models in Simulation Real World phenomena of interest Sample phenomena select distribution Probabilistic, not deterministic Model

More information

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1 Advanced Markovian queues Bulk input queue M [X] /M/ Bulk service queue M/M [Y] / Erlangian queue M/E k / Bulk input queue M [X] /M/ Batch arrival, Poisson process, arrival rate λ number of customers in

More information

Basic concepts of probability theory

Basic concepts of probability theory Basic concepts of probability theory Random variable discrete/continuous random variable Transform Z transform, Laplace transform Distribution Geometric, mixed-geometric, Binomial, Poisson, exponential,

More information

2905 Queueing Theory and Simulation PART IV: SIMULATION

2905 Queueing Theory and Simulation PART IV: SIMULATION 2905 Queueing Theory and Simulation PART IV: SIMULATION 22 Random Numbers A fundamental step in a simulation study is the generation of random numbers, where a random number represents the value of a random

More information

Sampling Random Variables

Sampling Random Variables Sampling Random Variables Introduction Sampling a random variable X means generating a domain value x X in such a way that the probability of generating x is in accordance with p(x) (respectively, f(x)),

More information

IE 303 Discrete-Event Simulation

IE 303 Discrete-Event Simulation IE 303 Discrete-Event Simulation 1 L E C T U R E 5 : P R O B A B I L I T Y R E V I E W Review of the Last Lecture Random Variables Probability Density (Mass) Functions Cumulative Density Function Discrete

More information

Probability Distributions

Probability Distributions 02/07/07 PHY310: Statistical Data Analysis 1 PHY310: Lecture 05 Probability Distributions Road Map The Gausssian Describing Distributions Expectation Value Variance Basic Distributions Generating Random

More information

CSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function

CSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function CSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function that is reasonably random in behavior, then take any

More information

Algorithms and Networking for Computer Games

Algorithms and Networking for Computer Games Algorithms and Networking for Computer Games Chapter 2: Random Numbers http://www.wiley.com/go/smed What are random numbers good for (according to D.E. Knuth) simulation sampling numerical analysis computer

More information

Review of Statistical Terminology

Review of Statistical Terminology Review of Statistical Terminology An experiment is a process whose outcome is not known with certainty. The experiment s sample space S is the set of all possible outcomes. A random variable is a function

More information

Queueing Theory and Simulation. Introduction

Queueing Theory and Simulation. Introduction Queueing Theory and Simulation Based on the slides of Dr. Dharma P. Agrawal, University of Cincinnati and Dr. Hiroyuki Ohsaki Graduate School of Information Science & Technology, Osaka University, Japan

More information

A Repetition Test for Pseudo-Random Number Generators

A Repetition Test for Pseudo-Random Number Generators Monte Carlo Methods and Appl., Vol. 12, No. 5-6, pp. 385 393 (2006) c VSP 2006 A Repetition Test for Pseudo-Random Number Generators Manuel Gil, Gaston H. Gonnet, Wesley P. Petersen SAM, Mathematik, ETHZ,

More information

Probability and Statistics Concepts

Probability and Statistics Concepts University of Central Florida Computer Science Division COT 5611 - Operating Systems. Spring 014 - dcm Probability and Statistics Concepts Random Variable: a rule that assigns a numerical value to each

More information

Tae-Soo Kim and Young-Kyun Yang

Tae-Soo Kim and Young-Kyun Yang Kangweon-Kyungki Math. Jour. 14 (2006), No. 1, pp. 85 93 ON THE INITIAL SEED OF THE RANDOM NUMBER GENERATORS Tae-Soo Kim and Young-Kyun Yang Abstract. A good arithmetic random number generator should possess

More information

arxiv:hep-lat/ v2 10 Aug 1993

arxiv:hep-lat/ v2 10 Aug 1993 1 A Comparative Study of Some Pseudorandom Number Generators I. Vattulainen 1, K. Kankaala 1,2, J. Saarinen 1, and T. Ala-Nissila 1,3 arxiv:hep-lat/9304008 v2 10 Aug 1993 1 Department of Electrical Engineering

More information

Computer Simulation Techniques: The definitive introduction!

Computer Simulation Techniques: The definitive introduction! Clients CPU Computer Simulation Techniques: The definitive introduction! 1 2 2 3 3 7 b 4 5 6 9 6 9 Yes Is CPU No MCL = tarr queue MCL = MCL + 1 empty? A new arrival event occurs A departure event occurs

More information

Computer Applications for Engineers ET 601

Computer Applications for Engineers ET 601 Computer Applications for Engineers ET 601 Asst. Prof. Dr. Prapun Suksompong prapun@siit.tu.ac.th Random Variables (Con t) 1 Office Hours: (BKD 3601-7) Wednesday 9:30-11:30 Wednesday 16:00-17:00 Thursday

More information

15 Discrete Distributions

15 Discrete Distributions Lecture Note 6 Special Distributions (Discrete and Continuous) MIT 4.30 Spring 006 Herman Bennett 5 Discrete Distributions We have already seen the binomial distribution and the uniform distribution. 5.

More information

Department of Electrical- and Information Technology. ETS061 Lecture 3, Verification, Validation and Input

Department of Electrical- and Information Technology. ETS061 Lecture 3, Verification, Validation and Input ETS061 Lecture 3, Verification, Validation and Input Verification and Validation Real system Validation Model Verification Measurements Verification Break model down into smaller bits and test each bit

More information

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP Glossary availability The long-run average fraction of time that the processor is available for processing jobs, denoted by a (p. 113). cellular manufacturing The concept of organizing the factory into

More information

Uniform and Exponential Random Floating Point Number Generation

Uniform and Exponential Random Floating Point Number Generation Uniform and Exponential Random Floating Point Number Generation Thomas Morgenstern Hochschule Harz, Friedrichstr. 57-59, D-38855 Wernigerode tmorgenstern@hs-harz.de Summary. Pseudo random number generators

More information

B. Maddah ENMG 622 Simulation 11/11/08

B. Maddah ENMG 622 Simulation 11/11/08 B. Maddah ENMG 622 Simulation 11/11/08 Random-Number Generators (Chapter 7, Law) Overview All stochastic simulations need to generate IID uniformly distributed on (0,1), U(0,1), random numbers. 1 f X (

More information

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models Fatih Cavdur fatihcavdur@uludag.edu.tr March 20, 2012 Introduction Introduction The world of the model-builder

More information

Class 12. Random Numbers

Class 12. Random Numbers Class 12. Random Numbers NRiC 7. Frequently needed to generate initial conditions. Often used to solve problems statistically. How can a computer generate a random number? It can t! Generators are pseudo-random.

More information

Random processes and probability distributions. Phys 420/580 Lecture 20

Random processes and probability distributions. Phys 420/580 Lecture 20 Random processes and probability distributions Phys 420/580 Lecture 20 Random processes Many physical processes are random in character: e.g., nuclear decay (Poisson distributed event count) P (k, τ) =

More information

Chapter 2 Queueing Theory and Simulation

Chapter 2 Queueing Theory and Simulation Chapter 2 Queueing Theory and Simulation Based on the slides of Dr. Dharma P. Agrawal, University of Cincinnati and Dr. Hiroyuki Ohsaki Graduate School of Information Science & Technology, Osaka University,

More information

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle Network Security Chapter 2 Basics 2.4 Random Number Generation for Cryptographic Protocols Motivation It is

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 43 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA March 1, 2016 2 / 43 Outline 1 Introduction 2 Some Generators We Won t

More information

IE 581 Introduction to Stochastic Simulation

IE 581 Introduction to Stochastic Simulation 1. List criteria for choosing the majorizing density r (x) when creating an acceptance/rejection random-variate generator for a specified density function f (x). 2. Suppose the rate function of a nonhomogeneous

More information

functions Poisson distribution Normal distribution Arbitrary functions

functions Poisson distribution Normal distribution Arbitrary functions Physics 433: Computational Physics Lecture 6 Random number distributions Generation of random numbers of various distribuition functions Normal distribution Poisson distribution Arbitrary functions Random

More information

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications arithmetic mod 7 a + 7 b = (a + b) mod 7 a 7 b = (a b) mod 7 5 6 0 1 2 4 3 + 0 1 2 3 4 5 6 0 0 1 2 3 4 5 6 1

More information

The exponential distribution and the Poisson process

The exponential distribution and the Poisson process The exponential distribution and the Poisson process 1-1 Exponential Distribution: Basic Facts PDF f(t) = { λe λt, t 0 0, t < 0 CDF Pr{T t) = 0 t λe λu du = 1 e λt (t 0) Mean E[T] = 1 λ Variance Var[T]

More information

IE 303 Discrete-Event Simulation L E C T U R E 6 : R A N D O M N U M B E R G E N E R A T I O N

IE 303 Discrete-Event Simulation L E C T U R E 6 : R A N D O M N U M B E R G E N E R A T I O N IE 303 Discrete-Event Simulation L E C T U R E 6 : R A N D O M N U M B E R G E N E R A T I O N Review of the Last Lecture Continuous Distributions Uniform distributions Exponential distributions and memoryless

More information

Probability Distributions Columns (a) through (d)

Probability Distributions Columns (a) through (d) Discrete Probability Distributions Columns (a) through (d) Probability Mass Distribution Description Notes Notation or Density Function --------------------(PMF or PDF)-------------------- (a) (b) (c)

More information

Seminar on Simulation of Telecommunication Sistems

Seminar on Simulation of Telecommunication Sistems Politecnico di Milano Dipartimento di Elettronica e Informazione Seminar on Simulation of Telecommunication Sistems Massimo Tornatore Francesco Musumeci (Author of the original slides: Fabio Martignon)

More information

Guidelines for Solving Probability Problems

Guidelines for Solving Probability Problems Guidelines for Solving Probability Problems CS 1538: Introduction to Simulation 1 Steps for Problem Solving Suggested steps for approaching a problem: 1. Identify the distribution What distribution does

More information

Modern Methods of Data Analysis - WS 07/08

Modern Methods of Data Analysis - WS 07/08 Modern Methods of Data Analysis Lecture III (29.10.07) Contents: Overview & Test of random number generators Random number distributions Monte Carlo The terminology Monte Carlo-methods originated around

More information

Communication Networks

Communication Networks Politecnico di Milano Department of Electronics, Information and Bioengineering (DEIB) of Communication Networks 5hr-Seminar in the course «Network Design and Planning» ECS289i Massimo Tornatore (Courtesy

More information

Pseudo-Random Generators

Pseudo-Random Generators Pseudo-Random Generators Why do we need random numbers? Simulation Sampling Numerical analysis Computer programming (e.g. randomized algorithm) Elementary and critical element in many cryptographic protocols

More information

Number Theory. Modular Arithmetic

Number Theory. Modular Arithmetic Number Theory The branch of mathematics that is important in IT security especially in cryptography. Deals only in integer numbers and the process can be done in a very fast manner. Modular Arithmetic

More information

Pseudo-Random Generators

Pseudo-Random Generators Pseudo-Random Generators Topics Why do we need random numbers? Truly random and Pseudo-random numbers. Definition of pseudo-random-generator What do we expect from pseudorandomness? Testing for pseudo-randomness.

More information

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations Chapter 5 Statistical Models in Simulations 5.1 Contents Basic Probability Theory Concepts Discrete Distributions Continuous Distributions Poisson Process Empirical Distributions Useful Statistical Models

More information

1.225J J (ESD 205) Transportation Flow Systems

1.225J J (ESD 205) Transportation Flow Systems 1.225J J (ESD 25) Transportation Flow Systems Lecture 9 Simulation Models Prof. Ismail Chabini and Prof. Amedeo R. Odoni Lecture 9 Outline About this lecture: It is based on R16. Only material covered

More information

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Random variables. DS GA 1002 Probability and Statistics for Data Science. Random variables DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall17 Carlos Fernandez-Granda Motivation Random variables model numerical quantities

More information

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models Fatih Cavdur fatihcavdur@uludag.edu.tr March 29, 2014 Introduction Introduction The world of the model-builder

More information

Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn

Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn Chapter 6 Randomization Algorithm Theory WS 2012/13 Fabian Kuhn Randomization Randomized Algorithm: An algorithm that uses (or can use) random coin flips in order to make decisions We will see: randomization

More information

Topics. Pseudo-Random Generators. Pseudo-Random Numbers. Truly Random Numbers

Topics. Pseudo-Random Generators. Pseudo-Random Numbers. Truly Random Numbers Topics Pseudo-Random Generators Why do we need random numbers? Truly random and Pseudo-random numbers. Definition of pseudo-random-generator What do we expect from pseudorandomness? Testing for pseudo-randomness.

More information

CPSC 531 Systems Modeling and Simulation FINAL EXAM

CPSC 531 Systems Modeling and Simulation FINAL EXAM CPSC 531 Systems Modeling and Simulation FINAL EXAM Department of Computer Science University of Calgary Professor: Carey Williamson December 21, 2017 This is a CLOSED BOOK exam. Textbooks, notes, laptops,

More information

EE 505 Introduction. What do we mean by random with respect to variables and signals?

EE 505 Introduction. What do we mean by random with respect to variables and signals? EE 505 Introduction What do we mean by random with respect to variables and signals? unpredictable from the perspective of the observer information bearing signal (e.g. speech) phenomena that are not under

More information

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr. Simulation Discrete-Event System Simulation Chapter 4 Statistical Models in Simulation Purpose & Overview The world the model-builder sees is probabilistic rather than deterministic. Some statistical model

More information

Probability Distribution Summary Dr. Mohammed Hawa October 2007

Probability Distribution Summary Dr. Mohammed Hawa October 2007 Probability Distribution Summary Dr. Mohammed Hawa October 2007 There are many probability distributions that have been studied over the years. Each of which was developed based on observations of a particular

More information

Mathematics of Cryptography

Mathematics of Cryptography UNIT - III Mathematics of Cryptography Part III: Primes and Related Congruence Equations 1 Objectives To introduce prime numbers and their applications in cryptography. To discuss some primality test algorithms

More information

Pseudo-random Number Generation. Qiuliang Tang

Pseudo-random Number Generation. Qiuliang Tang Pseudo-random Number Generation Qiuliang Tang Random Numbers in Cryptography The keystream in the one-time pad The secret key in the DES encryption The prime numbers p, q in the RSA encryption The private

More information

Part I Stochastic variables and Markov chains

Part I Stochastic variables and Markov chains Part I Stochastic variables and Markov chains Random variables describe the behaviour of a phenomenon independent of any specific sample space Distribution function (cdf, cumulative distribution function)

More information

6.1 Randomness: quantifying uncertainty

6.1 Randomness: quantifying uncertainty 6.1 Randomness: quantifying uncertainty The concepts of uncertainty and randomness have intrigued humanity for a long time. The world around us is not deterministic and we are faced continually with chance

More information

Chapter 7 Random Numbers

Chapter 7 Random Numbers Chapter 7 Random Numbers February 15, 2010 7 In the following random numbers and random sequences are treated as two manifestations of the same thing. A series of random numbers strung together is considered

More information