Assignment 1
Assignment 1
Assignment # 1
3x^2 + 7x - 9 = (((((3) x) + 7) x) - 9)
Show how to produce this polynomial from the rules for POLYNOMIAL using
multiplication only twice.
The set POLYNOMIAL is defined by these four rules:
Rule 1: Any number is in POLYNOMIAL.
Rule 2: The variable x is in POLYNOMIAL.
Rule 3: If p and q are in POLYNOMIAL, then so are p + q and (p) and pq.
Rule 4: POLYNOMIAL contains only those things which can be created by the
three rules above.
III. The recursive definition for PALINDROME wrote by student over the alphabet I = {a, b}:
Rule 1: a and b are in PALINDROME
Rule 2: If x is in PALINDROME, then so are axa and bxb
Unfortunately all of the words in the language defined above have an odd length and so
it is not all of PALINDROME. Fix this problem.
GOOD LUCK! :)