WorksheetsEECS 510 Midterm 1
Total questions: 69
Worksheet time: 47mins
A(n) (a) is a finite, nonempty set of symbols usually denoted by
Σ.Σ = {0, 1} is the (a) alphabet.
True or False:
The set of all UTF-8 characters, or the set of all printable UTF-8 characters is a common alphabet.
True
False
A(n) (a) is a finite sequence of symbols chosen from an alphabet.
True or False:
A string is sometimes called a 'word'
True
False
The (a) is a string with zero symbols.
True or false:
The empty string is denoted by θ
True
False
True or False:
The empty string is denoted by ϵ
True
False
The length of a string is denoted by:
∣s∣
∣ϵ∣
s
s1+s2
The concatenation of strings s1 and s2 is denoted by:
s1 ⋅ s2
s1s2
s1 + s2
s1 × s2
True or False: The empty string ϵ is a string over all alphabets, and is the identity for concatenation: ϵs = sϵ = s
True
False
Σ0 = {ϵ}
Σ1 = {0, 1}
Σ2 = {00, 01, 10, 11}
Σ3 = {000,001,010,011,100,101,110,111}
Σn are the strings of length n over the (a) alphabet
The ___________ of Σ is the set of all strings over an alphabet Σ
Kleene closure
concatenation
word
language
Σ? is the set of all strings over an alphabet, while Σ? is the set of all non-empty strings over an alphabet.
+, -
-, +
*, +
+, *
A subset of Σ * is called a (a) .
Select the correct ordering of the 5-tuple DFA:
(Q, Σ, δ, q0, F)
(Q, Σ, F, δ, q0)
(Q, Σ, q0, δ, F)
(Σ, Q, q0, δ, F)
Select the correct variable from the 5-tuple DFA:
_____ is a finite, non-empty set of states
Σ
Q
δ
q0
F
Select the correct variable from the 5-tuple DFA:
_____ is an alphabet of input symbols
Σ
Q
δ
q0
F
Select the correct variable from the 5-tuple DFA:
_____: Q×E⟶Q is a transition function
Σ
Q
δ
q0
F
Select the correct variable from the 5-tuple DFA:
_____ ∈Q is the initial state
Σ
Q
δ
q0
F
Select the correct variable from the 5-tuple DFA:
_____ ⊆Q is the set of accepting states
Σ
Q
δ
q0
F
The (a) of a DFA A=(Q, Σ, δ, q0, F) is denoted by L(A) and is defined as:
L(A) :={w ∈Σ⋅ ∣ δ‘(q0, w)∈F ∣}
For any language L, if there is a DFA A for which L=L(A) , then L is said to be a (a) .
(a) is like the deterministic variety except with the ability to explore multiple states "in parallel".
The transition function δ for an NFA will take a state and a symbol and return a ____________.
set of states
single symbol
set of symbols
single state
An NFA is a 5-tuple (Q, Σ, δ, q0, F) , like its DFA counterpart, with the one exception being ____, which maps a state and a symbol into the powerset of Q.
___: Q×Σ⟶P(Q)
Q
Σ
δ
q0
F
The (a) of the NFA A is L(A) and is defined as L(A):={w∈Σ⋅∣δ′(q0, w )∩F=0∣}
For any language L , if L=L(A) , then we will also say that the language is (a) by the NFA A .
The goal of (a) is to build a DFA D=(QD, ΣD, δD, {q0}, FD) from a given NFA N=(QN, ΣN, δN, q0, FN) such that L(D)=L(N)
In subset construction, the initial state D is the (a) set containing only the initial state for N .
A language L is accepted by some DFA if and only if it is accepted by some (a) .
A(n) (a) -transition is one which can be triggered with or without consuming any input.
True or False: In an ϵ -transition, ϵ can be a symbol in Σ .
True
False
A(n) (a) -NFA is a regular NFA with the transition function augmented to operate on a state and a symbol, or ϵ, δ : Q×(Σ∪{ϵ})⟶P(Q)
The ϵ -closure of a state q is (a) (q)
The ________ case of an ϵ -closure of a state q is defined as q∈ECLOSE(q)
base
recursive
The ________ case of an ϵ -closure of a state q is defined as δ(p, ϵ)⊆ECLOSE(q) for every p∈ECLOSE(q)
base
recursive
A language L is accepted by some ϵ -NFA if and only if L is accepted by some (a) .
Ln is the language of n words from L ____________ together.
concatenated
added
unioned
L * is the language of _______ or more words from L concatenated together.
zero
one
two
three
A language accepted by some DFA/NFA/ ϵ -NFA is called a (a) language.
True or False:
Every DFA can be converted into a regular expression, but not every regular expression can be converted into an ϵ -NFA.
True
False
True or False:
Every DFA can be converted into a regular expression, and every regular expression can be converted into an ϵ -NFA.
True
False
True or False:
If L is the language accepted by some DFA A , then there is a regular expression E such that L(R)=L
True
False
Every language defined by a regular expression R is also defined by some __________ automaton.
finite
infinite
State the algebraic law:
(R+S)+T = R+(S+T)
(RS)T = R(ST)
associativity
distributive
annihilator
identity
commutativity
State the algebraic law:
R+S=S+R
commutativity
associativity
identity
annihilator
distributive
State the algebraic law:
0+R=R+0=R
ϵR=Rϵ=R
identity
distributive
annihilator
associativity
commutativity
State the algebraic law:
0R=R0=0
annihilator
identity
associativity
commutativity
distributive
State the algebraic law:
R(S+T)=RS+RT
(R+S)T=RT+ST
annihilator
identity
associativity
commutativity
distributive
State the algebraic law:
R+R=R
idempotent
closure laws
State the algebraic law:
( R *)* = R *
0 * = ϵ
ϵ * = ϵ
idempotent
closure laws
Syntactic sugar for one or more copies:
R+ :=RR * =R * R
R? := R+ϵ
R{0} := ϵ
R{n+1}=RR{n}
Syntactic sugar for zero or one copies:
R+ :=RR * =R * R
R? := R+ϵ
R{0} := ϵ
R{n+1}=RR{n}
Syntactic sugar for exactly n copies:
R+ :=RR * =R * R
R? := R+ϵ
R{0} := ϵ
R{n+1}=RR{n}
Let L be a regular language. There exists a constant nL such that for every string w∈L with ∣w∣≥nL , we can break w into 3 parts w= (a) such that (1) y=ϵ , (2) ∣xy∣≤nL , and (3) xykz∈L for every k∈N
In the following two-player scheme, we use the (a) to show that languages are not regular:
1. We pick that language L which we believe is not regular.
2. The opponent chooses a value for nL
3. We choose the word w whose length is at least nL
4. The opponent gets to split w into 3 parts x, y, and z , but we know that y=ϵ and ∣xy∣≤nL
5. Finally, we must show that some string of the form xykz ∈/L for some k∈N
If L and M are regular languages over an alphabet Σ , then so is L ___ M
∪
∩
True or False:
If L and M are regular languages over the same alphabet, then so are L⋅M and L *
True
False
True or False:
If L is a regular language, then so is it complement LC
True
False
If L and M are regular languages over the same alphabet, then so are L __ M and L __ M
∪; \
∪; ∩
∩; \
By DeMorgan's laws,
L __ M = (LC∪MC)C
∩
∪
\
L __ M = L∩MC
\
∪
∩
The _________ of a string a1a2...an is the string an...a2a1 . We denote the ________ of string w as wR
(a)
The (a) of language L is LR which is the language whose strings are the reverse of strings in L
True or False:
If L is a regular language, then so is LR
True
False
For alphabets Σ and T , a function h : Σ⟶T * induces a (a) on strings h : Σ * ⟶T * defined as h(w) := h(a1)h(a2)...h(an) for any string w = a1a2...an over Σ
True or False:
If L is a regular language over Σ , and h is a string homomorphism from Σ , then h(L):={h(w)∣w∈L∣} is also a regular language.
True
False
True or False:
Let h be a string homomorphism from alphabet Σ to T . If L is a regular language over T , then h−1(L) is also regular over Σ
True
False
