Programming from Galois Connections

Slides:



Advertisements
Similar presentations
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Advertisements

A simple example finding the maximum of a set S of n numbers.
Greedy Algorithms Greed is good. (Some of the time)
Nattee Niparnan. Recall  Complexity Analysis  Comparison of Two Algos  Big O  Simplification  From source code  Recursive.
© Love Ekenberg The Algorithm Concept, Big O Notation, and Program Verification Love Ekenberg.
Instruction set architecture Problems Prof. Sin-Min Lee Department of Mathematics and Computer Science.
EXAMPLE: 3.1 ASSEMBLING AND TESTING COMPUTERS
Thinking Mathematically Algebra: Graphs, Functions and Linear Systems 7.3 Systems of Linear Equations In Two Variables.
‘Galculator’ Functional Prototype of a Galois-connection Based Proof Assistant João Carneiro 22/06/2012 Thematic Seminar – MAP-i.
Tips for Success Get ready for This Course Tips for Success
An equation is a mathematical statement that two expressions are equivalent. The solution set of an equation is the value or values of the variable that.
1 Chapter 1 Analysis Basics. 2 Chapter Outline What is analysis? What to count and consider Mathematical background Rates of growth Tournament method.
Dynamic Programming. Well known algorithm design techniques:. –Divide-and-conquer algorithms Another strategy for designing algorithms is dynamic programming.
1 Recurrences Algorithms Jay Urbain, PhD Credits: Discrete Mathematics and Its Applications, by Kenneth Rosen The Design and Analysis of.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
Algorithms  Al-Khwarizmi, arab mathematician, 8 th century  Wrote a book: al-kitab… from which the word Algebra comes  Oldest algorithm: Euclidian algorithm.
1.4 Solving Equations ●A variable is a letter which represents an unknown number. Any letter can be used as a variable. ●An algebraic expression contains.
Lecture Topics covered CMMI- - Continuous model -Staged model PROCESS PATTERNS- -Generic Process pattern elements.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
Thinking Mathematically Systems of Linear Equations.
Data Structures & Algorithms Recursion and Trees Richard Newman.
1 SYNTHESIS of PIPELINED SYSTEMS for the CONTEMPORANEOUS EXECUTION of PERIODIC and APERIODIC TASKS with HARD REAL-TIME CONSTRAINTS Paolo Palazzari Luca.
MM150 Unit 3 Seminar Agenda Seminar Topics Order of Operations Linear Equations in One Variable Formulas Applications of Linear Equations.
7 jumps right 12 jumps left Objective - To solve problems involving scientific notation Scientific Notation- used to write very large or very small numbers.
Bell Ringer 2. Systems of Equations 4 A system of equations is a collection of two or more equations with a same set of unknowns A system of linear equations.
ALGORITHMS AND FLOWCHARTS. Why Algorithm is needed? 2 Computer Program ? Set of instructions to perform some specific task Is Program itself a Software.
 Most C programs perform calculations using the C arithmetic operators (Fig. 2.9).  Note the use of various special symbols not used in algebra.  The.
Lesson 8.1. » A statement where two mathematical expressions are. » Think of an equation as a balance scale or teeter-totter. The left side must always.
§ 2.2 The Multiplication Property of Equality. Blitzer, Introductory Algebra, 5e – Slide #2 Section 2.2 Properties of Equality PropertyDefinition Addition.
CSCI 58000, Algorithm Design, Analysis & Implementation Lecture 12 Greedy Algorithms (Chapter 16)
Roots & Zeros of Polynomials I
Ch. 8.5 Exponential and Logarithmic Equations
Modeling with Recurrence Relations
ALGORITHMS AND FLOWCHARTS
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
UNIT SELF-TEST QUESTIONS
Lecture 22 Complexity and Reductions
Symbolic Implementation of the Best Transformer
Objective - To solve problems involving scientific notation
Growth Functions Algorithms Lecture 8
Solving Rational Equations and Inequalities
Solving Equations by 2-1 Adding or Subtracting Warm Up
Analysis and design of algorithm
Algebra: Equations and Inequalities
College Algebra 1.5 Complex Numbers
Data Structures & Algorithms
Objective of This Course
Section 8-2: Multiplying and Dividing Rational Expressions
Roots & Zeros of Polynomials I
Roots & Zeros of Polynomials I
What is an equation? An equation is a mathematical statement that two expressions are equal. For example, = 7 is an equation. Note: An equation.
Chapter 1 Introduction(1.1)
Chapter 11 Limitations of Algorithm Power
Solving Recurrence Relations
Substitution method y= 3x+1 5x + 2 y =13 Solve:
Roots & Zeros of Polynomials I
Solving Inequalities in One Variable
Longest increasing subsequence (LIS) Matrix chain multiplication
Copyright © Cengage Learning. All rights reserved.
Roots & Zeros of Polynomials I
Multiply and Divide I can count equal groups of items saying how many groups and how many altogether. I can explain that multiplying is an easy way to.
Major Design Strategies
Chapter 3 Algebra Copyright  2010 McGraw-Hill Australia Pty Ltd PowerPoint slides to accompany Croucher, Introductory Mathematics and Statistics, 5e.
Substitution 1. Calculate a + b – c If a = 10 b = 8 and c = 12
Solving Equations by 2-1 Adding or Subtracting Warm Up
Roots & Zeros of Polynomials I
ECE 352 Digital System Fundamentals
Major Design Strategies
Maths Unit 7 (F) – Equations & Sequences
Presentation transcript:

Programming from Galois Connections Anisa Allahdadi Thematic Seminar 21 June 2012

Objectives Problem Statements: one defining a broad class of solutions (the easy part) requesting one particular optimal solution, (the hard part) This article introduces a binary relational combinator which mirrors this linguistics structure and exploits its potential for calculating programs by optimization.

Some skills of a good programmer Abstraction Abstract Modeling, in the early stages of thinking about a software problem Induction Solving a complex program by imagining some smaller parts already solved Divide and conquer programming strategy

The “Best” Solution Whole number division: x ÷ y is the largest natural number when multiplied by y, is at most x takeWhile p: longest prefix of the input list such that all elements satisfy predicate p Scheduling: The best schedule for a collection of tasks, given their time spans and an acyclic graph

Easy / Hard E: the collection of solution candidates H: criteria under which a best solution is chosen

Example #1 x ÷ y is the largest natural number that, when multiplied by y, is at most x.

Galois Connection A Galois connection is a pair of functions f and g satisfying: f and g are adjoints of each other (f is the lower adjoint and g is the upper adjoint)

Example #2 Indirect Equality Galois connection blending with indirect equality

Cont.

Example #3 Take (n, x): yields the longest prefix of its input sequence up to some given length n.

Cont.

Shrink Operator Galois adjoints By the easy part E is “shrunk” by the requirements of the hard part H

Cont. Factoring Galois connection into two parts

Cont. Abbreviate to : the left hand operator: the right hand operand: Given two relations of and , “Shrunk by R”:

Conclusion Galois connection as a well-known mathematical device capable of scaling up “programming from Galois connections” is proposed as a way of calculating programs from specifications in form of Galois connections The main contribution of this work: using the algebra of programming expressed in closed formula which records what is “easy” and “hard” to implement A new relational combinator (shrinking) expressing such formula at pointfree level Cons: not every problem casts into a Galois connection

Questions? Thanks for your time!