Lecture 2 Alphabets, Strings and Languages - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Lecture 2 Alphabets, Strings and Languages

Description:

The Pigeon Hole Principle. Proof techniques Continued ... Important application of Pigeon Hole Principle to DFAs. Regular Expressions. Homework ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 26
Provided by: mantonm5
Category:

less

Transcript and Presenter's Notes

Title: Lecture 2 Alphabets, Strings and Languages


1
Lecture 2Alphabets, Strings and Languages

CSCE 355 Foundations of Computation
  • 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
http//infolab.stanford.edu/ullman/ialc/slides/sl
ides1.pdf
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 gt B then
    there is no 1-1 function from A to B.

7
Mutual Inductions
  • Example 1.23 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 Snm ?
  • 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
  • Whats wrong with Ullmans proof of if a
    complete binary tree has n leaves then it has
    2n-1 nodes. (extra credit)
  • Operations on StringsGiven strings s abc and
    t12
  • What are st , s2, and s3?
  • Is e (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
  • 3. 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
  • 4. What language does the DFA below recognize

25
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-principle
    s-of-mathematics/
  • Books
  • Dr. Euler's Fabulous Formula Cures Many
    Mathematical Ills
Write a Comment
User Comments (0)
About PowerShow.com