The document discusses several topics in mathematics including:
1) Big O notation and using it to show that a function is O(x^2).
2) The division algorithm and finding the quotient and remainder when dividing integers.
3) Calculating the greatest common denominator (GCD) of two numbers by finding the greatest factor that divides both numbers.
4) Relatively prime integers having a GCD of 1 and examples of such integers.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
46 views2 pages
A DQ + R: Big Oh Least Common Multiple
The document discusses several topics in mathematics including:
1) Big O notation and using it to show that a function is O(x^2).
2) The division algorithm and finding the quotient and remainder when dividing integers.
3) Calculating the greatest common denominator (GCD) of two numbers by finding the greatest factor that divides both numbers.
4) Relatively prime integers having a GCD of 1 and examples of such integers.
MODULAR ARITHMETIC ex: -13 mod 4 13 = 4 * (-4) + 3 therefore, r = 3
RULES OF INFERENCE Modus ponens p p q q Modus tollens q p q p Hypothetical syllogism p q q r p r Disjunctive syllogism p v q p q Addition p p v q Simplification p . q p Conjunction p q p . q Resolution p v q p v r q v r
ex: Every UMB student is a genius. George is a UMB student. Therefore, George is a genius. U(x): x is a UMB student. G(x): x is a genius. Step 1: x (U(x) G(x)) Hypothesis Step 2: U(George) G(George) Univ. instantiation using Step 1 Step 3: U(George) Hypothesis Step 4: G(George) Modus ponens using Steps 2 & 3 a = dq + r x P(x) __________ Universal Instantiation P(c) if ceU
PROVING THEOREMS 1. Direct method p q is TRUE ex: If n is odd, then n 2 is odd. 2. Indirect method ~q ~p is TRUE ex: If 3n + 2 is odd, then n is odd. 3. Contradiction p ~q is FALSE 4. Induction a) Show P(0) is TRUE b) Show that if P(k), then P(k+1)
EXAMPLE OF INDUCTION 1 + 2 n < 3 n for all n > 1 a) n=1 1 + 2 1 < 3 1 VALID b) P(k) 1 + 2 k < 3 k c) P(k+1) 1 + 2 k+1 < 3 k+1 ------------------------------------------------ 1 + 2 k < 3 k 1 + 2 k + 2 k < 3 k + 2 k < 3 k + 3 k < 3 * 3 k
therefore, VALID
RECURSIVE DEFINITION 1. Fibonacci Series n 1 2 3 4 5 a n 0 1 1 2 3
a 3 = a 2 + a 1 therefore, a n = a n-1 + a n-2
2. a n = 3n-5 n 1 2 3 4 5 a n -2 1 4 7 10
a 2 = a 1 + 3 therefore, a n = a n-1 +3
3. f(n) = n! a n = a n-1 + n
4. a n = 2 n 1 ; n > 1 a n = a n-1 + 2 n-1
ALGORITHM (CONTD) Binary search: log 2 n (from 2 n ) ex: 8 elements 3 steps 16 elements 4 steps