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 334: 7

Answer

See explanation

Work Step by Step

We want to prove by **structural induction** that **every string in \(S\)** contains an **even number of ‘\(a\)’** characters. --- ## Definitions The set \(S\) is defined recursively as follows: 1. **Base:** The empty string \(\varepsilon\) is in \(S\). 2. **Recursion:** If \(s \in S\), then each of the following is also in \(S\): - \(b\,s\) - \(s\,b\) - \(s\,a\,a\) - \(a\,a\,s\) 3. **Restriction:** Nothing is in \(S\) except what is obtained by the above rules (1) and (2). We must show that any string in \(S\) has an **even** number of ‘\(a\)’ symbols. --- ## Proof by Structural Induction ### Inductive Hypothesis Assume for an arbitrary string \(s \in S\), \(s\) has an even number of ‘\(a\)’. We will check the base case, then show that all newly formed strings also have an even number of ‘\(a\)’. --- ### Base Case By rule (1), \(\varepsilon\) (the empty string) is in \(S\). The empty string has **0** occurrences of ‘\(a\)’, and \(0\) is even. Hence the property (having an even number of ‘\(a\)’) holds for the base string. --- ### Inductive Step Suppose \(s \in S\) already has an even number of ‘\(a\)’. We must show each new string formed by the recursion also has an even number of ‘\(a\)’: 1. **Form \(b\,s\):** Prepending ‘\(b\)’ adds no new ‘\(a\)’s, so the total number of ‘\(a\)’ in \(b\,s\) is the same as in \(s\). By hypothesis, \(s\) had an even number of ‘\(a\)’, so \(b\,s\) has an even number as well. 2. **Form \(s\,b\):** Appending ‘\(b\)’ similarly adds no new ‘\(a\)’s, so \(s\,b\) also has the same (even) number of ‘\(a\)’ as \(s\). 3. **Form \(s\,a\,a\):** Appending “\(aa\)” adds **2** new ‘\(a\)’s. If \(s\) had an even number of ‘\(a\)’, then adding 2 more keeps the total even. 4. **Form \(a\,a\,s\):** Prepending “\(aa\)” also adds 2 new ‘\(a\)’s, so again the total number remains even. In each case, the new string still has an even number of ‘\(a\)’s. --- ### Conclusion By structural induction, every string generated in \(S\)—starting from \(\varepsilon\) and applying the four rules—**must** contain an even number of ‘\(a\)’. Formally: \[ \boxed{\text{All strings in }S\text{ have an even number of ‘\(a\)’.}} \]
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.