A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers...

9
A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) – Prime numbers • Definition • Relative prime • Fundamental theorem of arithmetic (unique prime factorization of integers) – Division • Definition (a | b iff b = a*c) and properties • Division algorithm: a = dq + r • Modula operation (a mod d) – gcd and lcm • Their definitions • gcd(a, b)*lcm(a, b) = a*b (why?) • Euclidean algorithm for gcd (both iterative and recursive

Transcript of A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers...

Page 1: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

A Brief Summary for Exam 2Subject Topics

• Number theory (sections 2.4 - 2.5)– Prime numbers

• Definition • Relative prime• Fundamental theorem of arithmetic (unique prime factorization of

integers)– Division

• Definition (a | b iff b = a*c) and properties• Division algorithm: a = dq + r• Modula operation (a mod d)

– gcd and lcm• Their definitions• gcd(a, b)*lcm(a, b) = a*b (why?)• Euclidean algorithm for gcd (both iterative and recursive

Page 2: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

• Mathematical Induction & Recursion (sections 3.1 - 3.5)– Sequence and summation

• Definition of sequence (ordered list of elements)• Summation notations (lower/upper limits, double summation)• Useful sequences (arithmetic, geometric, Fibonacci, etc.) and

their summation formulas– Induction

• Rationale and relation to natural numbers• Two parts of the proof

basis step, inductive step (start with inductive hypothesis)• Strong induction• Structural induction

Page 3: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

– Recursion• Basic idea of recursion• Recursive definition of

– Sequences, functions, sets– Two parts: base case and recursion

• Relations to inductionprove recursively defined properties by induction

• Recursive algorithms– Pros and cons (wrt iterative algorithms)

Page 4: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

• Counting (sections 4.1 – 4.5)– Useful rules:

• Sum rule: (disjoint) tasks done at same time |A1 A2| = |A1| + |A2|

• Product rule: (disjoint) tasks done at different time |A1 A2| = |A1| * |A2|

• Inclusion – exclusion rule: (overlapping) tasks done at same time |A1 A2| = |A1| + |A2| - |A1 A2|

– Pigeonhole Principle• Idea and rationale • at least one box containing at least N/k of the

objects.

Page 5: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

– Permutations and combinations• Definitions of permutations, r-permutations, r-

combinations• Formulae for (P(n,n), P(n, r), and C(n, r)

P(n, r) = n!/(n – r)!C(n, r) = n!/[r!(n-r)!]

• Relationship between permutation and combinationsP(n, r) = C(n, r)P(r, r)

• Pascal triangle and Binomial coefficients

Page 6: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

• Discrete Probability (sections 5.1 - 5.2)– Experiments, outcomes, and sample space

• Use counting techniques to determine sample space• p(s) for each sS

– 0 p(s) 1 for each sS sS p(s) = 1– If all outcome are equally probable, then p(s) = 1/|S|

– Events and event probability• E S, P(E) = sE p(s) (P(E) = |E|/|S| if outcomes are

equally likely)• Use counting techniques to determine samples in E• Complementary event: P(E) = 1 – P(-E).

– Help with Venn diagram

Page 7: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

– Conditional probability P(E|F)• Definition: probability of E, given F (probability

of E or in subspace F S)• Relation to joint probability

– p(E|F) = p(EF)/p(F) or p(E|F) = |EF|/|F| – p(EF) = p(E|F)P(F) = p(F|E)P(E)

– Inclusion-exclusion rule:p(EF) = p(E) + p(F) – p(EF)

– Bayes’ theorem p(F|E) = p(E|F)p(F)/p(E)

Page 8: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

– Independence• Events E and F are independent of each other if

p(E|F) = p(E) (E’s probability not depending on F)• P(EF) = p(E) + p(F) –p(E)p(F)

– Bernoulli Trials• Experiment with two outcomes, s and f, • p = P(s), q = P(f) = 1– p (because p + q = 1)• n independent trials with k s (and n – k f)

C(n, k)pkqn-k

Page 9: A Brief Summary for Exam 2 Subject Topics Number theory (sections 2.4 - 2.5) –Prime numbers Definition Relative prime Fundamental theorem of arithmetic.

Types of Questions• Conceptual

– Definitions of terms

– True/false

– Multiple choice

• Problem solving– Work with small concrete example problems

• Proofs– Simple theorems or propositions

– Especially proof by mathematical induction

No questions will be outside of this summary and lecture notes