Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations of Computation
– 2 – CSCE 355 Summer an/ialc/slides/slides1.pdf
– 3 – CSCE 355 Summer 2015 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 1.G = E + F 2.G = E * F 3.G = ( E )
– 4 – CSCE 355 Summer 2015 Graphs – Visual representation of relations (binary) a R b if and only if a b in the graph
– 5 – CSCE 355 Summer 2015 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.
– 6 – CSCE 355 Summer 2015 Mutual Inductions Example 1.23 On-Off pushbutton automaton
– 7 – CSCE 355 Summer 2015 Languages Alphabet – a finite set of symbols String – finite sequence of characters from an alphabet Empty string, length of string Language (over an alphabet)
– 8 – CSCE 355 Summer 2015 Operations on Strings
– 9 – CSCE 355 Summer 2015 Examples of Languages
– 10 – CSCE 355 Summer 2015 Operations on Languages Suppose S and T are languages (sets of strings) Union, intersection, complement concatenation
– 11 – CSCE 355 Summer 2015 Powers, Kleene Closure S 1 = S S n = S S n-1 How would you prove S n S m = S n+m ? What is S 0 ? S *
– 12 – CSCE 355 Summer 2015 Some Special Languages
– 13 – CSCE 355 Summer 2015 Finite Automata - Informally
– 14 – CSCE 355 Summer 2015 Finite Automata - formally A Deterministic Finite Automata (DFA) is a 5-tuple
– 15 – CSCE 355 Summer 2015 Transition Diagrams; Transition Tables ConventionsNotes 1.Number of out-arcs 2.Dead state
– 16 – CSCE 355 Summer 2015 Path determined by a string
– 17 – CSCE 355 Summer 2015 Language accepted by a DFA
– 18 – CSCE 355 Summer 2015 Example L(M) for DFA M
– 19 – CSCE 355 Summer 2015 Given L find DFA for it
– 20 – CSCE 355 Summer 2015 Important application of Pigeon Hole Principle to DFAs
– 21 – CSCE 355 Summer 2015 Regular Expressions
– 22 – CSCE 355 Summer 2015 Homework 1.What’s wrong with Ullman’s proof of “if a complete binary tree has n leaves then it has 2n- 1 nodes.” (extra credit) 2.Operations on Strings Given strings s = abc and t=12 What are st, s2, and s3? Is ε (empty string) in every language? c. Is ϕ a language? It is a sublanguage of every language? 3.Operations on Languages. Given S = {a, b, ab} and T = {1, 22} a. What is ST? b. What is TS? c. What is T 2 ? T 3 ?
– 23 – CSCE 355 Summer 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
– 24 – CSCE 355 Summer 2015 References– Mathematical Foundations - The website for the textbook Extended “Proof” techniques proofs.html proofs.html proofs.html Fair Use Books Online mathematics/ mathematics/ mathematics/Books Dr. Euler's Fabulous Formula: Cures Many Mathematical Ills