DFA_flashcards

(20 cards)

1
Q

What is an alphabet (Σ) in formal language theory?

A

A finite, nonempty set of symbols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a word in formal language theory?

A

A finite (possibly empty) sequence of symbols from an alphabet Σ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the notation Σ* used for?

A

It denotes the set of all possible words (including the empty word) over the alphabet Σ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give an example of Σ and Σ*.

A

If Σ = {0, 1}, then Σ* includes words like 101, 11001, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a language L over an alphabet Σ?

A

A subset of Σ*, i.e. any set of words formed from Σ.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the symbol ε represent?

A

The empty word.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does |w| mean in formal language theory?

A

It denotes the length of the word w.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is wᴿ in language theory?

A

It is the reverse of the word w.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a palindrome?

A

A word w such that wᴿ = w (it reads the same forward and backward).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does uv mean in string operations?

A

It is the concatenation of words u and v.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does aⁿ represent?

A

n repetitions of the symbol a.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a subword?

A

A word u is a subword of v if v = w₁uw₂ for some w₁, w₂.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the formal definition of a DFA?

A

A DFA is a 5-tuple (Q, Σ, δ, s, F) where Q is a set of states, Σ is the alphabet, δ is the transition function, s is the start state, and F is the set of accepting states.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the transition function δ in a DFA?

A

A function δ: Q × Σ → Q defining the next state based on current state and input.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the acceptance condition for a DFA?

A

A DFA accepts a word if, starting from the start state, it follows transitions for each symbol in the word and ends in an accepting state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How is the language of a DFA A defined?

A

L(A) = { w ∈ Σ* | A accepts w }

17
Q

What is a regular language?

A

A language L is regular if there exists a DFA A such that L = L(A).

18
Q

What is an example of a regular language with even number of 0s?

A

L = { w ∈ {0,1}* | w contains an even number of 0s }

19
Q

Give an example of a regular language that accepts aⁿbᵐ.

A

L = { aⁿbᵐ | n, m ≥ 0 }

20
Q

Give an example of a regular language that accepts strings containing 100 as a subword.

A

L = { w ∈ {0,1}* | w contains 100 } — DFA tracks progress toward seeing 100.