Complexity of Functions with Cartesian GP and Recursion. John Woodward. School of Computer Science, The University of Birmingham, United Kingdom. 1 OVERVIEW.

Slides:



Advertisements
Similar presentations
Lecture 15. Graph Algorithms
Advertisements

Continuing Abstract Interpretation We have seen: 1.How to compile abstract syntax trees into control-flow graphs 2.Lattices, as structures that describe.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Primitive Recursive Functions (Chapter 3)
Chapter 8 ICS 412. Code Generation Final phase of a compiler construction. It generates executable code for a target machine. A compiler may instead generate.
Based on: Petri Nets and Industrial Applications: A Tutorial
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Fast Algorithms For Hierarchical Range Histogram Constructions
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
Graph Drawing and Information Visualization Laboratory Department of Computer Science and Engineering Bangladesh University of Engineering and Technology.
CS320n –Visual Programming LabVIEW Foundations. Visual ProgrammingLabVIEW Foundations2 What We Will Do Today Hand back and review the midterm Look at.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Fall 2006Costas Busch - RPI1 Regular Expressions.
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Polynomial-Time Approximation Schemes for Geometric Intersection Graphs Authors: T. Erlebach, L. Jansen, and E. Seidel Presented by: Ping Luo 10/17/2005.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Tutorial 12 Unconstrained optimization Conjugate gradients.
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Data Flow Analysis Compiler Design Nov. 8, 2005.
1 Lecture 36 Attempt to prove that CFL’s are closed under intersection –Review previous constructions –Translate previous constructions to current setting.
Improving Code Generation Honors Compilers April 16 th 2002.
Improving code generation. Better code generation requires greater context Over expressions: optimal ordering of subtrees Over basic blocks: Common subexpression.
ECE 667 Synthesis and Verification of Digital Systems
Data Flow Analysis Compiler Design Nov. 8, 2005.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Dynamic Programming Introduction to Algorithms Dynamic Programming CSE 680 Prof. Roger Crawfis.
Advanced Algorithm Design and Analysis Student: Gertruda Grolinger Supervisor: Prof. Jeff Edmonds CSE 4080 Computer Science Project.
Induction and recursion
Genetic Programming.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Solving fixpoint equations
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Multiway Trees. Trees with possibly more than two branches at each node are know as Multiway trees. 1. Orchards, Trees, and Binary Trees 2. Lexicographic.
Iteration Iterative operator: for, du, while. Problem: Infinite and time-consuming iterations. Halting problem: We are not able to determine whether an.
Compiler Chapter# 5 Intermediate code generation.
Logic Circuits Chapter 2. Overview  Many important functions computed with straight-line programs No loops nor branches Conveniently described with circuits.
Approximation algorithms for TSP with neighborhoods in the plane R 郭秉鈞 R 林傳健.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 8. Greedy Algorithms.
# 1 CMPS 450 Syntax-Directed Translations CMPS 450 J. Moloney.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
A Syntactic Justification of Occam’s Razor 1 John Woodward, Jerry Swan Foundations of Reasoning Group University of Nottingham Ningbo, China 宁波诺丁汉大学
Functions and Their Representations
Relation. Combining Relations Because relations from A to B are subsets of A x B, two relations from A to B can be combined in any way two sets can be.
Regular Expressions Costas Busch - LSU.
CSC5101 Advanced Algorithms Analysis
The Pebble Game Geri Grolinger York University. The Pebble Game Used for studying time-space trade-off Used for studying time-space trade-off One player.
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
CS 598 Scripting Languages Design and Implementation 9. Constant propagation and Type Inference.
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Lecture 2 Introduction to Programming
Single Final State for NFA
Language Recognition (12.4)
Enumerating Distances Using Spanners of Bounded Degree
Comparative RNA Structural Analysis
Interval Partitioning of a Flow Graph
Language Recognition (12.4)
COMPILER CONSTRUCTION
Presentation transcript:

Complexity of Functions with Cartesian GP and Recursion. John Woodward. School of Computer Science, The University of Birmingham, United Kingdom. 1 OVERVIEW Genetic Programming (GP) often uses a tree form of a graph to represent solutions. An extension to this representation, Automatically Defined Functions (ADFs) is to allow the ability to express modules. We proved that the complexity of a function is independent of the primitive set (function set and terminal set) if the representation has the ability to express modules. This is essentially due to the fact that if a representation can express modules, then it can effectively define its own primitives at a constant cost. Cartesian Genetic Programming (CGP) is a relative new type of representation used in Evolutionary Computation (EC), and differs from the tree based representation in that outputs from previous computations can be reused. This is achieved by representing programs as directed acyclic graphs (DAGs), rather than as trees. Thus computations from sub trees can be reused to reduce the complexity of a function. We prove an analogous result; the complexity of a function using a Cartesian Program (CP) representation is independent of the terminal set (up to an additive constant), provided the different terminal sets can both be simulated.This is essentially due to the fact that if a representation can express Automatic Reused Outputs, then it can effectively define its own terminal set at a constant cost. 5 Cartesian Genetic Programming Genotype 2 1 3, 3 2 1, 2 3 2, 6 6 3, 4 2 4, 2 6 3, … Interpret as (input, input, function) the first pair being inputs, the last number Representing a function (+, -, *, /) interpreted as (1, 2, 3, 4). This representation contains neutrality. The program has 3 inputs (1, 2, 3) and 3 outputs (10, 11, 12). The outputs of each node are labelled consecutively from 4. Information flows from left to right, there is reuse of computed values. * * / * * Visualization of CGP Proof Cartesian Program. T1 expressed in terms of F and T2 Function expressed in terms of T1 and F. Given two primitive sets p1 (= F U T1) and p2 (= F U T2) i.e. they contain the same function set but different terminal sets. We assume they are equally expressive. Given a function expressed in terms of p1 (the box on the right), We can construct a program expressed in terms of p2, By constructing a program which converts T2 into T1 (the box on the left) and feeding its outputs into the original program. The size, s(p), of a program is the number of nodes it contains. A primitive set, p1, is the union of the function set and terminal set. A dictionary D p1p2 is the set of programs which express each of the primitives in set p2 in terms of programs written in p1. The complexity of a function C(f) p1 is the size of the smallest program which expresses that function (w.r.t. a given primitive set). The complexity of a dictionary C(D p1p2 ) is the size of the smallest dictionary. The translation of primitive sets is the process of taking a function expressed using one primitive set and expressing it using another. Two primitive sets are equally expressive if they can express the same class of functions in finite size. 2 Definitions 3 Automatically Defined Functions b a arg1 adf a c 4.1 ADFs allow new functions to be defined. Once defined, the function can be called as many times as needed. Essentially, a new primitive set can be defined in terms of the current primitive set. The main tree on the left calls the adf on the right twice. An arbitrary sub tree can be extracted and expressed as an ADF. 8 Summary The complexity of a function when expressed in one primitive set, Is sandwiched between the complexities then expressed using a different primitive set. Note that the constants are different, but related. In general we can say these bounds are the tightest obtainable. This result was first obtained for ADFs, but is found to include recursion and iteration. The result for CGP only holds for translation of terminal sets as the degree of reuse in CGP is limited. 4 Translation of primitive set for ADFs GP expressed in terms of p1 GP expressed in terms of p1 Set of primitives p1 expressed as ADFs in terms of p2 Given a program expressed in terms of p1 (the single box), We can construct a program in terms of p2 in two stages. First, construct the set of ADFs which express p1 in terms of p2 (i.e. the dictionary D). Second, in the original GP program, remove references to p1 and Refer instead to the appropriate ADF corresponding to that primitive in the dictionary. 6 Another view of CGP If we view CGP as a tree, reuse can be expressed as overlapping sub trees (All the way down to the root nodes – see shaded circle). As the type of reuse is constrained, the central result only holds for translation of terminals and not the whole primitive set. C(f) p1 C(f) p2 arg2