Discrete 3 Flashcards
Suppose that a procedure can be broken down into a sequence of two tasks
(task 1 followed by task 2). If there are n1 ways to do the first task and n2 ways to do the second
task following the first task
then there are n1·n2 ways to do the procedure.
Suppose that there are n1 ways to do task 1 and n2 ways to do task 2. If
there is no overlap between the two tasks,
then there are n1 + n2 ways to do task 1 or task 2.
Suppose that there are n1 ways to do task 1, n2 ways to
do task 2, and k ways to do both.
Then there are n1 + n2 – k ways to do task 1 or task 2.
To find the smallest N such that in k boxes there are t guarunteed
N = k (t −1) + 1.
cieling (n/k) = t
binomial theorem
sumk=0ton (n/k)x^ky^(n-k)
order matters and repeats allowed
n^r
order matters and repeats not allowed
p(n,r) = n!/(n-r)!
order does not matter and repeats allowed
n-1 bars and r stars
C(n-1+r,r)
order doesn’t matter and repeats are not allowed
c(n,r) n!/((n-r)!r!)
To solve a recurrence relation of the form 𝑎𝑛 = 𝑐𝑎𝑛−1
𝑎𝑛 = 𝛼(𝑟1)^𝑛
𝑛 ≥ 0. with initial conditions and r = c
To solve a recurrence relation of the form 𝑎𝑛 = 𝑐1𝑎𝑛−1 + 𝑐2𝑎𝑛−2
𝑟^2 − 𝑐1𝑟 − 𝑐2 = 0
find r1 and r2.
if r1 != r2
then 𝑎𝑛 = 𝛼(𝑟1)^𝑛 + 𝛽(𝑟2)^𝑛
, 𝑛 ≥ 0
else if r1=r2
𝑎𝑛 = 𝛼(𝑟1)^𝑛 + 𝛽N(𝑟1)^𝑛
, 𝑛 ≥ 0