DSCI 220, 2025 W1
September 30, 2025
This is a tromino:
This is a \(n\) by \(n\) deficient grid:
Claim: Every \(2^n\) by \(2^n\) deficient grid can be tiled with trominos.
Claim: Every \(2^n\) by \(2^n\) deficient grid can be tiled with trominos.
Proof: Line 1:
Line 2:
Small case(s):
Claim: Every \(2^n\) by \(2^n\) deficient grid can be tiled with trominos.
Proof continued… Inductive case:
Story. You only log every 3rd data point (rows 3, 6, 9, …).
The cost for row \(i\) is \(2i+1\).
Question. What is the total cost up to row \(n\)?
Story. Each item \(i\) must be compared with all later items \(j\ge i\). The pairwise cost is \(c_j = 4j+1\) (depends only on the later index).
Problem.
\(T = \displaystyle \sum_{i=1}^{n}\;\sum_{j=i}^{n}\,(4j+1)\)
Consider the sequence of images below. How many cells are in image \(n\)? (Call it \(C_n\))
\(C_0 =\)
\(C_1 =\)
\(C_2 =\)
\(\ldots\)
\(C_n =\)
\(C_0 = 1\), and \(C_n = C_{n-1} + 6n, \forall n > 0\)
But what does this function mean? We need a closed form!!
“unroll” the recurrence by substituting previous expressions.
See a pattern, and generalize it using \(k\).
Set the generalized term equal to the base case term.
Substitute base case and solve sums.
Consider the sequence of images below. How many dots are in image \(n\)? (Call it \(T_n\))
\(T_0 =\)
\(T_1 =\)
\(T_2 =\)
\(\ldots\)
\(T_n =\)
\(T_0 = 2\), and \(T_n = T_{n-1} + 3, \forall n > 0\)
But what does this function mean? We need a closed form!!
But how can we be sure our closed form is correct?
Claim: The closed form solution to the recurrence \(T_0 = 2\) and \(T_n = T_{n-1} + 3, \forall n > 0\) is \(T_n = 2 + 3n\)
How many toothpicks in an \(n\cross n\) grid made of toothpicks?
Draw the sequence:
Find the recurrence:
Solve the closed form for the recurrence: