Regular_Operations_flashcards

1
Q

What are the three core regular operations?

A

Union, Concatenation, and Kleene Star.

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

What is the definition of union in formal language theory?

A

L ∪ M = { w | w ∈ L or w ∈ M }

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

What is the definition of concatenation in regular languages?

A

LM = { uv | u ∈ L, v ∈ M }

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

What is the definition of the Kleene star?

A

L* = { w₁w₂…wₙ | n ≥ 0, wᵢ ∈ L }

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

If L and M are regular, what can we say about L ∪ M, LM, and L*?

A

They are also regular — regular languages are closed under union, concatenation, and star.

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

How do we prove closure under union for regular languages?

A

Construct an NFA with a new start state that has ε-transitions to the start states of both NFAs for L and M.

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

How do we construct an NFA for LM (concatenation)?

A

Add ε-transitions from accepting states of NFA for L to the start state of NFA for M, and make the old accepting states non-accepting.

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

How do we construct an NFA for L* (Kleene star)?

A

Add a new accepting start state with ε-transitions to the original start and from accepting states back to it.

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

What does the product construction do for DFA union?

A

Creates a DFA with states Q₁ × Q₂, simulating both automata in parallel.

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

What is the accepting condition for union in DFA product construction?

A

Accept if q₁ ∈ F₁ or q₂ ∈ F₂.

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

What is the accepting condition for intersection in DFA product construction?

A

Accept if q₁ ∈ F₁ and q₂ ∈ F₂.

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

How do we construct the complement of a DFA language?

A

Flip accepting and non-accepting states: F’ = Q \ F.

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

Are regular languages closed under complement?

A

Yes — because the complement of a DFA is also a DFA.

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

Are regular languages closed under intersection?

A

Yes — either via product construction or using De Morgan’s Laws.

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

How can you compute intersection using De Morgan’s Laws?

A

L ∩ M = ¬(¬L ∪ ¬M)

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

What is the state count in DFA product construction?

A

The number of states is |Q₁| × |Q₂|.

17
Q

Why do we use ε-transitions in NFA constructions for union, concatenation, and star?

A

To allow non-consuming transitions between components without reading input.