Genetic Algorithms Can Be Used To Obtain Good Linear Congruential Generators Presented by Ben Sproat.

Slides:



Advertisements
Similar presentations
Local Search Algorithms
Advertisements

CS6800 Advanced Theory of Computation
Exact and heuristics algorithms
Genetic Algorithms By: Jacob Noyes 4/16/2013. Traveling Salesman Problem Given:  A list of cities  Distances between each city Find:  Shortest path.
Random Numbers. Two Types of Random Numbers 1.True random numbers: True random numbers are generated in non- deterministic ways. They are not predictable.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Random Number Generators. Why do we need random variables? random components in simulation → need for a method which generates numbers that are random.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Using random numbers Simulation: accounts for uncertainty: biology (large number of individuals), physics (large number of particles, quantum mechanics),
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Genetic algorithms for neural networks An introduction.
Local Search and Stochastic Algorithms Solution tutorial 4.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
15-853Page :Algorithms in the Real World Generating Random and Pseudorandom Numbers.
Entropy of Keys and Password Generation Introduction to entropy Entropy and data compression Predictability of random number generation Entropy and system.
Brandon Andrews.  What are genetic algorithms?  3 steps  Applications to Bioinformatics.
Random Number Generation Pseudo-random number Generating Discrete R.V. Generating Continuous R.V.
Genetic Algorithm.
KAIS T A lightweight secure protocol for wireless sensor networks 윤주범 ELSEVIER Mar
Efficient Model Selection for Support Vector Machines
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
A Comparison of Nature Inspired Intelligent Optimization Methods in Aerial Spray Deposition Management Lei Wu Master’s Thesis Artificial Intelligence Center.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic Algorithms by using MapReduce
© 2003, Carla Ellis Simulation Techniques Overview Simulation environments emulation exec- driven sim trace- driven sim stochastic sim Workload parameters.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Monte Carlo Methods.
The Generational Control Model This is the control model that is traditionally used by GP systems. There are a distinct number of generations performed.
Simulated Annealing.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
APPENDIX D R ANDOM N UMBER G ENERATION Organization of chapter in ISSO* – General description and linear congruential generators Criteria for “good” random.
1 A New Method for Composite System Annualized Reliability Indices Based on Genetic Algorithms Nader Samaan, Student,IEEE Dr. C. Singh, Fellow, IEEE Department.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Lecture 4: Statistics Review II Date: 9/5/02  Hypothesis tests: power  Estimation: likelihood, moment estimation, least square  Statistical properties.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Improving the Genetic Algorithm Performance in Aerial Spray Deposition Management University of Georgia L. Wu, W.D. Potter, K. Rasheed USDA Forest Service.
Genetic Algorithms Abhishek Sharma Piyush Gupta Department of Instrumentation & Control.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
Alice E. Smith and Mehmet Gulsen Department of Industrial Engineering
Figure 1. First period harvest units on the Putnam Tract using mixed integer programming methods.
Application of the GA-PSO with the Fuzzy controller to the robot soccer Department of Electrical Engineering, Southern Taiwan University, Tainan, R.O.C.
EMIS 7300 SYSTEMS ANALYSIS METHODS FALL 2005 Dr. John Lipp Copyright © 2005 Dr. John Lipp.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
The Implementation of Genetic Algorithms to Locate Highest Elevation By Harry Beddo.
Applications of Genetic Algorithms By Harry Beddo 3 rd Quarter.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
0 Simulation Modeling and Analysis: Input Analysis 7 Random Numbers Ref: Law & Kelton, Chapter 7.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithm(GA)
Evolutionary Design of the Closed Loop Control on the Basis of NN-ANARX Model Using Genetic Algoritm.
Genetic Algorithms and Evolutionary Programming A Brief Overview.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
Genetic (Evolutionary) Algorithms CEE 6410 David Rosenberg “Natural Selection or the Survival of the Fittest.” -- Charles Darwin.
Genetic Algorithm (Knapsack Problem)
Using GA’s to Solve Problems
Bulgarian Academy of Sciences
Traffic Simulator Calibration
Cryptography and Network Security Chapter 7
Boltzmann Machine (BM) (§6.4)
Generating Random and Pseudorandom Numbers
Generating Random and Pseudorandom Numbers
Presentation transcript:

Genetic Algorithms Can Be Used To Obtain Good Linear Congruential Generators Presented by Ben Sproat

Outline Linear Congruential Generators Linear Congruential Generators What are they? What are they? Why do we need a Genetic Algorithm? Why do we need a Genetic Algorithm? Genetic Algorithm Genetic Algorithm What are they? What are they? What do we need to use one? What do we need to use one? Putting them together Putting them together How do we decide if we have a good LCG? How do we decide if we have a good LCG? Results Results

Linear Congruential Generators Currently one of the most popular Pseudorandom Number Generator Currently one of the most popular Pseudorandom Number Generator Proposed by Lehmer in 1948 Proposed by Lehmer in 1948 Xn+1 = (a * Xn + b) mod m where Xo=seed Xn+1 = (a * Xn + b) mod m where Xo=seed Easy to implement and very fast Easy to implement and very fast

