DSCI 220, 2025 W1
October 1, 2025
Read and use \(a\equiv b\pmod m\) as “\(m\) divides \(a-b\).”
Compute and reason with \(\bmod\) for \(+\), \(-\), \(\times\), and exponents.
Find/recognize modular inverses and solve a linear congruence.
Explore a 2-dial puzzle.
What’s the rightmost digit of \(7^{2025}\)?
05:00
Definition: \(a\equiv b\pmod m \iff m\mid(a-b)\).
Quick checks:
Work \(\bmod 7\):
What are the rules?
Definition: \(a \equiv b \pmod m \iff m \mid (a-b)\)
If \(a \equiv b \pmod m\) and \(c \equiv d \pmod m\), then:
Reduce anytime: reduce intermediate results mod \(m\) at any step.
Caution (division): “Division” is only valid when a modular inverse exists.
\(\gcd(a,m)=1\Rightarrow a^{-1}\) exists, and \(ax \equiv b \pmod m \Rightarrow x \equiv a^{-1}b \pmod m\).
Caution (exponents): From \(a\equiv b \pmod m\) you may raise the bases: \(a^n\equiv b^n\), but in general \(c^{a}\not\equiv c^{b}\pmod m\).
Claim: If \(a\equiv b\pmod m\), and \(c\equiv d\pmod m\) then \(ac\equiv bd\pmod m\).
Proof:
Claim: If \(a\equiv b\pmod m\), then for all \(n\ge1\), \(a^n\equiv b^n\pmod m\).
Proof: Consider arbitrary integers \(a\), \(b\), \(m\) so that \(a\equiv b\pmod m\), and an arbitrary integer \(n\ge1\).
(IH) Assume that for any \(j < n\), \(a^j\equiv b^j\pmod m\).
Case 1 \((n=1)\):
Case 2 \((n>1)\):
Task \(\pmod 7\): Fill this table and find inverses of \(1,2,3,4\).
\(\times\) | \(1\) | \(2\) | \(3\) | \(4\) |
---|---|---|---|---|
\(1\) | ||||
\(2\) | ||||
\(3\) | ||||
\(4\) |
Then answer: \(1^{-1},\,2^{-1},\,3^{-1},\,4^{-1}\ \pmod 7\).
Solve:
Pick one:
Find \(x\pmod {15}\) such that
\(x\equiv 2\pmod 3\) and \(x\equiv 1\pmod 5\).
05:00