Computational Complexity Jang, HaYoung BioIntelligence Lab.

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

CS6800 Advanced Theory of Computation
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Chapter 10: Algorithm Design Techniques
An Introduction to Black-Box Complexity
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Programming.
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
1 Computer Algorithms Lecture 3 Asymptotic Notation Some of these slides are courtesy of D. Plaisted, UNC and M. Nicolescu, UNR.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Fuzzy Genetic Algorithm
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
 Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms n Introduction, or can evolution be intelligent? n Simulation.
Evolution Programs (insert catchy subtitle here).
1 Genetic Algorithms and Ant Colony Optimisation.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Edge Assembly Crossover
 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Optimization Problems
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon , Tel:
LIMITATIONS OF ALGORITHM POWER
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 P and NP. 2 Introduction The Traveling Salesperson problem and thousands of other problems are equally hard in the sense that if we had an efficient.
Ch03-Algorithms 1. Algorithms What is an algorithm? An algorithm is a finite set of precise instructions for performing a computation or for solving a.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Optimization by Quantum Computers
Chapter 14 Genetic Algorithms.
Genetic Algorithms.
Introduction Algorithms Order Analysis of Algorithm
Example: Applying EC to the TSP Problem
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms Chapter 3.
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
Artificial Intelligence CIS 342
Genetic algorithms: case study
GA.
Presentation transcript:

Computational Complexity Jang, HaYoung BioIntelligence Lab.

Algorithm Analysis Why Analysis? to predict the resources that the algorithm requires, such as computational time, memory, communication bandwidth, or logic gates. The running time of an algorithm is the number of primitives operations or “step”(machine independent) executed.

Complextity Space / Memory Time Count a particular operation Count number of steps Asymptotic complexity

Time Complexity Worst-case an upper bound on the running time for any input Average-case We shall assume that all inputs of a given size are equally likely. Best-case to get the lower bound

Time Complexity Sequential search in a list of size n worst-case : n times best-case : 1 times average-case :

Asymptotic Notation Asymptotic upper bound, we use - notation. For a given function g(n), we denote by  (g(n)) the set of functions; (g(n)) = {f(n): there exist positive constants c and n 0 such that f(n) = n 0 }.

Asymptotic Notation -notation provides an asymptotic lower bound. For a given function g(n), we denote by (g(n)) the set of functions (g(n)) = {f(n): there exist positive constants c and n 0 such that f(n) >= cg(n) for all n >= n 0 }.

Asymptotic Notation (g(n)) = {f(n) : there exist positive constants c 1, c 2, and n 0 such that c 1 g(n) = n 0 }.

Asymptotic Notation

The sets (n 2 ), (n 2 ), and (n 2 )

Practical Complexities 10 9 instructions/second computer

Impractical Complexities 10 9 instructions/second computer

Faster Computer Vs Better Algorithm Algorithmic improvement more useful than hardware improvement. E.g. 2 n to n 3

Intractability A polynomial-time algorithm is one whose worst- case time complexity is bounded above by a polynomial function of its input size. example - worst-case time complexity - Polynomial-time : 2n, 3n 3 + 4n, 5n + n 10, n log n - Non polynomial-time : Intractable problem - No polynomial-time algorithm can solve it. W(n)   (p(n))

Three Categories of Problems (1) 1. Problems for which polynomial-time algorithms have been found 2. Problems that have been proven to be intractable - The first type is problems that require a non- polynomial amount of output. e.g. Determining all Hamiltonian Circuits. - The second type of intractability occurs when our requests are reasonable and we can prove that the problem cannot be solved in polynomial time. e.g. Halting Problem, Presburger Arithmetic Problem

Three Categories of Problems (2) Presburger Arithmetic is the theory of integers with addition (Z,+,=,<,0,1) and is known to require doubly exponential nondeterministic time. 3. Problems that have not been proven to be intractable but for which polynomial-time algorithms have never been found e.g. 3-SAT, 0-1 Knapsack, TSP, Sum-of-Subset, Partition, Graph-Coloring, Independent Set, Vertex-Cover, Clique,3D-Matching, Set Cover, etc.

