Discrete Note Sheet

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Exam Topics Last topic of Combinatorics, 6.7, 6.8, 7.1, 7.2, 8.1, 8.2.

Last topic of Combinatorics


Example: How many integer solutions does i+j+k = 10 if k are non negative and i >= 3.
If i is at least 3 we can think of the question as i+j+k=7. Given the formula ((# of
variables + total value)-1)C(# of variables -1) so we have (7+3-1)C(3-1) or 9C2 = 36.

6.7 Binomials
Example: (2w+x+3y+z)​12​ find the coefficients of w​2​x​3​y​2​z​5​.
Make sure that the powers add up to original so in this case 12.
Then follow solve with 12C2 * (2w)​2 ​* 10C3 * x​3​ * 7C2 * (3y)​2​ * 5C5 * z​5
Now that we have made sure the powers are correct we focus on coefficients of
these powers. Since z and x are both bare then we can say they have an implied 1 in front of
them. From there we can find the coefficient associated with desired power.
= 12C2 * 4 * 10C3 * 1 * 7C2 * 27 * 5C5 * 1

6.8 Pigeonhole Principle or PHP


Important Question Types. At Least vs Exactly
At Least is a problem that can be solved by the average.
Sum of n integers is = (n*n+1)/2

Example:​ Suppose 11 Basketball players stand in a circle. Their shirts are labelled with
the integers 1,2…,11 but they are no standing in particular order. Show that five consecutive
players have numbers summing to at least 30.
Suppose x​1​,x​2​,x​3​...x​11​ are the jersey numbers for the basketball players.
Let s​1​ = x​1 +
​ x​2​+ x​3 +
​ x​4 +
​ x​5​ , s​2​ = x​2 +
​ x​3​+ x​4 +
​ x​5 +x​
​ 6​ , s​3​ = x​3 +
​ x​4​+ x​5 +
​ x​6 +
​ x​7 .. s​
​ 11​ = x​11 +

x​1​+ x​2 +
​ x​ 3​ + x​ 4.
Note, s​1​+ s​2​+ s​3​..+ s​11​ = 5(1+2+3….+11)
= 5 * ((11*12)/2) = 330
For some i, s​i ≥ ⌈(330/11)⌉ = 30.
Exactly is generally a more difficult and is similar to the tractor salesman or chessmaster
problem.

Example:
A tractor salesman is visiting farms in a particular community. The salesman has exactly
six weeks to work in this particular community. He gives himself the task of visiting at least one
farm per day. Due to work rules, he cannot visit more than three farms in any two day period.
Show that one some set of consecutive days, exactly eleven farms are visited.

6 weeks has 42 days labeled consecutively as 1,2,3,....,42.


Let x​i ​ be the number of farms visited on day i. Note, for each i, 1 ≤ x​i​. Let s​i ​= x​1​+ x​2​ + x​3
+.....+ x​i​. Thus, s​i​ is the number of farms visited on the first i days. We can break the 6 weeks up
into 21 pairs of days. By the work rules the salesman must have a max of 21 * 3 = 63. Thus, 1 ≤
s​1 <
​ s​2 <
​ s​3 <
​ ..... < s​42 ≤​ 63 and 1 ≤ s​1​+11​ < ​ s​2​+11​ <
​ s​3​+11​ <
​ ..... < s​42​+11​ ≤
​ 74. Consider the 84
integers s​1​,s​2​,....,s​42​ , s​1​+11,s​2​+11,.....,s​42​+11. These are all between 1 and 74. By the
Pigeonhole Principle two must be equal. Thus for some i and j.

S​i​ = s​j​+11 or 11 = s​i​-s​j


= ( x​1​+ x​2​ + x​3​ +..... + x​i )​ - ( x​1​+ x​2​ + x​3​ +.....+ x​j​ )
= (x​j​+1 ) + (x​j +2)
​ + …. + x​i.
So on days j+1 thru i, exactly 11 farms are visited.

7.1 and 7.2 Recurrence Relations


Recursively defined: The terms are defined by one or more of the terms in the sequence.
Example: a​0​= 1 a​n+1​= 2a​n
1,2(1),2(2(1)), 2(2(2(1)... ect.
Describe these with a recurrence relation:
2,4,8,16…. : ​ for
1,3,5,7…. : ​ for
5,10,20,40… : ​ for
Proof by induction section.

Linear homogeneous (pretty much Diff Eq)

Example:​ Solve an = 3a​n−1​ − 2a​n−2​ such that a​1​ = 5 and a​2​ = 7.


First observe that an is a linear homogeneous recurrence relation
(it is of the form an = Aa​n−1​ + Ba​n−2​).
By manipulating our recurrence relation,
a​n​ = 3a​n−1​ − 2a​n−2​, (7)
a​n​ − 3a​n−1​ + 2a​n−2​ = 0. (8)

From here let’s assume that an = r​n​ for some constant r. By substitution we can build a
characteristic equation,
r​n​ −3r​n-1​ +2r​n-2​ =0, (9)
r​n-2​ (r​2​ −3r+2)=0, (10)
r​n-2​(r−1)(r−2)=0. (11)

From here we can say that the characteristic roots are r = 1 and r = 2(we don’t really
care about r=0). We want to use the characteristic roots to build a complementary solution. In
general the complementary solution is a linear combination of our characteristic roots,
an = A(1)​n​ + B(2)​n​ (12)
Using our initial conditions a​1​ = 5 and a​2​ = 7 we can solve the system of equations and
find a closed form expression to our recurrence relation.
5 = A(1)​1​ + B(2)​1​, (13)
7 = A(1)​2​ + B(2)​2​. (14)
Note that A=3 and B=1. Thus a​n​ =3+2​n​.

Reminder: ​For repeated roots the complementary solution will have an extra “n” term.
Suppose the characteristic equation is,
r​n-2​(r−2)(r−2)=0. (15)
Then the roots are r = 2 and r = 2. When we build the complementary solution it will have the
form,
a​n​ = A(2)​n​ + Bn(2)​n​ (16)
and then the problem is just the same as before.

8.1 and 8.2 Graph Theory up to Eulrian.

Simple Graph​: A graph with no loops, no parallel edges.


Complete Graph:​ A graph in which all nodes/vertices are adjacent
Fundamental theorem​: ​Every​ graph has an even number of odd vertices

Simple Complete Simple not complete Complete, not simple

Bipartite​: If there exists subsets ​& ​ (either can be possibly empty) of ​ such that
​, ​ and each edge is incident on one vertex in ​ and ​.
Example: ​ Complete Bipartite

Path​ : Vertex to Vertex route (u~v)


Length​: Number of edges in a path
Simple path​: Path repeats no vertices
Connected Graph​: Every pair of vertices are adjacent

N-cubes
Degree of Vertex​: Number of adjacent vertices to said vertex, loops
are counted twice
D(A) = 2
D(B) = 3
D(C) = 5

Sum of Degrees​: 2 * Number of Edges


Example: 2 * 5 = 10 = D(A) + D(B) + D(C)

Simple Cycle​: A cycle that only repeats the first/last vertex.


Ex: ADBCA

Euler Cycle​: A cycle with every edge only once. A connected graph is
Eulerian ​iff​ ​it has no odd vertices
Ex: 0340210

Cut Vertex/Articulation point​: Vertex that when removed it increases the


number of components in the graph. In the example on the left, G is an
articulation point.

Bridge​: An edge that when removed increases the number of


components in the graph. A bridge always connects 2 articulation
points, except in O ----- O where degree is 1. In the example to the
right, the bridge exists between c and d.

Euler Path​: A path that contains each edge only once.


Graph theory problems:
Show that in any simple graph with at least 2 vertices, there exists 2 vertices sharing the same
degree.
​… ​ E=number of edges
If all degrees are different, the smallest this can be is:

1+2+3+...+n =

However, the largest amount of edges in a complete graph is ​,

Therefore

This is false for any positive n, therefore there is no such graph where every degree is different.

You might also like