Give cfg for the following language over {0,1}
{w | w contains the substring 011}
Give cfg for the following language over {0,1} {w | w contains the substring 011}
L = {w|w contains the substring bab} give the regular expression that describes L are the 2 languages L and L* the same language? Is L(aba)* a regular language?
Give a Context Free Grammar (CFG) for the following language: L = { w | the number of a’s and the number of b’s in w are equal, ∑= {a, b} }
10. Consider the following CFG: Is the language generated by this CFG a regular language? If so, give a regular expression denoting it. If not, prove it. 10. Consider the following CFG: Is the language generated by this CFG a regular language? If so, give a regular expression denoting it. If not, prove it.
Give a six-state (including dead state) DFA for the language {w ∈ {a,b}*: w contains abb as a substring, and does not contain bba}
1. Construct a Finite Automata over Σ={0,1} that recognizes the language {w | w ∈ {0,1}* contains a number of 0s divisible by four and exactly three 1s} 2. Construct a Finite Automata that recognizes telephone numbers from strings in the alphabet Σ={1,2,3,4,5,6,7,8,9, ,-,(,),*,#,}. Allow the 1 and area code prefixing a phone number to be optional. Allow for the segments of a number to be separated by spaces (denote with a _ character), no separation, or – symbols.
1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...
4. (6 pts) Give an implementation-level description (describe how you would move the tape head, what you write on the tape, etc) of a Turing machine that decides the language (w w contains an even number of Is) over the alphabet (0,1) 4. (6 pts) Give an implementation-level description (describe how you would move the tape head, what you write on the tape, etc) of a Turing machine that decides the language (w w contains an even number of Is)...
Create a DFA for the language L = {w ∈ {0, 1}∗ : w is a set of strings with 011 as a substring AND is not divisible by 3 }. First, create two separate DFAs for is a set of strings with 011 as a substring and not divisible by 3. Then, create the intersection between those DFAs by using the product construction. Show all your work. Hint: Use the least amount of states as possible.
Exercise 3: (2marks) Write RE for the language L over 2={0,1} such that all the string do not contain the substring 01, L= {£,0,1,00,11,10,100,....}
Design a Turing machine that recognizes the language L := {vSw : u, w E {0,1)" and u is a substring of u For example, 0801 E L' 10$010 E L, but i 00$10101 ¢ L. Describe the High Level algorithm informally and define the corresponding Turing Machine in details. Design a Turing machine that recognizes the language L := {vSw : u, w E {0,1)" and u is a substring of u For example, 0801 E L' 10$010 E...