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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started