Classify the following languages over {0,1} as finite, regular, cf and beyond cf. Give the smallest family possible!
• At most five occurences of 1
[ ] finite [ ] regular [ ] cf [ ] beyond
• Length < 20
[ ] finite [ ] regular [ ] cf [ ] beyond
• Length > 20
[ ] finite [ ] regular [ ] cf [ ] beyond
At most five occurences of 1
Answer: regular
explanation: because it may containg inifinte amount of 0's
Length < 20
Answer: finite
explanation: contains finite number of strings
every finite language is regular but every regular is
not finite,
that's why smallest family will be finite
Length > 20
Answer: Regular
expanation: we can build finite automata for it using 21 states
Classify the following languages over {0,1} as finite, regular, cf and beyond cf. Give the smallest...
Give regular expressions describing each of the following regular languages over Σ = {0,1}: {w : |w| = 3} (PLEASE SHOW WORK)
Give regular expressions describing each of the following regular languages over Σ = {0,1}: {w : w begins and ends with the same symbols} show work!
Purpose: Gain experience converting from finite automata to regular expressions. Give regular expressions generating the following languages over {0,1}. Do these by hand by converting the finite automata. In your answers, you may use the shorthand Σ = (0+1) a. {w | w does not contain the substring 110} b. {w | w is any string except 11 and 111}
Provide regular expressions for the following languages: a.) The set of strings over {0,1} whose tenth symbol from the right end is 1. b) The set of strings over {0,1} not containing 101 as a sub-string. ***IMPORTANT: PLEASE SHOW ALL WORK AND ALL STEPS, NOT JUST THE ANSWERS!!!
Give nondeterministic finite automata to accept the following languages. Try to take advantage of nondeterminism as much as possible. a) The set of strings over the alphabet {0,1,...,9} such that the final digit has appeared before. b) The set of strings over the alphabet {0,1,...,9} such that the final digit has not appeared before. c) The set of strings of 0's and 1's such that there are two 0's separated by a number of positions that is a multiple of...
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...
Give a regular expression generating the following languages over the alphabet {a,b}: {w | w is any string except aa and bbb}
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 111} 2. {w over the alphabet of {0, 1} | w contains at least two 0’s and at most one 1} 3. {w over the alphabet of {0, 1} | the length of w is at most 9} 4. {w over the alphabet of {0, 1} | w contains at least three 1 s} 5. {w over...
2. Give the first five strings in L-ordering for each of the following languages over 2 - {0,1}. If there are fewer than five strings, give the entire language instead: Let L1= {0, 11, 101) Let L2 = {€, 0,10 a) LUL b) L2-L2 c) L L2 d) L22
Give regular expressions for the following languages: (a) The language of all strings over {a,b} except the empty string. (b) The language of all strings over {a,b} that contain both bab and bba as substrings. (c)L k = {w ∈ {a,b} * | w contains a substring having 3 more b’s than a’s}. (d) The language of all strings over {a,b} that have a b in every odd position (first symbol is considered position 1; empty string should be accepted)...