Regular Languages: DFAs, NFAs, and Regular Expressions

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What is the minimum pumping length of {}, or the empty set ∅?

0

What is the minimum pumping length of this language:{ε}

1

What is the minimum pumping length of this language:{∑*}

1

What is the minimum pumping length of this language:{(01)*}

2

What is the minimum number of states required in a DFA that accepts Lₙ? (hint: remember exponential blowup)

2ⁿ states

What is the minimum pumping length of this language:{1011}

5

What is a DFA?

A computational model that generates regular languages. M is a dfa and is represented by a 5-tuple: M = (∑, Q, s, δ, F) ∑ is the alphabet it recognizes Q is the FINITE set of states

What is a NFA?

A more powerful, parallel, non deterministic finite automaton

What is a "distinguishing string"?

A string z that when combined/concatenated with two different strings x,y, xz ∈ L yz ∉ L

What is a regular expression?

A way to describe a regular language. A string of symbols in the set ∑ ∪ {ε, ∅, +, ., *} Syntax definition:1. ε is a re 2. ∅ is a re 3. ∀a ∈ ∑, a is a re 4. If r₁,r₂ are re's, then r₁+r₂ and r₁.r₂ are re's as well 5. If r is a re, then r* is too Semantics: The language denoted by a re is: 1. L(ε) = {ε} 2. L(∅) = ∅ 3. ∀a ∈ ∑, L(a) = {a} 4. L(r₁+r₂) = L(r₁)∪L(r₂) 5. L(r₁.r₂) = L(r₁).L(r₂) 6. L(r*) = (L(r))*

What operations are regular languages closed under? Hint: there are 7.

Concatenation Complement Union Intersection Reversal Kleene Star Difference

Prove why the infinite union of regular languages is not necessarily regular

Counter example:∞∪(n=1){0ⁿ1ⁿ} = {0ⁿ1ⁿ|

Prove: For every regular expression, there is an equivalent ε-NFA. (base-case)

For re's of length 1

What is the Myhill-Nerode Theorem and what is the difference between it and the pumping lemma in terms of power?

Given an alphabet, ∑, and a language L ⊆ ∑*, L is regular if index of RL is finite ---------------------------- This gives a necessary and sufficient condition for a language to be regular. The pumping language, on the other hand gives a necessary condition, and helps disprove regularity of a language, but not to prove a language is regular (only implication : L is regular → pump-able)

Explain the pumping lemma

If L is a regular language, then there is a number p (pumping length) where if s is any string in A of length at least p, then s can be split into 3 substrings such that: 1. for each i ≥0, x(y^i)z ∈ A 2. |y| > 0 3. |xy| ≤ p

Is {0ⁿ1ⁿ2ⁿ| n≥0} regular?

It is neither regular nor context-free. (Proven with Myhill-Nerode for non-regularity)

Is this language regular?{a ^(2ⁿ)}

No, and can be proven with pumping lemma or Myhill-Nerode theorem

{0ⁿ1ⁿ | n≥1}Is this language regular?

No, and this can easily be proved by the pumping lemma.

Is {1^m0^n| m≠n} regular?

No, as the complement is not regular either

What is the significance of Kleene's Theorem and what are the two parts?

Regular expressions and DFAs describe precisely the same class of languages: the regular languages.

What does the subset construction prove about the relative expressive power of NFAs vs. DFAs

That NFAs also express regular languages, and that they both have the same expressive power

Prove: For every regular expression, there is an equivalent ε-NFA.

This will be a proof by induction. Inductive step: re's of length > 1, using IH, if R1 and R2 can be represented by an e-NFA, then R1+R2, R1.R2, and R1* can too.

How is an NFA different from a DFA?

Transitions:- DFA: for each state and letter, there must be one and only one arrow NFA: There may be 0, 1, or more arrows for each letter Acceptance:- DFA: accept if it ends in accept state for a given string- NFA: accept if possible to end in accept state

What is the Myhill-Nerode Relation?

With every language L⊆∑*, there is a relation RL on ∑* xRLy iff ∀z ∈ ∑* (xz ∈ L ↔ yz ∈ L).

For languages that are in the form of Lₙ or the nth symbol from the right is a 1, how many states do you need to create a NFA?

n+1 states. You keep circling, and guess that you are n symbols away from the end.


संबंधित स्टडी सेट्स

DSST Introduction to Computing, or Information Systems and Computer Applications CLEP

View Set

Trig 7.5: Complex Numbers in Polar Form

View Set

Accounting Fundamentals: Accounts Payable

View Set