Chapter 9: Q7E (page 389)
Give regular expressions with exponentiation that generate the following languages over the alphabet .
a. All strings of length 500
b. All strings of length 500 or less
c. All strings of length 500 or more
d. All strings of length different than 500
e. All strings that contain exactly 500 1s
f. All strings that contain at least 500 1s
g. All strings that contain at most 500 1s
h. All strings of length 500 or more that contain a 0 in the 500th position
i. All strings that contain two 0s that have at least 500 symbols between them
Short Answer
Above problem is solved using the regular expressions. It is basically the combination of the string of the power length which is k and the power is denoted by the symbol i.e., power of an alphabet is denoted by .
a. Regular Expression with exponentiation:
b.Regular Expression with exponentiation:
c.Regular Expression with exponentiation:
d. Regular Expression with exponentiation:
e. Regular Expression with exponentiation: where,
f. Regular Expression with exponentiation: , where
g. Regular Expression with exponentiation: where,where,
h. Regular Expression with exponentiation:
i.Regular Expression with exponentiation: