SlideShare a Scribd company logo
6
Most read
7
Most read
8
Most read
Welcome
Topic Name : Mid-Square Random Number Generation
Presented By
Md: Arman Hossain
OUTLINE
 Introduction
 Mid-square Method
 Example of Mid-square
 Departures of Mid-square Method
 Applications of Random Numbers
 References
INTRODUCTION
Mid-square method was invented by John von Neumann, and was described at a conference in 1949.
In mathematics, the mid-square method is a method of generating pseudorandom numbers. In practice it is
not a good method since its period is usually very short.
Mid-square Method
1. Starting with n digit number
2. Squaring it
3. For 8 digit : Remove two lower and higher order digit
4. For 7 digit : Remove one lower and two higher order digit
5. Taking n digits in the middle as the next number
6. Repeat from number no. 2.
Example of Mid-square
For an example, we are using 4 digit which is called seed number, we are showing generate 5 random number
here,
5673
1. (5673)2 = 32 1829 29 = 1829
2. (1829)2 = 3 3452 41 = 3452
3. (3452)2 = 11916304 = 9163
4. (9163)2 = 83960569 = 9605
5. (9605)2 = 92256025 = 2560
Remove two
higher order digit
Remove two
lower order digit
Next seed
number
Square seed
number
Remove one
higher order digit
Remove two
lower order digit
Departures of Mid-square Method
Converge on a constant :
 2500
(2500)2 = 6 2500 00 = 2500 This will repeated.
 2504
(2504)2 = 6 2700 16 = 2700
(2700)2 = 7 2900 00 = 2900
(2900)2 = 8 4100 00 = 4100
.
.
(2100)2 = 4 4100 00 = 4100 This will repeated also.
There more constant number like this.
seed
seed
Applications of Random Numbers
 Simulation : when a computer is being used to simulate natural phenomena, random numbers are
required to make things realistic. Simulation covers many fields, from the study of nuclear physics to
operations research.
 Sampling : It is often impractical to examine all possible cases, but a random sample will provide
insight into what constitutes “typical behavior”.
 Numerical analysis : Ingenious techniques for solving complicated numerical problems have been
devised using random numbers.
 Computer programming: Random values make a good source of data for testing the effectiveness of
computer algorithm.
 Decision making : There are reports that many executives make their decisions by flipping a coin or
by throwing darts, etc. It is also rumored that some college professors prepare their grades on such a
basis. Sometimes it is important to make a completely "unbiased decision; this ability is occasionally
useful in computer algorithms, for example in situations where a fixed decision made each time would
cause the algorithm to run more slowly. Randomness is also an essential part of optimal strategies in
the theory of games.
 Recreation : Rolling dice, shuffling decks of cards, spinning roulette wheels, etc., are fascinating
pastimes for just about everybody. These traditional uses of random numbers have suggested the name
"Monte Carlo method," a general term used to describe any algorithm that employs random numbers.
THANK YOU

More Related Content

PPTX
Unit 3 random number generation, random-variate generation
PDF
Feng’s classification
PPT
Principles of soft computing-Associative memory networks
PPT
Classification using back propagation algorithm
PPT
Random number generation
PPTX
Time advance mehcanism
PPTX
Feedforward neural network
PPTX
Parallel Programing Model
Unit 3 random number generation, random-variate generation
Feng’s classification
Principles of soft computing-Associative memory networks
Classification using back propagation algorithm
Random number generation
Time advance mehcanism
Feedforward neural network
Parallel Programing Model

What's hot (20)

PPT
Simulation & Modeling - Smilulation Queuing System
PPTX
Random Number Generation
PPTX
Pseudo Random Number
PPT
17 cpu scheduling and scheduling criteria
PPTX
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
PDF
Gradient descent method
ODP
Computational Intelligence and Applications
PDF
Random number generators
PPTX
CLR AND LALR PARSER
PPTX
Multilayer perceptron
PPTX
Fuzzy arithmetic
PPT
Fundamentals of the Analysis of Algorithm Efficiency
PPTX
Dynamic programming
PPTX
Problem solving agents
PPT
Artificial Neural Networks - ANN
PPTX
General purpose simulation System (GPSS)
PPTX
Computational Complexity
PPTX
Performance analysis(Time & Space Complexity)
PPTX
Scheduling Definition, objectives and types
PDF
Daa notes 1
Simulation & Modeling - Smilulation Queuing System
Random Number Generation
Pseudo Random Number
17 cpu scheduling and scheduling criteria
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Gradient descent method
Computational Intelligence and Applications
Random number generators
CLR AND LALR PARSER
Multilayer perceptron
Fuzzy arithmetic
Fundamentals of the Analysis of Algorithm Efficiency
Dynamic programming
Problem solving agents
Artificial Neural Networks - ANN
General purpose simulation System (GPSS)
Computational Complexity
Performance analysis(Time & Space Complexity)
Scheduling Definition, objectives and types
Daa notes 1
Ad

