(a) Describe the language (in words defined by the regular expression 1(0|1) * 0
ID: 3813661 • Letter: #
Question
(a) Describe the language (in words defined by the regular expression 1(0|1) * 010 * 1. (b) A palindrome is a string of characters that reads the same forward and backwards. For example xyyx is a palindrome of length 4 of the alphabet sigma = {x, y}. Give a regular expression that the defines the language of all palindromes of sigma with length at most 5. (c) Do the regular expressions (rs)* and r* s* represent the same language If not, provide a counterexample of a string generated by one of the regular expressions but not the other.Explanation / Answer
a) 1 followed by zero or more number of 0 or 1 followed by 01 and then zero or more number of 0 and then followed by 1
b) (xyx|xy*x|xxyxx|yxy|yx*y|yyxyy)
c) No.
rsrsrs for (rs)* is not same as rrrsss for r*s*
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.