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.
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.
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)
Give a regular expression for each of the following sets: a) set of all string of...
Give a regular expression for each of the following sets: a) set of all string of 0s and 1s beginning with 0 and end with 1. b) set of all string of 0s and 1s having an odd number of 0s. d) set of all string of 0s and 1s containing at least one 0. e) set of all string of a's and b's where each a is followed by two b's. f) set of all string of 0s and...
Consider a set of ? strings over alphabet ? = {?, ?}, defined recursively as follows....
Consider a set of ? strings over alphabet ? = {?, ?}, defined recursively as follows. ?∈? ? ∈ ? ⟹ ??? ∈ ? Furthermore, ? has no elements other than those obtained by finitely many applications of the recurrence rule given in its definition. For example, the first four elements of ? are ?, ???, ?????, ??????? Use mathematical induction to prove that there are no strings in ? that end in ?. {3 points.
n digit string of length n over alphabet {0,1, . . . ,9} a. How many...
n digit string of length n over alphabet {0,1, . . . ,9} a. How many n digit strings are there with at least one 1? b. many n digit are there with EXACTLY one 1? PLEASE ANSWER BOTH AND INCLUDE THE FACT THAT THE STRING IS OVER ALPHABET {0,1,2,3,4....9}
n digit string of length n over alphabet {0,1, . . . ,9} How many n...
n digit string of length n over alphabet {0,1, . . . ,9} How many n digit strings are there with at least one 1? How many n digit are there with EXACTLY one 1?
Consider strings of length 8 made up of elements in {0,1}. How many strings contain 000...
Consider strings of length 8 made up of elements in {0,1}. How many strings contain 000 as a substring? How many strings contain more 0’s than 1’s?
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT