Question

w does not contain Question 2 Consider the following language over the alphabet = {a,b}: L = {w the substring aa} 1. What is

please I need it urgent thanks. subject programming language and compilers

0 0
Add a comment Improve this question Transcribed image text
Answer #1

L={w| w does not contain the substring aa}

1) L' is the complement of language L. L' can be stated as {w|w contains the substring aa}.

2) The regular expression for the language L={w| w does not contain the substring aa} will be (b+ab)*(\epsilon+a). We can think of this as to avoid 'aa' in the string every a should be followed by b or there can be as many as b's possible.

3) The regular expression of L' ={w|w contains the substring aa} will be (a+b)*aa(a+b)*.

4) The DFA for L' is shown below:-

ab

5) DFA from L' to L can be easily made by making the complement DFA of L' i.e. by making the non-final states as final states and final states as non-final states.

Add a comment
Know the answer?
Add Answer to:
please I need it urgent thanks. subject programming language and compilers w does not contain Question...
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
  • I need to construct a deterministic finite automata, DFA M, such that language of M, L(M),...

    I need to construct a deterministic finite automata, DFA M, such that language of M, L(M), is the set of all strings over the alphabet {a,b} in which every substring of length four has at least one b. Note: every substring with length less than four is in this language. For example, aba is in L(M) because there are no substrings of at least 4 so every substring of at least 4 contains at least one b. abaaab is in...

  • In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to...

    In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to extract all matching patterns (substrings) from a given input DNA sequence string. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that contains at least two ‘A’s. Note: assume empty string is not a valid string. Design a deterministic finite automaton to recognize the regular expression. Write a program which asks the user...

  • Implement a deterministic finite automata (DFA) using C++ programming language to extract matchin...

    Implement a deterministic finite automata (DFA) using C++ programming language to extract matching patterns from a given input DNA sequence string. Design a deterministic finite automata to recognize the regular expression A(A+T+G+C)*A + T(A+T+G+C)*T over the alphaber {A,T,G,C}. This regular expression recognize any string that starts and ends with ‘A’ or starts and ends with ‘T’. Write a program which asks the user to input a DNA sequence. The program should be able to extract all the patterns (substrings present...

  • I need help creating an NFA for the language Σ={0,1}, L={w such that w does not...

    I need help creating an NFA for the language Σ={0,1}, L={w such that w does not contain 11 or w ends with 00}. for example 10010100100 is in the language, where as 101010011 is not.

  • Any answer that involves a design for a Finite Automaton (DFA or NFA) should contain information...

    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...

  • 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)....

  • I need help with that 5. Let Σ-ta, b). Write the δ function for the following...

    I need help with that 5. Let Σ-ta, b). Write the δ function for the following (1) dfa (δου'Qu Σ-Q) and (2) nfa (5,ra : Q x (BU {λ)) → P(D) respectively. 92 92 6. Give the languages accepted by the dfa and nfa in the above 6 (1) and 6(2), respectively 7. (1) When is a language L called as regular? (2) (i) Prove language L = {а"wb: we {a, b) *,n2 O} įs regular by design an nfa...

  • solve it ,i need urgent, no need to write neat and clean.. thanks! ......b0nGrr....... 2. Every...

    solve it ,i need urgent, no need to write neat and clean.. thanks! ......b0nGrr....... 2. Every 2 x 2 real matrix M = (C) determines a complex function M(x + iy) = um(X,Y) + ivm (2+iy), where real-valued functions up and um are determined by the following equation. um(2,y) UM(x,y) (a) Show that there are constants w; and w2 EC such that fm(2) = w12+ w22. What are these constants in terms of a, b,c,d? [8] (b) Determine an equivalent...

  • solve it ,i need urgent, no need to write neat and clean.. thanks! ......b0nGrr....... 1. (a)...

    solve it ,i need urgent, no need to write neat and clean.. thanks! ......b0nGrr....... 1. (a) Find real numbers a and b such that a + bi = p.v.(-86]1/3. [4] (b) Consider the following statement. "Log(-x)2 = Logza because (-2)2 = 22. Therefore, 2 Log(-2) = 2 Logz." Explain whether or not the statement is true. [4] (c) Consider the following statement. "The rational function (2), where p and q are co-prime non-constant polynomials, is holomorphic everywhere except at the...

  • please I need it urgent thanks algorithms 2 Binary Search Trees- 10 points (5 points each)...

    please I need it urgent thanks algorithms 2 Binary Search Trees- 10 points (5 points each) 1. Write pseudocode for an algorithm that takes in the root of a binary tree and returns whether or not the tree is a legal binary search tree. 2. Write pseudocode for an algorithm that takes in the root of a binary search tree and prints the keys in sorted order.

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