Question

Give a regular expression for the set of all strings on the alphabet {0,1} with no...

Give a regular expression for the set of all strings on the alphabet {0,1} with no runs of length greater than 3(for example, no substrings 0^i or 1^i with i > 3)

Homework Answers

Answer #1

(1) Given that the input symbol is {0,1}.

(2)Given condition is that the length of the string must not be greater than 3.

(3)The language for the given condition is given as L = { epsilon, 1, 0, 11,00,10,01,000,111,100,110,001,011,101,010}.

(4)The length of the minimum string is 0.

(5)So the regular expression for the string of length 0 is "epsilon".

(6)Now, the length of the string cannot be greater than 3.

(7)Therefore, the regular expression is given as (epsilon+0+1) (epsilon+0+1) (epsilon+0+1) .

Know the answer?
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
Similar Questions
Which one of the following languages over the alphabet {0,1} is described by the regular expression...
Which one of the following languages over the alphabet {0,1} is described by the regular expression (0+1)* 0 (0+1)* 0 (0+1)* ? a.The set of all strings that begin and end with either 0 or 1 b.The set of all strings containing at most two zeros c.The set of all strings containing at least two zeros. d.The set of all strings containing the substring 00
Find a regular expression to describe: The set of all strings over the alphabet {a, b,...
Find a regular expression to describe: The set of all strings over the alphabet {a, b, c, d} that contain exactly one a and exactly one b So, for example, the following strings are in this language: ab, ba, cccbad, acbd, cabddddd, ddbdddacccc and the following strings are NOT in this language: a, ccbc, acbcaaacba, acacac, bcbbbbbca, aca, c, d, b
Q2 [10 pts] Give DFA's accepting the following languages over the alphabet {0,1}: a) The set...
Q2 [10 pts] Give DFA's accepting the following languages over the alphabet {0,1}: a) The set of all strings whose 3rd symbol from the right end is a 0. b) The set of strings such that the number of 0's is divisible by 3 and the number of 1's divisible by 2.
Give a regular expression for the set of strings over {a, b, c} such that the...
Give a regular expression for the set of strings over {a, b, c} such that the sum of the number of a’s and the number of b’s is equal to 3.
Show a regular expression representing the described set: a). The set of strings of odd length...
Show a regular expression representing the described set: a). The set of strings of odd length over {s,t,r,i,n,g} containing exactly 3 n's.
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over...
Problem 5 Regular Expressions. a) Define a regular expression for all strings of odd length, over the alphabet of {0}. b) Define a regular expression for identifiers over the alphabet of {A,B,C,a,b,c,0,1,2,3,4,5,6,7,8,9}, such that an identifier must begin with an alphabetic character and must contain at least one numeric character. c) Try to modify the definition above so that identifiers still begin with an alphabetic character, but after that, it must contain at least one numeric, at least one lower-case...
For each of the following regular expressions, give 2 examples of strings that are in the...
For each of the following regular expressions, give 2 examples of strings that are in the language described by the regular expression, and 2 examples of strings that are not in that language. In all cases the alphabet is {a,b}. ab*ba* (a ∪ ε)b* (a ∪ b)ε*(aa ∪ bb)
For each of the following regular expressions, give 2 examples of strings that are in the...
For each of the following regular expressions, give 2 examples of strings that are in the language described by the regular expression, and 2 examples of strings that are not in that language. In all cases the alphabet is {a, b}. ab*ba* (a ∪ ε)b* (a ∪ b)ε*(aa ∪ bb)
1. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression...
1. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that begin with ‘A’ and end with ‘T’. Note: assume empty string is not a valid string. 2. Please submit the regular expression and Diagram of the DFA. I will be creating C++ code that extracts patterns that begin with 'A' and end with 'T' , but I need help with the visual representation. Thank you! example Input: CATTGCAGGTG...
Prove whether the following are regular (include regular expression) or not regular (show proof). The alphabet...
Prove whether the following are regular (include regular expression) or not regular (show proof). The alphabet is {0, 1} Given L1 and L2 are regular, L3 = {all stings in L1, but not in L2} Is L3 regular? I'm not sure what theorems i can use to prove this. I appreciate anything you can provide.