Final answer:
To prove that for all input strings delta-hat(q,w) = q, given delta(q,a) = q, we use mathematical induction. We show that the statement holds for base case (empty string) and then prove the inductive step for strings of length n+1, using the induction hypothesis and the given condition.
Step-by-step explanation:
To prove by induction that for all input strings w, deltahat(q,w) = q, we will use the given information that delta(q,a) = q for all input symbols a.
Base case: For w having length 0, i.e., the empty string, deltahat(q,'') = q (the empty string denotes no input symbols, so the state remains unchanged).
Inductive step: Assume that for an input string w of length n, deltahat(q,w) = q. Now, consider an input string w' of length n+1. We can decompose w' as w'a, where a is the last symbol of w'. Using the induction hypothesis, we have deltahat(q,w) = q. And since delta(q,a) = q, we can conclude that deltahat(q,w'a) = delta(delta(q,a),w) = delta(q,w) = q. Hence, the statement holds for n+1 as well.
By the principle of mathematical induction, we have proven that for all input strings w, deltahat(q,w) = q given the condition delta(q,a) = q for all input symbols a.