CSCE 355 Foundations of Computation Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata Aug 27, 2007
What I forgot from last lecture Slides skipped or not well covered: 3 – Course outcomes 8 – Examples of Relations 9 – POSETS 10 – Equivalence relations 15 – Equality of Sets 17 – If and only if 25 – Structural Induction Proof
http://infolab.stanford.edu/~ullman/ialc/slides/slides1.pdf
Recursive Def of Arithmetic Expressions Basis: a number or a variable is an expression. If E and F are expressions then a new expression G can be formed by applying one of the three rules G = E + F G = E * F G = ( E )
Graphs – Visual representation of relations (binary) a R b if and only if ab in the graph
The Pigeon Hole Principle Proof techniques Continued If you have n boxes and more than n balls to put in the boxes then you must be two balls (at least two) in the same box. Formally If A and B are sets with |A| > |B| then there is no 1-1 function from A to B.
Mutual Inductions Example 1.23 On-Off pushbutton automaton
Languages Alphabet – a finite set of symbols String – finite sequence of characters from an alphabet Empty string, length of string Language (over an alphabet)
Operations on Strings
Examples of Languages
Operations on Languages Suppose S and T are languages (sets of strings) Union, intersection, complement concatenation
Powers, Kleene Closure S1 = S Sn = S Sn-1 How would you prove Sn Sm = Sn+m ? What is S0? S*
Some Special Languages
Finite Automata - Informally
Finite Automata - formally A Deterministic Finite Automata (DFA) is a 5-tuple
Transition Diagrams; Transition Tables Conventions Notes Number of out-arcs Dead state
Path determined by a string
Language accepted by a DFA
Example L(M) for DFA M
Given L find DFA for it
Important application of Pigeon Hole Principle to DFAs
Regular Expressions
Homework What’s wrong with Ullman’s proof of “if a complete binary tree has n leaves then it has 2n-1 nodes.” (extra credit) Operations on Strings Given strings s = abc and t=12 What are st, s2, and s3? Is ε (empty string) in every language? Is ϕ a language? It is a sublanguage of every language? Operations on Languages. Given S = {a, b, ab} and T = {1, 22} What is ST? What is TS? What is T2? T3?
4. DFA recognizing the following languages {w in {a,b}* | each a is immediately preceded by a b} {w in {a,b}* | neither aa nor bb is a substring of w } 5. What language does the DFA below recognize
References– Mathematical Foundations http://infolab.stanford.edu/~ullman/ialc.html - The website for the textbook Extended “Proof” techniques http://www.maths.uwa.edu.au/~berwin/humour/invalid.proofs.html Fair Use Books Online http://fair-use.org/bertrand-russell/the-principles-of-mathematics/ Books Dr. Euler's Fabulous Formula: Cures Many Mathematical Ills