Discrete Math Final
how is lcm(a,b) found?
(a * b)/gcd(a,b
find gcd(123,555)
555=123 * 4 + 63 123=63 * 1 + 60 63=60 * 1 + 3 60 = 3 * 20 + 0 gcd(123,555) = 3
How do you solve linear Diophantine equations?
The equation ax + by = c has integer solutions if and only if: gcd(a, b) ∣ c
What is modular exponentiation?
To compute a^k mod n , reduce a modulo n at each multiplication step to simplify calculations.
How do you use induction to prove summations?:
To prove P(n): 1. Basis case: Verify P(1) 2. Inductive step: Assume P(k) holds and prove P(k+1) P(k):1+2+⋯+k= (k(k+1))/2
How do you compute powers efficiently in modular arithmetic?
Use modular exponentiation: 1. Break the exponent into powers of 2. Compute intermediate results modulo n. 3. Multiply results modulo n.
What are modular equivalences for addition and multiplication?Back: For integers a,b,c and n:
a≡b(mod n)⟹a+c≡b+c(mod n). a≡b(mod n)⟹a⋅c≡b⋅c(mod n).
How are gcd(a,b) and lcm(a,b) related?
gcd(a,b)⋅lcm(a,b)=a⋅b.
What is the inductive step in mathematical induction
show that if P(k) is true, then P(k+1), its neighbor, is also true. Such that that either the solution matches its property (divisible by a num, etc) or is equal on both its right and left hand sides.
How do you find the modular inverse of a modulo m?
solve ax ≡ 1 (mod m) using the extended Euclidean algorithm. The inverse exists if and only if gcd(a,m)=1
What is the basis step in mathematical induction
test the first element within the proposed set, often N.
when is a number odd?
when for sum integer k, n = 2k+1
when is a number even?
when for sum integer k, n = 2k
How do you prove that a number is even or odd?
Even: A number n is even if n=2k for some integer k. Odd: A number n is odd in = 2k + 1 for some integer k.
What is the Fundamental Theorem of Arithmetic?
Every integer n>1n > 1n>1 can be uniquely expressed as a product of prime factors: n = p1 ^e1 * p2^e2****pk^ek
What is the Chinese Remainder Theorem (CRT)?
For a system of congruences: x≡a1(modn1),x≡a2(modn2),... If n1,n2,...n1,n2,... are pairwise coprime, there exists a unique solution modulo N=n1⋅n2⋅...N=n1⋅n2⋅....
What is the Division Algorithm?
For integers a and b (b>0), there exist unique integers q(quotient) and r (remainder) such that: a=bq+r ,0 ≤ r < b
How do you determine unique solutions in CRT?
For x = a1(modn1) , x = a2 mod{n_2} , 1. Compute M1 = N/n1, M2 = N/n2 2. Find inverses y1,y2y_1, y_2y1,y2 such that Mi*yi≡1(mod ni) 3. x=a1*M1*y1+a2*M2*y2(mod N)
What is Fermat's Little Theorem?
If pis a prime and ais an integer not divisible by p: a^p−1 ≡ 1 (mod p)
What is modular arithmetic?
Modular arithmetic deals with the remainder when one number is divided by another: a ≡ b ( mod n) ⟺ n ∣ (a−b) Addition:(a+b) mod n=((a mod n)+(b mod n))mod n. Multiplication: (a⋅b)mod n = (( a mod n) * (b mod n)) mod n
What is the closure property of rational numbers?
Rational numbers are closed under addition, subtraction, multiplication, and division (except by 0).
What is a counterexample?
A counterexample is an example that disproves a universal statement by showing it does not hold true in at least one case.
What is a linear Diophantine equation?
A linear equation of the form ax+by=c where a,b,c are integers. It has integer solutions if: gcd(a,b) | c
What is the Euclidean Algorithm?
A method to compute the greatest common divisor (gcd) of two integers a and b: 1. Divide a by b: a = bq + r 2. Replace a with b and b with r 3. Repeat until r = 0. the last non-zero is gcd(a,b)
How do you check if a number is prime?
A number p>1 is prime if it has no divisors other than 1and p.
What is a direct proof?
A proof that starts from given assumptions or definitions and uses logical reasoning to arrive at the conclusion.
What is the definition of divisibility?
An integer a is divisible by b(b≠0) if there exists an integer k such that: a=bk
What is the principle of unique prime factorization?
Any integer greater than 1can be expressed uniquely as a product of prime numbers n=p_1^e1*p_2^e2⋯p_k^ek.
What is the Quotient-Remainder Representation?
Any integer ncan be written in the form: n = dq+r , 0 ≤ r < d where d is the divisor, g is the quotient, and r is the remainder.