Please answer c,d,f. also please explain the answers for me to understand.
IN HORIZONTAL : FIRST HAVING 01 AND 21
TO ACCEPT A STRING IT SHOULD CONTAIN BOTH 01 AND 21 AS SUB-STRINGS .
SO ANYTHING IN THE STRING BEFORE 01 IS STILL IN THE STATE q0 AND WHEN IT COMES 01 IT REACHES q2
STATE .
AND ANYTHING OTHER THAN 21 IT STILL STAYS IN THE STATE q2 BUT IF IT 21 THEN IT GOES TO THE FINAL STATE . IE,. q4 . BECAUSE IT HAVE BOTH THE SUB-STRINGS 01 AND 21 , SO THE STRING IS FINALLY ACCEPTED BY THE NFA .
--------------------------------------------------------------------------------------------------------------------------------------------------------------
IN VERTICAL : FIRST HAVING 21 AND 01
TO ACCEPT A STRING IT SHOULD CONTAIN BOTH 01 AND 21 AS SUB-STRINGS .
SO ANYTHING IN THE STRING BEFORE 21 IS STILL IN THE STATE q0 AND WHEN IT COMES 21 IT REACHES q6
STATE .
AND ANYTHING OTHER THAN 01 IT STILL STAYS IN THE STATE q6 BUT IF IT 01 THEN IT GOES TO THE FINAL STATE . IE,. q8 . BECAUSE IT HAVE BOTH THE SUB-STRINGS 01 AND 21 , SO THE STRING IS FINALLY ACCEPTED BY THE NFA .
AFTER HAVING THE BOTH SUB-STRINGS 01 AND 21 ANY-SEQUENCE OF 0,1,2 IS ACCEPTED .
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IN HORIZONTAL : q0 , q1 , q3
WHEN THE STRING STARTS WITH ab THEN IT REACHES TO THE FINAL STATE q2.
IN VERTICAL : q0,q3,q4q5
WHEN THE STRING HAVING ANY NUMBER OF CHARACTERS IN ANY ORDER STILL STAYS IN STATE q3 AND THE STRING IS ENDED WITH ab , THEN IT GOES INTO THE FINAL STATE q5.
HERE WE ARE CONSTRUCTING NFA , SO THE STRING IS ACCEPTED BY THE NFA AS IT REACHES THE ANY ONE OF THE FINAL STATE IN ANY-ORDER OF POSSIBLE ORDERS.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EXPLANATION :
TO ACCEPT A STRING IT SHOULD CONTAIN THE SUB-STRING 10 AT-LEAST ONCE SO WE TO REACH THE FINAL STATE IN THE NFA ,IE ,. q5 IN THE PATH IT SHOULD CONTAIN THE SUB-STRING 10 AND IT ALSO HAVE THE ODD LENGTH .
SO BY THE ABOVE NFA ALL THE STRINGS HAVING ODD LENGTH AND HAVING SUB-STRING 10 IS ACCEPTED .
Please answer c,d,f. also please explain the answers for me to understand. For each of the...
Any answer that involves a design for a Finite Automaton (DFA or NFA) should contain information about the following five components of the FA (corresponding to the 5-tuple description): i) The set of states Q; ii) the alphabet Σ; iii) the start state; iv) the set of final states F; v) the set of transitions δ, which can be either shown in the form of a state diagram (preferred) or a transition table. You can either present the answer in...
please tell me how to do (p), (s), (t). 85 Exercises EXERCISE 1 on for each of the following languages. Give a regular expression for each of the follow ke the machine from 0 back, a. label rip from 0 back co state 0 on an input b. {abc, xyz] c. a, b, d. {ax | x € {a,b]"} e axb | x € {a,b}} [ {(ab)"} assing through 0. bo a piece we already have a input string. So...
1) 2) Give formal descriptions (5-tuples) for the DFAs shown in figure below: 3) Give the state diagrams of DFAs recognizing the following languages over ? = {0, 1}: a) LÆ b) L? c) {e, 1001} d) {e, 101, 1001} e) {w : w has prefix 10} f) {w : w does not contain the substring 011} 4) Give the state diagrams of DFAs recognizing the following languages over ? = {0, 1}: a) {w: |w| ? 5} b) {w...
Please Answer Question#02 Solution of Question 1 is attached. Solution of Questions #01 Please do Questions #01 As soon as possible. = {a, b} will be used for all of the following exercises. The alphabet 1. Give regular expressions which exactly define the following languages. [7 marks] (a) L1 which has exactly one b but any number of as. (b) L2 which has an even number of as and an even number of bs. [7 marks] (c) L3 which contains...
Unless otherwise noted, the alphabet for all questions below is assumed to be Σ (ab). Also note that all DFA's in your solutions should have one transition for each state in the DFA for each character in the alphabet. 1. (6 marks) This question tests your comfort with "boundary cases" of DFA's. Draw the state diagrams of DFAs recognizing each of the following languages. (a) (2 marks) L = {c) fore the empty string. (b) (2 marks) L (c) (2...
I have an assignment for University and I am not sure how to go about it. Could anyone help with its and let me know how to do it . Cheers Your task is to design a binary finite state automaton (FSA) to accept all strings that represent valid messages (for your particular codes and parity property) and reject all others. This FSA must be DETERMINISTIC, REDUCED and must be in STANDARD FORM PARITY Odd 1 1101 1001 00011 Complete...
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 = {[:],...
Write a C program for: One technique for dealing with deadlock is called “detect and recover.” In this scheme, some procedure is used to identify when a deadlock occurs, and then another procedure is used to deal with the blocked processes. One technique to identify a deadlock is to maintain a resource graph that identifies all processes, all resources, and the relationships between them (that is, which processes exclusively own which resources, and which processes are blocked waiting for which...
Please Do it In Java: Objectives: To Java programming language To understand the lexical analysis phase of program compilation Assignment: The first phase of compilation is called scanning or lexical analysis. This phase interprets the input program as a sequence of characters and produces a sequence of tokens, which will be used by the parser. Write a Java, program that implements a simple scanner for a source file given as a command-line argument. The format of the tokens is described...
please show work and explain your answer so I also can understand. thank you D Question 7 2.5 pts Consider this information: In 1980, Sam made $32,000 per year. In 2019, his cousin Nick makes $65,000. Assume the CPI is currently 256 and was 82.4 in 1980. Sam says that, if we adjust for inflation, he actually made more than Nick does now when he started work in 1980. You want to find out if he's right. Which person makes...