The Sets P and NP (1) Definition P is the set of all decision problems that can be solved in polynomial-time. A NP algorithm have two stages: 1. Guessing (in nondeterministic polynomial time) Stage 2. Verification (in deterministic polynomial time) Stage Definition NP is the set of all decision problems that can be solved in nondeterministic polynomial-time.

The Sets P and NP (2)

Genetic Algorithms

An Abstract View of GA generate initial population G(0); evaluate G(0); t := 0 ; repeat t := t + 1; generate G(t) using G(t-1); evaluate G(t); until termination condition has reached;

Search Techniques SEARCH TECHNIQUES Calculus-based techniques. Guided Random Search Techniques Enumerative Techniques Directed Methods Indirected Methods Fibonacci Newton Simulated Evolutionary Annealing Algorithms Evolutionary Genetic Algorithms strategies Dynamic PGMing Parallel Sequential GAs Classes of Search techniques

Simple Genetic Algo's components 1. A mechanism to encode the solutions as binary strings 2. A population of binary strings 3. A fitness function 4. Genetic operators 5. Selection mechanism 6. Control parameters

Population (chromosomes) Selection (mating pool ) Evaluation (fitness) Genetic Operators Mates Manipulation New Generation Offspring* Decoded strings Parents* Reproduction = Evaluation + Selection Crossover & Mutation The GA Cycle

The mechanism for evaluating each string To maintain uniformity over various problem domains, normalize the obj.function to 0 to 1. The normalized value of the obj. function = the fitness of the string Fitness function (object function)

Models nature's "survival-of-the-fittest " mechanism A fitter string receives higher number of offspring. Proportionate selection scheme The roulette wheel selection scheme Selection

After Selection, pairs of string are picked at random If string length = n, randomly choose a number from 1 to n - 1, then use it as a crossover point. GA invokes crossover ONLY IF a randomly generated n o > p c. (p c = the crossover rate) Crossover

After crossover, string are subjected to mutation Flipping bits : 0 1, 1 0 Mutation rate : P m = probability that a bit will be flipped The bits in a string are independently mutated. = Role : restoring lost genetic material Mutation

Function Definition Find x from the range [-1, 2] which maximizes the f

Analysis of function f

Representation (1) Representation of string six places after decimal point The range [-1,2] should be divided into at least ranges. Binary representation : 22 bits Mapping from a binary string into a real number x Convert the binary string from the base 2 to base 10: Find a corresponding real number x:

Representation (2) String Example : string ( ) String x 2.0

Initial Population Create a population of strings, where each chromosome is a binary vector of 22 bits. All 22 bits for each string are initialized randomly.

Evaluation Function eval(v) = f(x) For example, Strings v 1=( ) v 2=( ) v 3=( ) xf(x) x 1= x 2= x 3= f(x 1 ) = f(x 2 ) = f(x 3 ) = The string v 3 is the best of the three strings, since its evaluation returns the highest value. The string v 3 is the best of the three strings, since its evaluation returns the highest value.

Genetic Operators : Mutation Mutation Mutation alters one or more genes with a probability equal to mutation rate. Mutation Example : v 3=( ) v 3’=( ) v 3’’=( ) Fifth gene10th gene

Genetic Operators : Crossover Crossover Example : The crossover on v2 and v3 Assume that the crossover point was randomly selected after 5th gene: v 2=(00000 | ) v 3=(11100 | ) v 2=(00000 | ) v 3=(11100 | ) v 2’=(00000 | ) v 3”=(11100 | ) v 2’=(00000 | ) v 3”=(11100 | ) Before Crossover After Crossover x 2= x 3= f(x 1 ) = f(x 2 ) = x 2’= x 3”= f(x 1’ ) = f(x 2” ) =

Parameters Population size = 50 Probability of crossover = 0.25 Probability of mutation = 0.01

Experimental results The best chromosome after 150 generations Vmax = ( ) Xmax = As expected,, and f(x max ) is slightly larger than 2.85.