BS Artificial Intelligence · Semester 1 · Week 04

Discrete Mathematics for BSAI

Mathematical Induction

Dr. Hira Benish
Associate Professor & HoD, Mathematics
PMAI Lab, Mathematics Behind AI

Week 4 · Dr. Hira BenishBegin reading  

01 · Opening Scenario: A Growing Digital Mosaic

A screen displays a square mosaic. Stage 1 has one lit tile. To make the next stage, the system adds a row across the bottom and a column on the right, counting the shared corner only once. The first totals are 1, 4, 9, 16.

Predict: Stage 5 has 25 tiles. A square of side length 5 has 5² positions, and the border added after Stage 4 has 2(4)+1=9 tiles. But four successful stages do not prove that the rule works at every stage. What argument would cover all positive integer stages?

The central question

If the first stage works, and a correct Stage k always makes Stage k+1 correct, can a later stage fail? Mathematical induction turns that “start and continue” idea into a proof.

02 · Learning Objectives and Class Guide

You will explain why checking examples is insufficient; identify the base case, hypothesis, and step; complete a short induction proof for a sum or growing pattern; and diagnose a missing or circular step.

Three contact hours: 45 minutes for mosaic/domino intuition; 75 for a guided proof; 45 for independent application and critique; 15 for a formative check and feedback.

Classroom essentials Sections 01–09 and Problems 1–4. Self-study The optional Colab check, a second sum, and extended practice. The visual builder and group critique are ungraded; a short formative quiz may be collected after feedback.

03 · See the Pattern Before the Formula

At Stage n, the mosaic is an n×n square, with n² tiles. To grow a k×k square to a (k+1)×(k+1) square, add k+1 in a row and k more in a column. The corner is already in the row. The border therefore has (k+1)+k=2k+1 tiles.

Stage 1: 1Stage 2: 4Stage 3: 9add 3add 5
Figure 1. Each highlighted L-shaped border contributes the next odd number of tiles.
Stage nTotal n²Tiles added for the next stage
113
245
397
4169

The same picture suggests 1+3+5+···+(2n−1)=n². The examples suggest the identity; the proof must cover every n≥1.

04 · The Domino Idea

Imagine an endless row of numbered dominoes. Showing that Domino 1 falls is the base case. Showing that any falling Domino k knocks down k+1 is the inductive step. Together they reach every positive integer position.

Checking four dominoes only checks four positions. A general step cannot start the chain until a base case is established. If a claim starts at n=0, its proof must begin there.

05 · The Three Parts of an Induction Proof

Let P(n) be a claim for integers n≥1.

  1. Base: Prove P(1).
  2. Hypothesis: Let k≥1 be arbitrary and temporarily assume P(k).
  3. Step: Use that hypothesis to prove P(k+1).
P(1) and ∀k≥1, [P(k) → P(k+1)] establish ∀n≥1, P(n).

Why may we assume P(k)? We are proving the conditional “if P(k), then P(k+1).” The algebra must actually connect the two. Assuming P(k+1) would assume what we are trying to prove.

06 · Guided Proof: The Odd-Tile Square

Claim: For every integer n≥1, the sum of the first n odd positive integers is n².

1+3+5+···+(2n−1)=n²
Base case

For n=1, the left side is 1, and the right side is 1²=1. Thus P(1) is true.

Inductive hypothesis

Let k≥1 be arbitrary. Assume 1+3+···+(2k−1)=k². This is P(k).

Inductive step

The next odd number is 2(k+1)−1=2k+1. Add it to both the stage-k sum and its value from the hypothesis:

1+3+···+(2k−1)+(2k+1)
=k²+(2k+1)=(k+1)².

This is P(k+1). We have a true base and a valid step for arbitrary k≥1; therefore the claim holds for every positive integer n.

The calculation matches the picture: a k²-tile square plus a 2k+1-tile border becomes a (k+1)²-tile square. The picture motivates; the induction proves.

07 · Another Sum: 1 + 2 + ··· + n

Guided extension The claim 1+2+···+n=n(n+1)/2 has the same three-part structure.

Worked induction

Base: For n=1, 1=1(2)/2.

Hypothesis: Let k≥1 be arbitrary. Assume 1+2+···+k=k(k+1)/2.

Step: Add the next term k+1:

1+2+···+k+(k+1)
=k(k+1)/2+(k+1)
=(k+1)(k+2)/2.

The final expression is the claim at n=k+1. Thus it holds for all n≥1.

Factoring the common k+1 makes the target form visible: k(k+1)/2+(k+1)=(k+1)(k/2+1).

08 · Diagnose a Flawed Proof

A student writes: “The formula works for n=1,2,3,4. Assume it works for k+1. Therefore it works for k+1.” What is missing?

Diagnosis: Four checked cases do not establish the general step. The student assumes the target P(k+1) and repeats it. A valid step assumes P(k) for arbitrary k, then derives P(k+1).

An argument that proves the general step but never checks a starting case is also incomplete: all neighboring dominoes may be connected, but the first has not fallen.

09 · Induction Builder

Classroom activity · 15 minutes Predict the next border before adding it. Then identify the missing proof step.

Build the next square

Stage 1: 1 tile. Predict the border for Stage 2.

At Stage k, how do we justify the Stage k+1 total?

Choose an argument.

10 · What a Growing System Can Guarantee

Suppose a screen lays out items in a square: Stage n has n rows and n columns. The mathematical specification says Stage n contains n² positions, and enlarging the layout adds one new row and one new column. The new corner is counted once, giving 2n+1 new positions.

The induction proof guarantees the count for the stated mathematical growth rule. If a program skips or duplicates a position, the program may still be wrong; its implementation needs separate testing.

11 · Optional Colab Check

Self-study · 10 minutes First predict both numbers in each row. Then run the cells and explain why the outputs agree. The symbol * means multiplication in Python.

print(1, 1, 1*1)
print(2, 1+3, 2*2)
print(3, 1+3+5, 3*3)
print(4, 1+3+5+7, 4*4)

The table checks four cases. It helps catch an arithmetic mistake, but it cannot replace the proof of the step for arbitrary k. No code is required for the induction proof.

12 · Practice

Try these before reading the selected solutions.

  1. For a Stage 6 square, how many tiles must be added to make Stage 7? Explain why the answer is not 14.
  2. For P(n): 1+3+···+(2n−1)=n², write the base statement, the inductive hypothesis, and the target at k+1.
  3. Complete the algebra: k(k+1)/2+(k+1)=__________=(k+1)(k+2)/2. State where the first term comes from.
  4. A student checks a formula at n=1 and n=2 and says it is proved for all positive integers. What is missing?
  5. Prove by induction that 2+4+···+2n=n(n+1) for every n≥1. Show the base, hypothesis, and step.
  6. Consider the false claim P(n): n<5 for every positive integer n. Give a counterexample. At which value of k does the proposed step from P(k) to P(k+1) fail?
Exit check: In one sentence, explain why “it works for several stages” differs from “it works for every stage.”

13 · Common Mistakes

Tempting moveRepair
Check many examples and stop.Give a true starting case and a step for arbitrary k.
Assume the desired result at k+1.Assume P(k), then derive P(k+1).
Write P(k) but never use it.Mark exactly where the hypothesis replaces the earlier sum.
Add the wrong next term.Substitute k+1 into the general term; the next odd term is 2k+1.
Prove a step but omit the base.Verify the first value in the stated domain.

14 · Summary

  • A pattern offers a conjecture; a finite list of examples does not prove a statement about all positive integers.
  • Induction needs a base case and a general step from P(k) to P(k+1).
  • In the square pattern, the inductive hypothesis gives k² tiles and the next border gives 2k+1; together they give (k+1)².
  • Check the starting domain, use the hypothesis explicitly, and state the resulting conclusion.

15 · Visual Concept Map

A true base case plus a general step reaches each positive integerBase caseP(1) is trueGeneral stepP(k) → P(k+1)ConclusionEvery n ≥ 1For the square patternk² + (2k+1) = (k+1)²
Both parts are necessary: a start, and a valid link from any stage to the next.

16 · Key Terms

Induction
A proof method that establishes a starting case and a step from any case to the next.
Base case
The first case in the claimed domain.
Inductive hypothesis
The temporary assumption that the claim holds at an arbitrary stage k.
Inductive step
The justification that P(k) implies P(k+1).
Counterexample
A single case in the domain where a universal claim fails.

17 · Looking Ahead

Next week we organize collections and relationships with sets, Cartesian products, and functions. The care used here to define a domain, state a claim, and justify a conclusion remains useful throughout the course.

Selected Solutions

1 · Next border

2(6)+1=13 new tiles. The added row has 7 and the added column contributes 6 more, since the shared corner must not be counted twice.

2 · Statements in the odd-sum proof

Base: 1=1². Hypothesis: 1+3+···+(2k−1)=k² for arbitrary k≥1. Target: 1+3+···+(2k−1)+(2k+1)=(k+1)².

3 · Factor the next sum

k(k+1)/2+(k+1)=(k+1)(k/2+1)=(k+1)(k+2)/2. The first term is the sum through k supplied by the inductive hypothesis.

4 · Examples

A step for an arbitrary k is missing. Two checked cases say nothing about all later cases.

5 · Even-number sum

Base: 2=1(1+1). Assume 2+4+···+2k=k(k+1). The next term is 2(k+1), so the new sum is k(k+1)+2(k+1)=(k+1)(k+2), the target for k+1. Thus the identity holds for all positive integers.

6 · False universal claim

n=5 is a counterexample because 5<5 is false. The step fails at k=4: 4<5 is true, but 5<5 is false.