Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formal Language & Automata Theory

Similar presentations


Presentation on theme: "Formal Language & Automata Theory"— Presentation transcript:

1 Formal Language & Automata Theory
Shyamanta M Hazarika Computer Sc. & Engineering Tezpur University

2 Regular Language When we say: We are given a Regular Language We mean:
Language is in a standard representation

3 Standard Representations
Regular Languages DFAs Regular Grammars NFAs Regular Expressions

4 Membership Question Question: Given regular language and string
how can we check if ? Answer: Take the DFA that accepts and check if is accepted

5 Membership Question DFA DFA

6 Elementary Question Question: Given regular language how can we check
if is empty: ? Take the DFA that accepts Check if there is a path from the initial state to a final state Answer:

7 Elementary Question DFA

8 Elementary Question Question: Given regular language
how can we check if is finite? Answer: Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state

9 Elementary Question DFA is infinite DFA is finite

10 Elementary Question Question: Given regular languages and
how can we check if ? Answer: Find if

11 Elementary Question and

12 Elementary Question or

13 Non-regular languages

14 Prove language is Not Regular
How can we prove that a language is not regular? Prove that there is no DFA that accepts Problem: this is not easy to prove Solution: Pumping Lemma !!!

15 The Pigeonhole Principle
pigeons pigeonholes

16 The Pigeonhole Principle
A pigeonhole must contain at least two pigeons

17 The Pigeonhole Principle
pigeons pigeonholes

18 The Pigeonhole Principle
pigeons pigeonholes There is a pigeonhole with at least 2 pigeons

19 Pigeonhole and DFA DFA with states

20 Pigeonhole and DFA In walks of strings: no state is repeated

21 Pigeonhole and DFA a state is repeated In walks of strings:

22 Pigeonhole and DFA If the walk of string has length
then a state is repeated

23 Pigeonhole principle for any DFA
If in a walk of a string transitions states of DFA then a state is repeated


Download ppt "Formal Language & Automata Theory"

Similar presentations


Ads by Google