4. L=All words in which a appears tripled, if at all. That is, every clump of a's contains 3 or 6 or … a's. Show a regular expression for L.
4. L=All words in which a appears tripled, if at all. That is, every clump of...
Question 4 (a) If = {0,1,2}. What is »?? What is the cardinality of 54? (b) Build a finite automaton that accepts every binary string that contains 101. (c) Write a regular expression for the language of all binary words that does not contain ab. (d) What is the language of the following regular expression b*a*b*a* ? Give three words that are and three words that are not in this language. (e) Give a context-free grammar G such that L(G)...
Construct a regular expression that defines the language L (say) containing all the words with either exactly one aba-substring or exactly one bab-substring but not both aba- and bab-substrings. (Hint: For example, the word abab does not belong to L.)
(4) [20 pts] Let L be the language defined by a regular expression (O | 1)0+(01 1)). over t alphabet f(o,1, +) (a) (4pt) Write down 5 different words from L (b) (8pt) Describe L using words. (c) (8pt) Draw an automaton accepting L (ideally, deterministic).
(4) [20 pts] Let L be the language defined by a regular expression (O | 1)0+(01 1)). over t alphabet f(o,1, +) (a) (4pt) Write down 5 different words from L (b) (8pt) Describe...
1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at least 3 a's and no more than 3 b's} 2. Let acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E ', let W denote the string w with the...
1. Construct a DFSM to accept the language: L w E ab): w contains at least 3 as and no more than 3 bs) 2. Let E (acgt and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg. ge. Construct both a DFSM to accept the language and a regular expression that represents the language. 3. Let ab. For a string w E , let w denote the string w with the...
Long paths we show that for every n ≥ 3 if deg(v) ≥ n/2 for every v ∈ V then the graph contains a simple cycle (no vertex appears twice) that contains all vertices. Such a path is called an Hamiltonian path. From now on we assume that deg(v) ≥ n/2 for every v. 1. Show that the graph is connected (namely the distance between every two vertices is finite) 2. Consider the longest simple path x0, x1, . ....
Please show all steps and work. Thanks
Find (1) an NFA and (2) a regular expression for the following languages on fa, bj. Tb) imo . L-[w: 2na(w) + 3nb(w) is even) Note: na(w) means the number of a's in the string w, and n is defined in the same way.
DO NUMBER 4 AND 5
2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept...
1. Let L be the language over {a, b, c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two d's. Choose any constructive method you wish, and demonstrate that L is regular. You do not need an inductive proof, but you should explain how your construction accounts for...