JosephTLyons
JosephTLyons

Reputation: 2133

Do both of these regular expressions

Consider the following NFA:

enter image description here

Are both of these regular expressions equivalent and generate the strings accepted by the NFA, or are they different?

1. a^* (Kleene star)
2. lambda + a^+ (Kleene plus)

I realize this seems trivial, as its a very simply NFA, but this comes from a more complex problem that I've reduced down to a very minimal example.

Upvotes: 2

Views: 64

Answers (1)

Patrick87
Patrick87

Reputation: 28292

These regular expressions describe the same regular language. The reason for this is that a^* generates the empty string by repeating a zero times.

Upvotes: 1

Related Questions