Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . 9 Use the construction in the proof of The class of regular languages is closed under the concatenation operation. PROOF IDEA We have

1.9Use the construction in the proof of The class of regular languages is closed under the concatenation operation. PROOF IDEA We have regular languagesA1andA2and want to prove thatA1A2is regular. The idea is to take twoNFAs,N1andN2forA1andA2, andcombine them into a newNFANas we did for the case of union, but this timein a different way, as shown in Figure 1.48.AssignNs start state to be the start state ofN1. The accept states ofN1haveadditional\epsi arrows that nondeterministically allow branching toN2wheneverN1is in an accept state, signifying that it has found an initial piece of the inputthat constitutes a string inA1. The accept states ofNare the accept states ofN2only. Therefore, it accepts when the input can be split into two parts, the firstaccepted byN1and the second byN2. We can think ofNas nondeterministicallyguessing where to make the split. to give the state diagrams ofNFAs recognizing the concatenation of the languages described in
1. g.{w|the length ofwis at most5} and i.{w|every odd position ofwis a1}
2. b.{w|wcontains at least three1s} and m.The empty set
1.10 Use the construction in the proof of The class of regular languages is closed under the star operation.PROOF IDEAWe have a regular languageA1and want to prove thatA1alsois regular. We take anNFAN1forA1and modify it to recognizeA1, as shown inthe following figure. The resultingNFANwill accept its input whenever it canbe broken into several pieces andN1accepts each piece.We can constructNlikeN1with additional\epsi arrows returning to the startstate from the accept states. This way, when processing gets to the end of a piecethatN1accepts, the machineNhas the option of jumping back to the start stateto try to read another piece thatN1accepts. In addition, we must modifyNso that it accepts\epsi , which always is a member ofA1. One (slightly bad) idea issimply to add the start state to the set of accept states. This approach certainlyadds\epsi to the recognized language, but it may also add other, undesired strings.Exercise 1.15 asks for an example of the failure of this idea. The way to fix it isto add a new start state, which also is an accept state, and which has an\epsi arrowto the old start state. This solution has the desired effect of adding\epsi to thelanguage without adding anything else. to give the state diagrams ofNFAs recognizing the star of the languages described in
1. b.{w|wcontains at least three1s}
2. j.{w|wcontains at least two0s and at most one1}
3. m. The empty set Outline:
from automata.fa.nfa import NFA
example_nfa = NFA(
states={'q0','q1','q2'},
input_symbols={'0','1'},
transitions={
'q0': {'': {'q1','q2'}},
'q1': {'0': {'q1'},'1': {'q2'}},
'q2': {'0': {'q1'},'1': {'q2'}}
},
initial_state='q0',
final_states={'q1'}
)
# prob_1_9a = NFA(
# NFA for language g: {w | the length of w is at most 5}
# )
# prob_1_9b = NFA(
# NFA for language b: {w | w contains at least three 1s}
# )
# prob_1_10a = NFA(
# Create an NFA to recognize the language b
# )
# prob_1_10b = NFA(
# Create an NFA to recognize the language j
# )
# prob_1_10c = NFA(
# Create an NFA to recognize the empty set (language m)
# )
#you must use this outline

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

How is a futures contract settled?

Answered: 1 week ago

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago

Question

=+8. Be sure you considered consumer benefits.

Answered: 1 week ago

Question

=+4. Consider competitors' campaigns. How could yours stand out?

Answered: 1 week ago

Question

=+5. Review the six categories of 50 strategies.

Answered: 1 week ago