Discrete Structure · Unit 2
Proof Techniques
Exam-focused notes for Proof Techniques (Discrete Structure, BIT152): what the TU syllabus asks and how it has actually been tested, with 14 solved past questions from this unit.
Proof Techniques in short
A proof is a valid argument that shows a statement is true. This chapter covers the main proof methods, induction, and the rules that make an argument valid. These skills are used again in algorithms and program checking.
What this unit covers
- Direct proof
- Indirect proof
- Proof by contradiction
- Mathematical induction
- Structural induction
- Rules of inference
- Proving correctness of recursive algorithms
Mathematical induction
2082 · 5 marks
Using mathematical induction prove that sum of first N odd integers is N2N^2N2. [5]
Show solved answerHide answer
Proof by Mathematical Induction: Sum of First N Odd Integers = N²
Statement to Prove
$$1 + 3 + 5 + \cdots + (2N-1) = N^2$$
Step 1: Base Case (N = 1)
When N = 1, the first odd integer is 1.
- LHS = 1
- RHS = 1² = 1
Since LHS = RHS, the statement holds for N = 1. ✓
Step 2: Inductive Hypothesis
Assume the statement is true for N = k, i.e., assume:
$$1 + 3 + 5 + \cdots + (2k-1) = k^2$$
Step 3: Inductive Step
We must prove the statement is true for N = k + 1, i.e., we must show:
$$1 + 3 + 5 + \cdots + (2k-1) + (2(k+1)-1) = (k+1)^2$$
Starting from the LHS of N = k+1:
$$\underbrace{1 + 3 + 5 + \cdots + (2k-1)}_{\text{sum of first } k \text{ odd integers}} + (2k+1)$$
Applying the Inductive Hypothesis (replacing the underbraced part with k²):
$$= k^2 + (2k + 1)$$
Factoring the right side:
$$= k^2 + 2k + 1$$
$$= (k+1)^2$$
This is exactly the RHS for N = k+1. ✓
Conclusion
- The base case holds for N = 1.
- Assuming the statement holds for N = k, we proved it holds for N = k+1.
By the Principle of Mathematical Induction, the statement:
$$\boxed{1 + 3 + 5 + \cdots + (2N-1) = N^2}$$
is true for all positive integers N. $\blacksquare$
2081 · 5 marks
Prove that 13+23+33+⋯+n31^3 + 2^3 + 3^3 + \cdots + n^313+23+33+⋯+n3 is a perfect square using mathematical induction. [5]
Show solved answerHide answer
Proof by Mathematical Induction
Claim
$$1^3 + 2^3 + 3^3 + \cdots + n^3 = \left[\frac{n(n+1)}{2}\right]^2$$
This is a perfect square for all positive integers $n$.
Step 1: Base Case ($n = 1$)
LHS: $1^3 = 1$
RHS: $\left[\frac{1(1+1)}{2}\right]^2 = \left[\frac{1 \cdot 2}{2}\right]^2 = [1]^2 = 1$
Since LHS $=$ RHS $= 1$, the base case holds. $\checkmark$
Step 2: Inductive Hypothesis
Assume the statement is true for $n = k$, i.e., assume:
$$1^3 + 2^3 + 3^3 + \cdots + k^3 = \left[\frac{k(k+1)}{2}\right]^2$$
Step 3: Inductive Step
We must prove the statement holds for $n = k + 1$, i.e., we must show:
$$1^3 + 2^3 + \cdots + k^3 + (k+1)^3 = \left[\frac{(k+1)(k+2)}{2}\right]^2$$
Starting from the LHS:
$$1^3 + 2^3 + \cdots + k^3 + (k+1)^3$$
Applying the inductive hypothesis:
$$= \left[\frac{k(k+1)}{2}\right]^2 + (k+1)^3$$
$$= \frac{k^2(k+1)^2}{4} + (k+1)^3$$
Factor out $(k+1)^2$:
$$= (k+1)^2 \left[\frac{k^2}{4} + (k+1)\right]$$
$$= (k+1)^2 \left[\frac{k^2 + 4(k+1)}{4}\right]$$
$$= (k+1)^2 \left[\frac{k^2 + 4k + 4}{4}\right]$$
$$= (k+1)^2 \cdot \frac{(k+2)^2}{4}$$
$$= \frac{(k+1)^2(k+2)^2}{4}$$
$$= \left[\frac{(k+1)(k+2)}{2}\right]^2$$
This is exactly the RHS for $n = k+1$. $\checkmark$
Conclusion
By the Principle of Mathematical Induction, the formula holds for all positive integers $n$:
$$\boxed{1^3 + 2^3 + 3^3 + \cdots + n^3 = \left[\frac{n(n+1)}{2}\right]^2}$$
Since $\dfrac{n(n+1)}{2}$ is always a positive integer (as $n(n+1)$ is always even), the sum is always a perfect square. $\blacksquare$
2079 · 5 marks
Use mathematical induction to prove that the sum of the first n odd positive integers is n2n^2n2. [5]
2078 · 5 marks
Use mathematical induction to show that the sum of first n positive integers is n(n+1)/2. [5]
Proving correctness of recursive algorithms
2082 · 5 marks
Prove the correctness of following recursive algorithm for computing $a^n$ using induction.
Power(a, n)
{
if (n = 0) return 1;
else return a * Power(a, n-1);
}
[5]
Direct proof
2081 · 5 marks
Using direct proof show that the sum of odd and even number is odd. [5]
2079 · 5 marks
Show that the sum of two even numbers is even using direct proof. [5]
2078 · 10 marks
Explain direct proof, indirect proof, and proof by contradiction. Use direct proof to show that 'If n is an odd integer, then n' is an odd integer'. Also use indirect proof to show that 'If n is an integer and n' then n is odd'.[10]
Show solved answerHide answer
Proof Methods: Direct Proof, Indirect Proof, and Proof by Contradiction
A. Definitions of Proof Methods
i. Direct Proof
A direct proof is a method in which we assume the hypothesis p is true and then use logical steps, definitions, axioms, and previously proven theorems to directly establish that the conclusion q is true.
Structure:
Assume p → logical reasoning → conclude q
We move in a straight forward path from hypothesis to conclusion.
ii. Indirect Proof (Proof by Contrapositive)
An indirect proof proves a statement p → q by instead proving its contrapositive, which is:
$$\neg q \rightarrow \neg p$$
Since p → q is logically equivalent to ¬q → ¬p, proving the contrapositive is sufficient to prove the original statement.
Structure:
Assume ¬q → logical reasoning → conclude ¬p
iii. Proof by Contradiction
In proof by contradiction (also called Reductio ad Absurdum), we assume the negation of the entire statement we want to prove, i.e., we assume p ∧ ¬q, and then show that this assumption leads to a logical contradiction.
Structure:
Assume p ∧ ¬q → derive a contradiction → conclude p → q must be true
B. Direct Proof: "If n is an odd integer, then n² is an odd integer"
Statement: If n is odd, then n² is odd.
Proof:
Step 1: Assume n is an odd integer.
Step 2: By the definition of an odd integer: $$n = 2k + 1 \quad \text{for some integer } k$$
Step 3: Compute n²: $$n^2 = (2k + 1)^2 = 4k^2 + 4k + 1$$
Step 4: Factor out 2: $$n^2 = 2(2k^2 + 2k) + 1$$
Step 5: Let m = 2k² + 2k. Since k is an integer, m is also an integer.
Step 6: Therefore: $$n^2 = 2m + 1$$
This is exactly the form of an odd integer (an integer of the form 2m + 1).
Conclusion: Therefore, if n is an odd integer, then n² is an odd integer. $\blacksquare$
C. Indirect Proof: "If n is an integer and n² is odd, then n is odd"
Statement: If n² is odd, then n is odd.
Proof (by Contrapositive):
Step 1: Write the contrapositive of the statement:
Original: If n² is odd, then n is odd.
Contrapositive: If n is not odd (i.e., n is even), then n² is not odd (i.e., n² is even).
Step 2: Assume n is even.
Step 3: By the definition of an even integer: $$n = 2k \quad \text{for some integer } k$$
Step 4: Compute n²: $$n^2 = (2k)^2 = 4k^2 = 2(2k^2)$$
Step 5: Let m = 2k². Since k is an integer, m is also an integer.
Step 6: Therefore: $$n^2 = 2m$$
This is exactly the form of an even integer.
Step 7: So n² is even, which means n² is not odd.
Conclusion: The contrapositive is proven. Since p → q ≡ ¬q → ¬p, the original statement "If n² is odd, then n is odd" is also true. $\blacksquare$
D. Summary Table
| Method | What We Assume | What We Show | Basis |
|---|---|---|---|
| Direct Proof | p is true | q is true | p → q directly |
| Indirect Proof | ¬q is true | ¬p is true | ¬q → ¬p (contrapositive) |
| Proof by Contradiction | p ∧ ¬q is true | A contradiction arises | Negation leads to absurdity |
2080.1 · 5 marks
Using direct proof show that the sum of square of even number is even. [5]
0 · 5 marks
What direct proof? Give a direct proof of the theorem "If n is an odd integer, then n2n^2n2 is an odd integer." [5]
Structural induction
2081 · 5 marks
Explain about structural induction and recursive definitions with example. [5]
Proof by contradiction
Rules of inference
2080.1 · 5 marks
List any five rules of inferences. [5]
Show solved answerHide answer
Rules of Inference
Rules of inference are valid argument forms used to derive conclusions from premises in logical reasoning.
Five Rules of Inference
1. Modus Ponens (Law of Detachment)
$$p$$ $$p \rightarrow q$$ $$\therefore q$$
Meaning: If $p$ is true, and $p \rightarrow q$ is true, then $q$ must be true.
Example: "It is raining. If it rains, the ground is wet. Therefore, the ground is wet."
2. Modus Tollens
$$\neg q$$ $$p \rightarrow q$$ $$\therefore \neg p$$
Meaning: If $q$ is false and $p \rightarrow q$ is true, then $p$ must be false.
3. Hypothetical Syllogism
$$p \rightarrow q$$ $$q \rightarrow r$$ $$\therefore p \rightarrow r$$
Meaning: If $p$ implies $q$, and $q$ implies $r$, then $p$ implies $r$ (chain rule).
4. Disjunctive Syllogism
$$p \lor q$$ $$\neg p$$ $$\therefore q$$
Meaning: If at least one of $p$ or $q$ is true, and $p$ is false, then $q$ must be true.
5. Addition (Disjunction Introduction)
$$p$$ $$\therefore p \lor q$$
Meaning: If $p$ is true, then $p \lor q$ is true for any proposition $q$.
Note: Other common rules include Simplification ($p \land q \therefore p$), Conjunction ($p, q \therefore p \land q$), and Resolution. Each rule represents a tautology of the form: (premises) $\rightarrow$ conclusion.
Make Unit 2 stick
Practice BIT152 with flashcards & quizzes