Question

Help with answering the question at the bottom. Example of Reading an NFA Q = {q0,...

Help with answering the question at the bottom.

Example of Reading an NFA

Q = {q0, q1, q2, q3, q4} F = {q2, q4}

L(M) = {x | x is a binary number that has 2 consecutive 0's or 2 consecutive 1's}

= (0|1)^* (00|11) (0|1)^*

Trs(q0, 0) = {q0, q3} (q0)--0à(q3) also, loop on q0 on 0,1

Trs(q0, 1) = {q0, q1} --1à(q1)

Trs(q1, 1) = {q2} (q1)--1à((q2))

Trs(q2, 0/1) = {q2} loop on q2 on 0,1

Trs(q3, 0} = {q4} (q3)--0à((q4))

Trs(q4, 0/1) = {q4} loop on q4 on 0,1

Does this FA work?   

q0 to q4 is possible iff you read 2 0's
q0 to q2 is possible iff you read 2 1's
In q0, q4 and q2 you can read any substring and stay there
(denoted by the loops)

If any path ends in q2 or q4, the string is accepted.

Trs*(q0, 010) = {q0, q3} q0 for staying in q0, or

q3 for going there on last 0

Since q0 and q3 are not in F, 010 is not accepted.

Trs*(q0, 01001) = {q0, q1, q4} stay in q0,

or q0 to q1 on last 1,

or q0 to q3 then q4 on 00

Since q4 is in F, 01001 is accepted.

Cannot be a Trs* from this file:

Q. Using the directly above example NFA, give an example Trs*(q0, _______) = { }

to show multiple states you could end up on feeding a string.
Try using 1001, does that work?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE THERE TO HELP YOU

ANSWER:

EXPLANATION:

as per the quesstion given i am giving this

Yes this FA works as the final states are reachable only if two 0's(q4) or two 1's(q2) have encountered. There my be multiple paths and multiple states we can end into but q2/q4 reachable only if above conditions are met and all the paths to q2 are from q0 & q1 and all the paths to q4 are from q0 & q3, no intersections.

Trs*(q0, 00011) = {q0, q1, q2, q4} shows multiple states you could end up on feeding a string.

hope it helps you

rate thumbsup please

Add a comment
Know the answer?
Add Answer to:
Help with answering the question at the bottom. Example of Reading an NFA Q = {q0,...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the TM with Q = q0, q1, q2, f, S = {0,1}, G= (0,1,b} (∆...

    Consider the TM with Q = q0, q1, q2, f, S = {0,1}, G= (0,1,b} (∆ for blank), initial state q0 and final state f, with transition defined below: (q0, 0) → (q1, 1, R); (q1,1) → (q2, 0, L); (q2, 1) →(q0,1,R); (q1, ∆) →(f, ∆, R) (a) Provide the execution trace of this machine on the input 011 (b) Describe the language accepted by the TM (c) Suppose the transition (q0, 0) → (q1, 1, R) is replaced...

  • 1. Using the given details of a PDA with Q = {90, 91, 92, 93}; {...

    1. Using the given details of a PDA with Q = {90, 91, 92, 93}; { = {a, b}; Z = 0; F = {q3} S = {90} and the following transitions construct a PDA. Show all the stack operations for the string "aaaabbbba" and tell whether the string is acceptable or not. (90, a, 0) = (91, 1) (q0, b, 0) = (q3, 1) (91, a, 1) = (92, 1) 5 (91, b, 1) = (92, 1) 5 (92,...

  • Question 8, please. 2. Prove: (a) the set of even numbers is countable. (b i=1 3....

    Question 8, please. 2. Prove: (a) the set of even numbers is countable. (b i=1 3. The binary relation on pair integers - given by (a,b) - (c,d) iff a.d=cbis an equivalence relation. 4. Given a graph G = (V, E) and two vertices s,t EV, give the algorithm from class to determine a path from s to t in G if it exists. 5. (a) Draw a DFA for the language: ( w w has 010 as a substring)....

  • a). Provide a DFA M such that L(M) = D, and provide an English explanation of...

    a). Provide a DFA M such that L(M) = D, and provide an English explanation of how it works (that is, what each state represents): b). Prove (by induction on the length of the input string) that your DFA accepts the correct inputs (and only the correct inputs). Hint : your explanation in part a) should provide the precise statements that you need to show by induction. For example, you could show by induction on |w| that E2 = {[:],...

  • This question deals with NFAs, DFAs, and regular expressions. (a) Using only the symbols described in...

    This question deals with NFAs, DFAs, and regular expressions. (a) Using only the symbols described in the lecture slides, write a regular expression that describes all strings over the alphabet Σ = {0,1} that are at are at least four bits long and begin and end with the same bit. (b) Draw a DFA, that accepts strings strings over the alphabet Σ = {0, 1} such that if you read the string from left to right, the difference between the...

  • Q1) How would you declare an array of doubles called myDoubles? Arrays can be initialized in...

    Q1) How would you declare an array of doubles called myDoubles? Arrays can be initialized in one of two ways. In one method, the array elements are placed in a list enclosed in curly braces after the array name definition. For example, the code below creates an array of ints with 3 elements: 1, 2 and 3. int[] a = {1, 2, 3, 4}; We can also initialize an array with a new construct, indicating how many elements we want...

  • Both part of the question is True or False. Thank you Problem 1. (ref. Example 3...

    Both part of the question is True or False. Thank you Problem 1. (ref. Example 3 in the slide) Let X = Y = C[0, 1] (with the norm || ||C[0,1] = sup |u(x)]). For any u € C[0, 1], define T€[0,1] v(t) = u(s)ds. We denote by T the mapping from u to v with D(T) = C[0, 1], i.e., v(t) = Tu(t). Then, the following conditions are true or not? Example 3. We denote by the set of...

  • QUESTION The ReadFile class opens and reads a text file. The WriteFile class opens and writes...

    QUESTION The ReadFile class opens and reads a text file. The WriteFile class opens and writes to a file. Compile and run these programs. There are several ways to read/write text files. The examples shown here are just one way of achieving this. Look at the API for the BufferedReader class. The readline() method is a simple way to read the text file line by line. It returns null when the end of the file has been reached. https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html Look...

  • This is a java homework for my java class. Write a program to perform statistical analysis...

    This is a java homework for my java class. Write a program to perform statistical analysis of scores for a class of students.The class may have up to 40 students.There are five quizzes during the term. Each student is identified by a four-digit student ID number. The program is to print the student scores and calculate and print the statistics for each quiz. The output is in the same order as the input; no sorting is needed. The input is...

  • Java programming help My program wont run. could someone tell me why. everything seems correct to...

    Java programming help My program wont run. could someone tell me why. everything seems correct to me... giving me the error: Exception in thread "main" java.lang.NumberFormatException: For input string: "Stud" at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at java.base/java.lang.Integer.parseInt(Unknown Source) at Util.readFile(Util.java:35) at Driver.main(Driver.java:8) _________________________________________________________________________________________________________________________ Program Prompt: Write a program to perform statistical analysis of scores for a class of students.The class may have up to 40 students.There are five quizzes during the term. Each student is identified by a four-digit...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT