Question: A language called PALINDROME is defined over the alphabet . = {a, b}: PALINDROME = {, and all strings x suth that reverse(x) = x}
A language called PALINDROME is defined over the alphabet . = {a, b}: PALINDROME = {, and all strings x suth that reverse(x) = x}
When asked to give a recursive definition for the language PALINDROME, a student wrote: Rule 1: a and b are in PALINDROME Rule 2: If x is in PALINDROME, then so are axa and bxb Unfortunately, all the words in the language defined above have an odd length and so it is not all of PALINDROME. (a) Change Rule 1 (Rule 2 should not change) such that the recursive definition defines the language PALINDROME. (b) Change Rule 2 (Rule 1 should not change) such that the recursive definition defines the language PALINDROME. (c) Give a recursive definition for the language containing only even-length PALINDROME strings. (d) How many words does the language PALINDROME have of length 3? (e) How many words does the language PALINDROME have of length 4?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
