A solution to 1.2(3) by Dr. Gene Chase. January 31, 2008. Version 1.0To prove: for all strings w ,G, (w ) = w.(1)*RRLet’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:R1. If b = 8then define b = 8.R2. If b ±8then b can be written as xa where a is of length 1 and x may or may not be8. In that case, define b as ax . That is, as a concatenated with the reverse of x.RROK, now we can proceed with the proof, the two parts of which will use closely the two parts ofthe 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) =8by substituting from equation (2) in the left hand side to get the r.h.s.(3)RSo substituting again from (2), (88, which is what we were to prove when w =
This is the end of the preview. Sign up
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.