A solution to 1.2(3) by Dr. Gene Chase.
January 31, 2008. Version 1.0
To prove:
for all strings w
,
G
, (w ) = w.
(1)
*R
R
Let’s prove it by induction on the length n of the string w.
First, I see that the definition of reverse is given informally on p. 17.
Here’s a formal definition,
which—as we should expect—requires recursion to prevent our needing to use “.
..”
Definition:
The reverse of b, written b is defined as follows:
R
1.
If b =
8
then define b =
8
.
R
2.
If b
±
8
then b can be written as xa where a is of length 1 and x may or may not be
8
.
In that case, define b as ax .
That is, as a concatenated with the reverse of x.
RR
OK, now we can proceed with the proof, the two parts of which will use closely the two parts of
the definition of reverse.
1. Base case:
n=0.
If w has length 0, then w =
8
.
By definition of reverse,
8
=
8
,
(2)
R
(
8
) =
8
by substituting from equation (2) in the left hand side to get the r.h.s.
(3)
R
So substituting again from (2), (
8
8
, which is what we were to prove when w =
This is the end of the preview. Sign up
to
access the rest of the document.
This homework help was uploaded on 04/19/2008 for the course COMP 314 taught by Professor Chase during the Spring '08 term at Dickinson.
 Spring '08
 CHASE
 Computer Science

Click to edit the document details