Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 355 Foundations of Computation

Similar presentations


Presentation on theme: "CSCE 355 Foundations of Computation"— Presentation transcript:

1 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

2 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

3

4 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 )

5 Graphs – Visual representation of relations (binary)
a R b if and only if ab in the graph

6 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.

7 Mutual Inductions Example On-Off pushbutton automaton

8 Languages Alphabet – a finite set of symbols
String – finite sequence of characters from an alphabet Empty string, length of string Language (over an alphabet)

9 Operations on Strings

10 Examples of Languages

11 Operations on Languages
Suppose S and T are languages (sets of strings) Union, intersection, complement concatenation

12 Powers, Kleene Closure S1 = S Sn = S Sn-1
How would you prove Sn Sm = Sn+m ? What is S0? S*

13 Some Special Languages

14 Finite Automata - Informally

15 Finite Automata - formally
A Deterministic Finite Automata (DFA) is a 5-tuple

16 Transition Diagrams; Transition Tables
Conventions Notes Number of out-arcs Dead state

17 Path determined by a string

18 Language accepted by a DFA

19 Example L(M) for DFA M

20 Given L find DFA for it

21 Important application of Pigeon Hole Principle to DFAs

22 Regular Expressions

23 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?

24 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

25 References– Mathematical Foundations
- The website for the textbook Extended “Proof” techniques Fair Use Books Online Books Dr. Euler's Fabulous Formula: Cures Many Mathematical Ills


Download ppt "CSCE 355 Foundations of Computation"

Similar presentations


Ads by Google