Simple LCG a= 7, b=2, m=17, Xo=9 a= 7, b=2, m=17, Xo=9 X1= (7 * 9 +2) mod 17 = 14 X1= (7 * 9 +2) mod 17 = 14 X2= (7 *14 +2) mod 17 = 15 X2= (7 *14 +2) mod 17 = 15 X3= (7 *15 +2) mod 17 = 5 X3= (7 *15 +2) mod 17 = 5 X4= (7 * 5 +2) mod 17 = 3 X4= (7 * 5 +2) mod 17 = 3 X5= (7 * 3 +2) mod 17 = 6 X5= (7 * 3 +2) mod 17 = 6

Problems With LCG’s Vulnerable to certain types of attacks Vulnerable to certain types of attacks Should not be used as key generators Should not be used as key generators Given certain choices for a, b, and m the numbers it produces may not be very useful Given certain choices for a, b, and m the numbers it produces may not be very useful Requires looking up good values for a, b, and m Requires looking up good values for a, b, and m Many programmers use pseudorandom techniques to pick a, b, and m Many programmers use pseudorandom techniques to pick a, b, and m

A bad LCG a= 1, b=4, m=8, Xo=5 a= 1, b=4, m=8, Xo=5 X1= (1 * 5 +4) mod 8 = 1 X1= (1 * 5 +4) mod 8 = 1 X2= (1 * 1 +4) mod 8 = 5 X2= (1 * 1 +4) mod 8 = 5 X3= (1 * 5 +4) mod 8 = 1 X3= (1 * 5 +4) mod 8 = 1 X4= (1 * 5 +4) mod 8 = 5 X4= (1 * 5 +4) mod 8 = 5 X5= (1 * 3 +4) mod 8 = 1 X5= (1 * 3 +4) mod 8 = 1

Genetic Algorithms Blind, stochastic near-optimal heuristic search method Blind, stochastic near-optimal heuristic search method Uses a fitness function to select potential chromosomes to be reproduced Uses a fitness function to select potential chromosomes to be reproduced Uses Genetic operators to reproduce Uses Genetic operators to reproduce Uses a Convergence criteria to decide when to stop Uses a Convergence criteria to decide when to stop

Crossover and Mutation Chromosome 1= Chromosome 1= Chromosome 2= Chromosome 2= Crossover Chromosome 1= Crossover Chromosome 1= Crossover Chromosome 2= Crossover Chromosome 2= Mutant Chromosome 1= Mutant Chromosome 1= Mutant Chromosome 2= Mutant Chromosome 2=

The Genetic Algorithm A population of N chromosomes is generated A population of N chromosomes is generated N chromosomes are selected randomly using the fitness function to determine proportions N chromosomes are selected randomly using the fitness function to determine proportions Two chromosomes are selected at random and crossed over and put in the new population repeat until the pool is empty Two chromosomes are selected at random and crossed over and put in the new population repeat until the pool is empty Mutate all the new Chromosomes Mutate all the new Chromosomes Test if the convergence criteria has been met Test if the convergence criteria has been met If not repeat If not repeat

Fitness Functions For our Problem There are many ways to determine a good LCG There are many ways to determine a good LCG May depend on what it will be used for May depend on what it will be used for There is really no good way to determine if an LCG is good or bad, so a battery of tests is normally used There is really no good way to determine if an LCG is good or bad, so a battery of tests is normally used

Statistical Tests For Randomness Entropy: information density of the output of one cycle of the generator Entropy: information density of the output of one cycle of the generator Chi-Square percentile: no LCG passes this test Chi-Square percentile: no LCG passes this test Arithmetic mean: the mean of the numbers generated should be approximately m/2 Arithmetic mean: the mean of the numbers generated should be approximately m/2 Monte Carlo value for Pi: random numbers can be used to calculate Pi! Monte Carlo value for Pi: random numbers can be used to calculate Pi!

Statistical Tests For Randomness Serial Correlation Coefficient: bit based dependency check Serial Correlation Coefficient: bit based dependency check Maximal Period: The maximal period for an LCG is m Maximal Period: The maximal period for an LCG is m Percentage of the maximum period achieved: Percentage of the maximum period achieved:

Results Fitness = entropy Fitness = entropy Fitness = entropy + period Fitness = entropy + period Fitness = entropy + period / maxperiod Fitness = entropy + period / maxperiod Fitness = entropy * period / maxperiod Fitness = entropy * period / maxperiod

abm % % % % % % % 1: Per byte entropy (optimum = 8.0) 2: Chi-Square percentile 3: Arithmetic mean (optimum = 127.5) 4: Error % in the estimation of Pi

Conclusion LCG’s are useful Pseudorandom Number Generators LCG’s are useful Pseudorandom Number Generators You must be careful in selecting your LCG You must be careful in selecting your LCG Genetic Algorithms are a fast way of generating good LCG’s Genetic Algorithms are a fast way of generating good LCG’s A good fitness function is essential A good fitness function is essential

Questions?