Skip to content

CIS 2620 Notes 3.2

Published: at 12:12 AM

Kleene* Operation

Let us define the Kleene * operation:

A={ww can be split into multiple parts such that each part is in A}A* = \{w | w\text{ can be split into multiple parts such that each part is in } A \}

AA* is another way for saying repeated concatenation. AA* is the set of strings that are some concatenation of strings of AA: A={E,A,A.A,A.A.A,etc}A* = \{\mathcal{E}, A, A.A, A.A.A, etc\}

The empty string E\mathcal{E} is always in AA*.

Example: Let A={w w contains exactly 2 a’s}A = \{w | \text{ w contains exactly 2 a’s}\}.
In this case, A={ww is empty or contains a strictly positive even number of a’s}A* = \{w | w \text{ is empty or contains a strictly positive even number of a’s}\}

Theorem: The class of regular languages is closed under Kleene*

Proof: Consider a regular language A, and let MM be a DFA accepting it. We will prove by constructing an NFA that accepts AA*.

Given an input ww, MM’ needs to check if we can split ww into parts such that each part is accepted by MM. To do this, let us begin executing MM on ww. When the current state is an accepting state, we decide nondeterministically to switch to the initial state and restart MM on the rest of the string using an E\mathcal{E} transition. If we end the string at an accepting state at some thread, that means that either the entire string was valid under MM, or it was split into parts that were valid under MM. The construction looks something like this:

M_1

However, we have an issue. This construction might reject E\mathcal{E}, which is always in AA*. However, this is an easy solution. All we need to do is begin with an accepting state that has an E\mathcal{E} transition to the initial state of MM. This way, if we have an empty string, it will automatically be valid, since it starts at an accepting state. However, if there are characters left in the string, it is forced to move forward, since there are no other threads for characters left at that state.

M_1