automata midterm

¡Supera tus tareas y exámenes ahora con Quizwiz!

A Deterministic Finite Automaton (DFA)

A = (Q, Σ, δ, q0, F) i Q is a finite set of states. ii Σ is an alphabet, i.e., a finite set of input symbols. iii δ : Q×Σ → Q is a transition function i.e., the "program" that runs the DFA. Given q ∈ Q, a ∈ Σ, δ computes the next state δ(q, a) = p ∈ Q. iv q0 is the start state, also called an initial state (q0). v F is a set of final or accepting states.

All strings of 0s and 1s that contain somewhere 10

Consider the following DFA. Describe the language that it accepts.

A DFA with no states always accepts strings consisting of a single symbol. (T/F)

False

The language of the regular expression: a∗ba∗ba∗b(a+b)∗ is the same as the language of the regular expression: a∗ba∗ba∗ba∗ (T/F)

False

the concept of ε-closure

Given q, ε-close(q) is the set of all states p which are reachable from q by following arrows labeled by ε. Formally, q ∈ ε-close(q), and if p ∈ ε-close(q), and p ε → r, then r ∈ ε-close(q).

Suppose that L and M are two regular languages. The following statements about their concatenation are true

It is not true in general that LM is the same as ML It may be the case that LM=ML If M is empty then LM is also empty

∑ *

Kleene's star, the set of all strings over ∑

Consider Kleene's star ∗, and suppose that L={epsilon}. What is L∗ equal to?

L itself

language of a DFA A

L(A) = {w| ˆδ(q0, w) ∈ F}

Consider the following regular expression: (11)∗ Then, its language is:

The set of all strings with an even number of 1s

A DFA that accepts the set of strings that have a 0 in the 5th position (rather than a 1) must have at least 5 states. (T/F)

True

A regular expression for the language of m's and n's with at least four n's is given by: m*nm*nm*nm*n(m+n)* (T/F)

True

An NFA with epsilon transitions can always be simulated by an NFA without them (that is, epsilon are not strictly necessary). (T/F)

True

Each DFA accepts a single language, but a given language can be accepted by many DFAs.

True

If one of L or M is not empty, then their union, L ∪ M, is not empty. (T/F)

True

If the language L has a DFA, then L also has a regular expression representing it. (T/F)

True

Suppose that delta is a transition function, and Δ is the corresponding extended transition function. Then for any a∈Σ it is the case that delta(q,a)=Δ(q,a). (T/F)

True

Suppose you are working with an NFA that has a portion of this form: r→epsilon→s→epsilon→t and no other states into or out of r,s Then, it is possible to replace it with r--> epsilon --> t without changing the meaning of the NFA. (T/F)

True

The empty string epsilon is accepted by a DFA if and only if the initial state is also an accepting state (T/F)

True

When designing an automaton to accept the language of strings which have a 00 in positions 3 and 4 from the end it is easier to use an NFA than a DFA. (T/F)

True

When designing an automaton to accept the language of strings which have a 11 in positions 7 and 8, it is easier to use a DFA than an NFA. (T/F)

True

string

a finite ordered sequence of symbols chosen from some alphabet example: 00101010100 from the binary alphabet

alphabet

a finite, non-empty set of distinct symbols, usually denoted by ∑ (sigma) ∑ = {0,1} binary alphabet

basis case of regular expression

a ∈ Σ, ε, ∅

|w|

denotes the length of string w

If L is regular, then L∗ may or may not be regular (T/F)

false

a language L

is a collection of strings over some alphabet ∑

Regular Expression

is a syntactic object meant to express a set of strings, i.e., a language. a model of computation, just like DFAs or NFAs. They are defined formally by structural induction

A Nondeterministic Finite Automaton (NFA)

is defined similarly to a DFA, except that the transition function δ becomes a transition relation. Thus, δ ⊆ Q × Σ × Q, i.e., on the same pair (q, a) there may be more than one possible new state (or none)

concatenation

sticking two things next to each other in order x = 2 y = 3 xy = 23

∑ ^k

the set of strings over ∑ of exactly length k

we can say that a language L is regular if and only if

there exists a DFA A such that L = L(A).

extended transition function (ETF)

δ, is defined inductively. The basis case: ˆδ(q, ε) = q, and the induction step: if w = xa, w, x ∈ Σ ∗ and a ∈ Σ, then ˆδ(q, w) = ˆδ(q, xa) = δ( ˆδ(q, x), a). Thus ˆδ : Q × Σ ∗ → Q, and w ∈ L(A) ⇐⇒ ˆδ(q0, w) ∈ F. Here L(A) is the set of all those strings (and only those) which are accepted by A, called the language of A

the empty string

ε epsilon |ε| = 0 (the length is 0) is in any ∑ (alphabet) by default wε = εw = w

A regular expression for the language of x's and y's with one x and two y's is given by:

(xyy + yxy + yyx)


Conjuntos de estudio relacionados

Biblical Allusions: Elijah-Fortunate

View Set

Chapter 65: Management of Patients With Oncologic or Degenerative Neurologic Disorders

View Set

Chapter 7 - Libby, Libby & Short - Financial Accounting

View Set

bstrandable NCLEX Cardiovascular/Hematologic 1 of 2

View Set

Advanced Ethical Hacking 2 - Final

View Set

Chapter 15- Assessing Head and Neck

View Set

Vulnerable Populations and Homeless- Exam 2

View Set

KPEERI Exam Study Guide 2021 (www.dyfferencemakers.com)

View Set