Question

Construct a nondeterministic finite automaton (NFA) that will accept all strings with the substring 111 but...

Construct a nondeterministic finite automaton (NFA) that will accept all strings with the substring 111 but not 1111.

Note that consecutive 1111's aren't acceptable at all .

Ex: 1111011 is not acceptable ,111011 is acceptable

Homework Answers

Answer #1

The strings must contain 111 as the substring.

After 111, we can have 0's immediately

But after 111, we can't have 1 immediately

So, we need to construct an NFA for those strings that have 111 as a substring.

Strings of length 3

111

Strings of length 4

0111

1110

Strings of length 5

00111

10111

11100

11101

01110

The NFA is given below

Please don't forget to give a positive rating to the answer. Your rating motivates experts to help other students also. Thank you :)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT