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!
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 nondeterministic finite automata that accept each of the following languages. Provide both state-transition diagrams and the corresponding quintuple representations The set of odd binary numbers (without leading zeros) such that the length of the bit string is 4i+2, for some i 21. a.
Give English descriptions of the languages represented by the following regular expressions. The descriptions should be simple, similar to how we have been defining languages in class(e.g., “languages of binary strings containing 0 in even positions. . .”). Note: While describing your language, you don’t want to simply spell out the conditions in your regular expressions. E.g., if the regular expression is 0(0 + 1)∗, an answer of the sort “language of all binary strings that start with a 0”...