FSA to REGEX Flashcards

1
Q

What does Lecture 7 aim to prove?

A

That regular expressions and finite automata are equivalent in expressive power.

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

What is the key theorem of Lecture 7?

A

A language is regular if and only if it can be described by a regular expression.

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

What is the hard direction of the equivalence proof?

A

Every DFA/NFA can be converted into a regular expression.

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

What is a GNFA (generalized NFA)?

A

An automaton where transitions are labeled by regular expressions, not just single symbols or ε.

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

What is the general method for converting a DFA to a regex?

A

Turn the DFA into a GNFA, then eliminate states until one edge remains between the start and accepting states.

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

What must be true of the start state in a GNFA?

A

It must have no incoming edges.

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

What must be true of the accepting state in a GNFA?

A

It must have no outgoing edges.

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

Why do we add a new start and accept state during preprocessing?

A

To ensure only one start state and one accepting state with the required structure.

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

What do we do if a state has multiple arrows between two states?

A

Merge them into a single transition using the union operator (e.g., a ∪ b).

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

During state elimination

A

what expression is added from j → k via i with loop γ?

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

What happens to existing transitions when adding new paths during state elimination?

A

They are combined using the union operator with the new expression.

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

What do we do after removing all intermediate states?

A

The remaining edge from the start to accepting state is the final regular expression.

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

What does the final expression from the GNFA represent?

A

It represents the same language as the original finite automaton.

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

What does the β expression represent in the example?

A

β := a(b ∪ aa)*ab ∪ b

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

What does the γ expression represent in the example?

A

γ := bb ∪ ((a ∪ ba)(b ∪ aa)*ab)

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

What does the δ expression represent in the example?

A

δ := ε ∪ (a ∪ ba)(b ∪ aa)*

17
Q

What is the final regular expression after eliminating all states?

A

α := a(b ∪ aa)* ∪ βγ*δ

18
Q

Why is the DFA-to-regex construction important?

A

It shows that regular languages can be expressed as patterns — used in compilers, search, and verification.