Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 5 - Sequences, Mathematical Induction, and Recursion - Exercise Set 5.9 - Page 335: 13

Answer

See explanation

Work Step by Step

We have the set \(P\) of well‐formed parentheses defined by: 1. **Base:** \(\texttt{()}\in P.\) 2. **Recursive “wrap” rule:** If \(E\in P,\) then \(\texttt{(}E\texttt{)}\in P.\) 3. **Recursive “concatenate” rule:** If \(E\in P\) and \(F\in P,\) then the concatenation \(E\,F\in P.\) We want to show derivations for the following strings: - (a) \(\texttt{()(())}\) - (b) \(\texttt{(())(())}\) Below are step‐by‐step proofs (derivations) that each is in \(P\). --- ## (a) Derivation of \(\texttt{()(())}\) 1. By the **base rule**, \(\texttt{()}\in P.\) 2. Again, by the base rule, we have another copy of \(\texttt{()}\in P.\) 3. Apply the **“wrap” rule** to \(\texttt{()}\). If \(E=\texttt{()}\in P,\) then \(\texttt{(}E\texttt{)}=\texttt{(())}\in P.\) 4. Now apply the **concatenate** rule to \(\texttt{()}\) and \(\texttt{(())}\). Since both are in \(P,\) their concatenation \[ \texttt{()}\;\texttt{(())} \;=\; \texttt{()(())} \] is also in \(P.\) Hence \(\texttt{()(())}\in P.\) --- ## (b) Derivation of \(\texttt{(())(())}\) 1. By the **base rule**, \(\texttt{()}\in P.\) 2. Apply the **“wrap” rule** to \(\texttt{()}\). Then \(\texttt{(())}\in P.\) 3. We repeat the same step to get another copy of \(\texttt{(())}\in P\). (Concretely, again take \(\texttt{()}\) in \(P\) and wrap it to get a second \(\texttt{(())}\).) 4. Now apply the **concatenate** rule to \(\texttt{(())}\) and \(\texttt{(())}\). Their concatenation \[ \texttt{(())}\;\texttt{(())} \;=\; \texttt{(())(())} \] is in \(P\). Hence \(\texttt{(())(())}\in P.\)
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.