Viewers also liked (20)

PDF
Pseudo Random Number Generators
PPTX
And or graph problem reduction using predicate logic
PPT
Simulation As a Method To Support Complex Organizational Transformations in H...
PDF
Applying the Scientific Method to Simulation Experiments
PDF
EGLACOMM / MEVIA APP TEASER
PPTX
Eswaran Subrahmanian - Serious Games in Complex Design of Urban Systems and P...
PDF
A copula-based Simulation Method for Clustered Multi-State Survival Data
PPTX
Urban simulation by ANN-CA
PDF
A368 afa1 b0f8-4b79-812f-980f7dc622bf
PDF
Brudaru, o. 2011: cellular genetic algorithm with communicating grids for a d...
PDF
Simulation of Urban Mobility (Sumo) For Evaluating Qos Parameters For Vehicul...
PDF
Cfms project (asrc)
PDF
A High-speed Verilog HDL Simulation Method using a Lightweight Translator
PPT
Games and Serious Games in Urban Planning: Study Cases
PPTX
charge simulation method
PDF
Architecture and urban planning (3 d) representation
PPS
Parallel Simulation of Urban Dynamics on the GPU Ivan Blečić, Arnaldo Cecchi...
PPTX
Spatial Microsimulation for City Modelling, Social Forecasting and Urban Poli...
PPT
Simulations and Educational Games
Pseudo Random Number Generators
And or graph problem reduction using predicate logic
Simulation As a Method To Support Complex Organizational Transformations in H...
Applying the Scientific Method to Simulation Experiments
EGLACOMM / MEVIA APP TEASER
Eswaran Subrahmanian - Serious Games in Complex Design of Urban Systems and P...
A copula-based Simulation Method for Clustered Multi-State Survival Data
Urban simulation by ANN-CA
A368 afa1 b0f8-4b79-812f-980f7dc622bf
Brudaru, o. 2011: cellular genetic algorithm with communicating grids for a d...
Simulation of Urban Mobility (Sumo) For Evaluating Qos Parameters For Vehicul...
Cfms project (asrc)
A High-speed Verilog HDL Simulation Method using a Lightweight Translator
Games and Serious Games in Urban Planning: Study Cases
charge simulation method
Architecture and urban planning (3 d) representation
Parallel Simulation of Urban Dynamics on the GPU Ivan Blečić, Arnaldo Cecchi...
Spatial Microsimulation for City Modelling, Social Forecasting and Urban Poli...
Simulations and Educational Games
Ad

Similar to Midsquare method- simulation system (20)

PPTX
Random number generation
PPTX
Unit-3 of mathematical foundation of ai ml
PPTX
2. Modelling and Simulation in computer 2.pptx
PPTX
PPT
Random Number Generator Detailed PPT with
PPT
Random Number Generation Conceptual and Practice
PDF
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
PDF
Fv2510671071
PPTX
Amanda Sopkin - Computational Randomness: Creating Chaos in an Ordered Machin...
PDF
J45015460
PPT
Lecture06-Random-Number-Genedawrators.ppt
PPTX
Random_Number_Generation_Algorithms.pptx
PPTX
Random number generation
PPTX
MT6702 Unit 2 Random Number Generation
PDF
Generating random primes
PDF
Random number generation (in C++) – past, present and potential future
PPTX
Pseudorandom number generators powerpoint
PPTX
Teknik Simulasi
PPTX
4. random number and it's generating techniques
PDF
Python Programming - IX. On Randomness
Random number generation
Unit-3 of mathematical foundation of ai ml
2. Modelling and Simulation in computer 2.pptx
Random Number Generator Detailed PPT with
Random Number Generation Conceptual and Practice
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
Fv2510671071
Amanda Sopkin - Computational Randomness: Creating Chaos in an Ordered Machin...
J45015460
Lecture06-Random-Number-Genedawrators.ppt
Random_Number_Generation_Algorithms.pptx
Random number generation
MT6702 Unit 2 Random Number Generation
Generating random primes
Random number generation (in C++) – past, present and potential future
Pseudorandom number generators powerpoint
Teknik Simulasi
4. random number and it's generating techniques
Python Programming - IX. On Randomness

