Erik Jonsson School of Engineering
This presentation is the property of its rightful owner.
Sponsored Links
1 / 105

Erik Jonsson School of Engineering and Computer Science PowerPoint PPT Presentation


  • 64 Views
  • Uploaded on
  • Presentation posted in: General

Erik Jonsson School of Engineering and Computer Science. CS 4384 – 0 01. Automata Theory. http://www.utdallas.edu/~pervin. Tuesday: Context-Free Languages Chapter Three – Review All. Thursday 4-03-14. FEARLESS Engineering.

Download Presentation

Erik Jonsson School of Engineering and Computer Science

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Erik jonsson school of engineering and computer science

Erik Jonsson School of Engineering

and Computer Science

CS 4384– 001

Automata Theory

http://www.utdallas.edu/~pervin

Tuesday: Context-Free Languages

Chapter Three – Review All

Thursday4-03-14

FEARLESS Engineering


Erik jonsson school of engineering and computer science

A search of Albert Einstein's archived manuscripts last year turned up a draft of an early unpublished paper by the famed physicist that concluded, mistakenly, that new matter, such as stars and galaxies, would appear to fill the expanding universe. Einstein was attempting to make sense of Edwin Hubble's observation that the universe was expanding, but he made a mathematical error. When he discovered his mistake, he set aside the paper, which is now in a digital archive of his papers at the Hebrew University in Jerusalem. Waterford Institute of Technology physicist Cormac O'Raifeartaigh and colleagues found the paper while scouring the archive.


Context free languages

Context-free Languages

Chapter Three


Erik jonsson school of engineering and computer science

Palindromes


Chomsky normal form

Chomsky Normal Form


O ther simplifications

Other Simplifications

Useful variables and productions

Left-recursion


Useless example

Useless Example


Left recursion

Left-recursion

3-04-14


Pushdown automata

Pushdown Automata

Many similar definitions


Stack

STACK


Erik jonsson school of engineering and computer science

Odd Palindrome


Erik jonsson school of engineering and computer science

Even Palindrome


Cfg pda

CFG » PDA


Pumping lemma

PUMPING LEMMA

Context-Free


Note cfls are not closed under intersection or complement

NOTE: CFLs are not closed under intersection (or complement)!


Erik jonsson school of engineering and computer science

Martin, P. 218; H&U, P. 115


Erik jonsson school of engineering and computer science

CS 341 – UT-Austin


Erik jonsson school of engineering and computer science

CS 341 – UT-Austin


Informal verbal pdas

Informal Verbal PDAs


Erik jonsson school of engineering and computer science

Read and push a’s onto the stack; read b’s and match them against the stack until empty; read any additional b’s and push them onto the stack; read and match c’s with stack exactly.


Erik jonsson school of engineering and computer science

For each a read, non-deterministically push ONE or TWO a’s on the stack; then match b’s read exactly with stack.


Ambiguity

Ambiguity

Dangling ELSE Problem


Erik jonsson school of engineering and computer science

“An ELSE belongs to the last preceding IF for which there is no ELSE already”


Deterministic pushdown automata

Deterministic Pushdown Automata


Erik jonsson school of engineering and computer science

Martin, P. 172 Corrected


End of file empty stack

End of File (EOF):

UNIX Control-D (ASCII 04)

Windows Control-Z (ASCII 26)

Java’s Buffered Reader Null (ASCII 0)

Empty Stack ($), (Zo)

End of File; Empty Stack


Parsing

PARSING


Cfg pda1

CFG » PDA


Erik jonsson school of engineering and computer science

S -> aSb | ab => S -> X_aY | X_aX_b ; Y -> SX_b;

X_a -> a ; X_b -> b


Erik jonsson school of engineering and computer science

What if more than four characters needed?


Transducer

  • An automaton whose output response is limited to a simple “yes” or “no” is called an accepter. Presented with an input string, an accepter either accepts (recognizes) the string or rejects it.

  • A more general automaton, capable of producing strings of symbols as output, is called a transducer.

Transducer

Linz, P. 26 (Pushdown Transducer)


Erik jonsson school of engineering and computer science

RPN


Erik jonsson school of engineering and computer science

Linz, P. 32


Erik jonsson school of engineering and computer science

Mealy machine (1955)


Mealy machine examples

  • One’s Complement:

  • Increment:

Mealy Machine Examples


Erik jonsson school of engineering and computer science

Note: You can combine the START and C states and get:


Two s complements

TWO’S COMPLEMENTS

CHAPTER_ONE


Review problems

Review Problems


Erik jonsson school of engineering and computer science

Done in class


Erik jonsson school of engineering and computer science

  • Done in class


Erik jonsson school of engineering and computer science

  • Done in class


Deterministic pushdown automata1

Deterministic Pushdown Automata


Erik jonsson school of engineering and computer science

Martin, P. 172 Corrected


Deterministic context free languages

Deterministic Context-Free Languages


Parsing1

Parsing

LL(k) Grammars


Practice

PRACTICE

CFG+PDA+CFL+PL


Sample test

Sample Test


Erik jonsson school of engineering and computer science

(Nothing “useless”)

Example 3.4.1 on P. 105ff M&S


Erik jonsson school of engineering and computer science

End of Test!


  • Login