Recently uploaded (20)

PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Introduction to Building Materials
PDF
advance database management system book.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Orientation - ARALprogram of Deped to the Parents.pptx
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Digestion and Absorption of Carbohydrates, Proteina and Fats
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Supply Chain Operations Speaking Notes -ICLT Program
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A powerpoint presentation on the Revised K-10 Science Shaping Paper
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
1_English_Language_Set_2.pdf probationary
Introduction to Building Materials
advance database management system book.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Final Presentation General Medicine 03-08-2024.pptx
RMMM.pdf make it easy to upload and study
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Unit 4 Skeletal System.ppt.pptxopresentatiom
Weekly quiz Compilation Jan -July 25.pdf
Complications of Minimal Access Surgery at WLH
Chinmaya Tiranga Azadi Quiz (Class 7-8 )

Midsquare method- simulation system

  • 2. Topic Name : Mid-Square Random Number Generation Presented By Md: Arman Hossain
  • 3. OUTLINE  Introduction  Mid-square Method  Example of Mid-square  Departures of Mid-square Method  Applications of Random Numbers  References
  • 4. INTRODUCTION Mid-square method was invented by John von Neumann, and was described at a conference in 1949. In mathematics, the mid-square method is a method of generating pseudorandom numbers. In practice it is not a good method since its period is usually very short.
  • 5. Mid-square Method 1. Starting with n digit number 2. Squaring it 3. For 8 digit : Remove two lower and higher order digit 4. For 7 digit : Remove one lower and two higher order digit 5. Taking n digits in the middle as the next number 6. Repeat from number no. 2.
  • 6. Example of Mid-square For an example, we are using 4 digit which is called seed number, we are showing generate 5 random number here, 5673 1. (5673)2 = 32 1829 29 = 1829 2. (1829)2 = 3 3452 41 = 3452 3. (3452)2 = 11916304 = 9163 4. (9163)2 = 83960569 = 9605 5. (9605)2 = 92256025 = 2560 Remove two higher order digit Remove two lower order digit Next seed number Square seed number Remove one higher order digit Remove two lower order digit
  • 7. Departures of Mid-square Method Converge on a constant :  2500 (2500)2 = 6 2500 00 = 2500 This will repeated.  2504 (2504)2 = 6 2700 16 = 2700 (2700)2 = 7 2900 00 = 2900 (2900)2 = 8 4100 00 = 4100 . . (2100)2 = 4 4100 00 = 4100 This will repeated also. There more constant number like this. seed seed
  • 8. Applications of Random Numbers  Simulation : when a computer is being used to simulate natural phenomena, random numbers are required to make things realistic. Simulation covers many fields, from the study of nuclear physics to operations research.  Sampling : It is often impractical to examine all possible cases, but a random sample will provide insight into what constitutes “typical behavior”.  Numerical analysis : Ingenious techniques for solving complicated numerical problems have been devised using random numbers.  Computer programming: Random values make a good source of data for testing the effectiveness of computer algorithm.  Decision making : There are reports that many executives make their decisions by flipping a coin or by throwing darts, etc. It is also rumored that some college professors prepare their grades on such a basis. Sometimes it is important to make a completely "unbiased decision; this ability is occasionally useful in computer algorithms, for example in situations where a fixed decision made each time would cause the algorithm to run more slowly. Randomness is also an essential part of optimal strategies in the theory of games.  Recreation : Rolling dice, shuffling decks of cards, spinning roulette wheels, etc., are fascinating pastimes for just about everybody. These traditional uses of random numbers have suggested the name "Monte Carlo method," a general term used to describe any algorithm that employs random numbers.