0% found this document useful (0 votes)
25 views9 pages

Math 55 Midterm #2

Uploaded by

Haris Rahim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views9 pages

Math 55 Midterm #2

Uploaded by

Haris Rahim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Definitions:

Chapters 1 & 2: Logic and Proof Writing


○ Sets- an unordered collection of objects which are called its elements. A set contains its
elements, denoted 𝑥 ∈ 𝐴.
○ Functions- A function 𝑓: 𝐴 → 𝐵 is a rule which assigns exactly one element of 𝐵 to each
element of 𝐴.
○ Bijections- If a function is a bijection, then each element of the domain gets its own
unique mapping to each element of the codomain. (no element is missed in the codomain,
so the range and the codomain are the same thing!)
○ Sequence- A sequence is an ordered list of elements, following a specific pattern, usually
given by a function, with the function’s outputs being the elements of the sequence.
○ Cardinality- denoted |𝐴|, is the size of a set.
■ a finite set has exactly 𝑛 elements, for some 𝑛 ≥ 0 ∈ 𝕫 (integer greater than or
equal to 0)
■ A countably infinite set is a set 𝐴, with an infinite number of elements, and there
exists a bijection between 𝐴 and the natural numbers.
■ An uncountably infinite set is an infinite set that does not have any bijection
between it and the natural numbers. (for instance, the real numbers, and many of
its subsets)

Chapter 4: Modular Arithmetic


● Divisibility- If 𝑎 and 𝑏 are integers, and 𝑎 ≠ 0, then 𝑎 divides 𝑏, denoted 𝑎|𝑏, if there
exists and integer 𝑘 such that 𝑏 = 𝑘𝑎.
● Prime- an integer 𝑛 > 1 is prime, if its only divisors are itself and 1.
● GCD- If 𝑎 and 𝑏 are both non-zero integers, then their greatest common divisor (GCD),
denoted 𝑔𝑐𝑑(𝑎, 𝑏), is the largest integer 𝑑 such that 𝑑|𝑎 and 𝑑|𝑏.
● The Fundamental Theorem of Algebra- Every integer can be written as a unique
product of powers of prime factors.
● Coprime- Two integers 𝑎 and 𝑏 are coprime if 𝑔𝑐𝑑(𝑎, 𝑏) = 1. This applies to composite
numbers, for example 16 and 9 are coprime, even though neither one of them are prime
themselves. All that matters is that their greatest common divisor is 1.
● Modular Inverse- 𝑎 is a modular inverse of a modulo m, if 𝑎 * 𝑎 ≡ 1 (𝑚𝑜𝑑𝑚)
● Fermat’s little theorem- For an integer a and an integer 𝑝 which is coprime to 𝑎,
(𝑝−1)
𝑎 ≡ 1 (𝑚𝑜𝑑𝑚)
(𝑝−2)
○ Also note this equation can be manipulated such that 𝑎 * 𝑎 ≡ 1 (𝑚𝑜𝑑𝑝)
(𝑝−2)
thus 𝑎 is a modular inverse of 𝑎.
● Euclid’s Lemma- 𝑝|𝑎𝑏 → (𝑝|𝑎 𝑜𝑟 𝑝|𝑏)
○ If a prime 𝑝 divides the product of two integers 𝑎 and 𝑏, then 𝑝 must also at least
divide one of 𝑎 or 𝑏.
● Bezout's theorem- for some integers 𝑎 and 𝑏 with 𝑔𝑐𝑑(𝑎, 𝑏) = 𝑑, there are some other
integers 𝑥 and 𝑦, such that 𝑎𝑥 + 𝑏𝑦 = 𝑑.
○ In other words, 𝑑 can be represented as a linear combination of 𝑎 and 𝑏

Chapter 5: Induction
● Induction- For some statement P(n), we want to show its correctness for all 𝑛 ∈ ℕ
○ First prove a base case, like P(0) or P(1) or whatever the smallest/lowest possible
case is.
○ Next assume correctness for P(k), and try to show correctness for P(k+1).
○ Try to break up P(k+1) into P(k) and some extra parts. Getting P(k) is the most
important.
● Strong Induction- For some statement P(n), we want to show its correctness for all
𝑛 ∈ ℕ, or sometimes the integers.
○ First prove some base cases, like the lowest base case, and then a couple extra
cases after it. Like P(0), P(1), P(2), P(3), and however many more you need to be
sure you are correct :)
○ Next assume correctness for P(j) for j = 0, 1, 2,... ,k-1, k. Now try to show
correctness for P(k+1).
○ Try to break up P(k+1) into smaller pieces, like P(k) or any other smaller cases
before P(k).
● Well-ordering principle- An Axiom which states that every non-empty subset of the
integers greater than or equal to zero, has some least element.
○ (an Axiom is something we DEFINED to be true, and thus there is no need for a
proof for it)
● Recursive functions- a recursive function is one which defines f(k+1) for some k, in
terms of f(k), f(k-1), f(k-2),... f(1), and f(0).
○ Basically whenever a function uses its past terms to define its future terms, its a
recursive function. A famous example is the fibonacci sequence!

Chapter GRAPH THEORY RAHHHH


○ (All graph theory definitions will be provided on the midterm? So here are theorems {and
such} instead!)
○ Special types of graphs:
■ Complete- a complete graph is one in which every vertex is connected to every
other vertex, and is denoted 𝐾n, with 𝑛 being the number of vertices.
■ k-colorable- a graph G = (V,E) is k-colorable if there is a function f that maps all
the vertices 𝑣 ∈ 𝑉 to either element of the set {0,1,... ,k} in a way that adjacent
vertices have different mappings.
■ 2-colorable- a 2-colorable graph is just a special case of a k-colorable graph,
where the set the vertices are mapped to is {0,1}.
● These graphs are also called bipartite, because there is a way to group the
vertices of the graph in such a way that the only edges in the graph go
from one group to the other, and there are no edges inside either of the
groupings.
■ Cycle- a cycle, denoted Cn, is a circuit with no repeated edges and no repeated
vertices, except for the endpoint, with n being the number of vertices in the cycle.
A graph is called acyclic if it does NOT contain any cycles as subgraphs.
■ Tree- a tree is a graph that is connected and acyclic. There are many properties
involving trees and spanning trees!
● A leaf of a tree is a vertex in the tree with degree of exactly 1.
● Every tree with at least two vertices has at least two leaves.
● If T is a tree with at least two vertices and 𝑥 is a leaf of T, then the
subgraph T` obtained by removing the leaf 𝑥, is also a tree.
● Every tree is 2-colorable.
● For a graph G = (V,E), a subgraph H = (V,F) is a spanning subgraph (as it
has all the vertices of G). Furthermore, if H is a tree, then H is a spanning
tree of G.
● G is connected ↔ G contains a spanning tree H.
■ Hypercube- for some 𝑛 ≥ 1, a hypercube graph Hn = (V,E) has
V = {(x1,x2,...,xn): xi ∈ {0,1}} i.e. the set of bit strings of length 𝑛, and
E = {xy: x and y differ in a single bit, so there exists a unique i such that xi ≠yi}}
● All hypercube graphs are connected and 2-colorable.
○ Connected components- For some graph G = (V,E), there exists a MAXIMALLY
connected component H = (W,F), which is a subgraph of G, such that W is a subset of V,
F is a subset of E, and for all x,y ∈ W, there exists some path from x to y in W.
■ Every graph has at least one connected component. The simplest case is the graph
with one vertex and no edges. Its connected component is just itself, as a subgraph
doesn’t actually have to be “smaller” than the original graph. Although this
example is rather un-spectacular.
■ For larger graphs, if it’s connected then again it is its own connected component,
which is still un-spectacular, but slightly less so. This is because a connected
component is MAXIMAL, meaning it is as big as it can be without being
disconnected or bigger than the original graph.
■ For larger graphs that are disconnected, this means it has multiple smaller graphs
which are not connected to each other, but on their own are all connected.
■ This is also why for *most* proofs, you can assume the graph is connected! If it is
disconnected, *most* of the time you can just move onto one of the graphs
connected components, because it’s *likely* that the property you want to prove
will also hold for the connected component.
○ Handshaking theorem- For any graph G = (V,E), the sum of the degrees of the vertices
in the set V must be equal to twice the number of edges in the set E.
○ Ramsey Theory- In a graph with 6 vertices, there are either 3 vertices which are all
adjacent to each other, or 3 vertices that are not adjacent to each other. (a friend group of
3 or a group of 3 strangers)
○ Max Chromatic Number- at most one plus maximum degree
○ 2-colorable ↔ no odd circuit- a graph is two colorable if and only if it does NOT
contain any odd circuits. This also means that if a graph doesn’t contain any odd circuits,
then it must be 2-colorable!
○ Eulerian Circuit- An Eulerian circuit of a CONNECTED graph G = (V,E), is a circuit
which traverses each edge in E exactly once!
■ Observe since G is CONNECTED, it also means that this circuit will visit every
vertex in V, and it can visit a vertex more than once! The only rule is that it has to
traverse each edge exactly once.
○ Euler circuit ↔ connected and even degrees- a graph has an Eulerian circuit if and
only if it is connected and all of its vertices have even degrees. This also means that if a
graph is connected and each of its vertices have even degrees, that there must be an
Eulerian circuit!.

Chapter 6: Counting and Combinatorics


○ Subtraction rule- |𝐴 ∪ 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵|
■ The size of the union of 𝐴 and 𝐵 is the sum of the sizes of 𝐴 and 𝐵, minus the size
of their intersection.
○ Sum rule- if |𝐴 ∩ 𝐵| = ∅, then |𝐴 ∪ 𝐵| = |𝐴| + |𝐵|
■ If the intersection of 𝐴 and 𝐵 has no elements, then the size of the union of 𝐴 and
𝐵 is simply the sum of the sizes of 𝐴 and 𝐵.
○ Product rule- supposing an object from a set 𝑆 can be uniquely specified by a sequence
of k choices c1,c2,...,ck and the number of ways to make c1=n1, c2=n2 given c1, c3=n3 given
c1 and c2,..., ck=nk given c1,c2,c3,...ck-1, then |𝑆| = n1*n2*n3*...*nk
■ If you can uniquely specify a way to make all possible choices for ordering some
set 𝑆 in some way, where each successive choice depends on the choices made
before it, then the total number of choices is simply the product of the number of
smaller choices you made!
○ Many to one maps- a function 𝑓: 𝐴 → 𝐵 is m to 1 if it is onto, and
−1
∀𝑏 ∈ 𝐵, |𝑓 ({𝑏})| = 𝑚
■ also called being m to 1, this means that for a function 𝑓: 𝐴 → 𝐵 that is m to 1,
exactly m elements from 𝐴 are mapped to any specific element in 𝐵.
■ For 1 to 1, each element in 𝐴 gets its own special mapping into some unique
element in 𝐵, but for m to 1, a group of m elements in 𝐴 get a group mapping into
some unique element in 𝐵.
|𝐴|
○ Division rule- For some function 𝑓: 𝐴 → 𝐵, if f is m to 1, then |𝐵| = 𝑚
○ Cardinality- (this is exactly like before, but in this context it just means how big is the
set we are trying to count)
○ Bijections- (this is exactly like before, but in this context we use bijections to show that
the set we are trying to count is exactly the same size as some other set! Hopefully one
we already know the size of, so that way we can count the original set!)
○ Permutation- An ordered set of n distinct elements. There are exactly n! permutations
for a set of n distinct objects.
○ r-permutations: An ordered set of r distinct objects chosen from n distinct objects. The
𝑛!
number of r-permutations is exactly (𝑛−𝑟)!
, denoted P(n,r)
○ Combinations- An unordered set of n distinct objects. There is exactly 1 combination for
a set of n distinct objects.
○ r-combinations- An unordered set of r distinct objects chosen from n distinct objects.
The number of r-combinations is exactly
𝑛!
(𝑛−𝑟)!𝑟!
, and is denoted C(n,r) or () 𝑛
𝑟

○ Permutations with repetitions- the number of permutations of r objects from n objects


𝑟
with repetitions allowed is exactly 𝑛
○ Combinations with repetitions- the number of combinations of r objects from n objects
(
𝑛+𝑟−1
with repetitions allowed is exactly 𝑟−1 )
○ Combinatorial proofs- (I don't know what he meant by this, maybe just go over the
proofs we did for things involving combinatorics in lectures 18 and 19 and you should be

😁
good)
○ Binomial coefficients- (see the example below )
𝑛
○ Binomial Theorem- (𝑥 + 𝑦) = ∑
𝑛

𝑟=0
( )𝑥 𝑦
𝑛
𝑟
𝑟 𝑛−𝑟

■ This can look confusing, but often we just use it to find the coefficient of a
specific term in some binomial that we don't want to expand all the way out.
■ It helps if you think of x and y as the whole term instead of just the variable. For
23
example: find the coefficient of the 7th term of (5𝑎 − 3𝑏)
■ This would be a DISASTER to try and expand, so let's use the theorem and be
lazy! In this case, we will say that 𝑥 = 5𝑎 and 𝑦 = -3𝑏.
*It's important to remember the sign of the term here!*
■ Using the theorem, for 𝑟 = 7, we see the term would be ( ) (5𝑎) (− 3𝑏)
23
7
7 23−7

which is gross, but manageable, and almost done!


■ Since doing all the multiplications would make more numbers to write, we can be
lazy and leave them in factored form. Thus our final answer is ( )5 3
23
7
7 16 7 16
𝑎𝑏
which isn't too bad! And the sign of the term is positive, but it could have been
negative if the power on the 𝑦 was odd, so make sure you remain vigilant, soldier.

○ Pascal's identity- if 𝑛 ≥ 1 and 1 ≤ 𝑟 < 𝑛, then ( )=( )+( )


𝑛
𝑟
𝑛−1
𝑟−1
𝑛−1
𝑟

■ Basically this is just the instructions on how to build Pascal’s triangle. For some
part that you want, just sum the two elements together that are above and to the
right, and above and to the left.
■ This can maybe be used in induction if you wanted to break up a k+1 case into a k
( ) ( ) ()
𝑘+1
case. Like for example 𝑟 = 𝑟−1 + 𝑟
𝑘 𝑘
Induction problems:
1. Prove the following using mathematical induction. (from worksheet 11):
𝑛 3
a. Prove that ∀𝑛 ≥ 1: 3 > 𝑛
𝑛
𝑘 (𝑛+1)
b. Prove that ∀𝑛 ≥ 1: ∑ 𝑘 * 2 = (𝑛 − 1) * 2 + 2
𝑘=1
2. Prove the following using strong induction. (from worksheet 11):
a. Let 𝑛 ≥ 1. Prove that you can always make n cents using 2-cent and 5-cent coins
for any 𝑛 ≥ 4
b. Prove that for all 𝑛 ≥ 1, the Fibonacci sequence
𝑛
𝐹1− 1, 𝐹2− 1, and 𝐹n− 𝐹𝑛 − 1 + 𝐹𝑛 − 2 satisfies 𝐹n < 2

Graph Theory problems:


1. Prove or disprove that the following graphs are bipartite, a.k.a. 2-colorable (from
worksheet 12)
a. 𝐾3
b. 𝐾4
c. 𝐶6 (the cycle on 6 vertices)
2. Construct (draw) and find the number of edges of each simple graph given its degree
sequence, if possible. If constructing such a graph is impossible, state why. (from
worksheet 12, and c and d are my own abominations)
a. Degree sequence: 4, 3, 3, 2, 2.
b. Degree sequence: 5, 2, 2, 2, 2, 1.
c. Degree sequence: 6, 4, 4, 4, 2, 2, 1.
d. Degree sequence: 100, 2, 2, 1. (notice there are 4 vertices in total)
3. Among a group of 5 people, is it possible for everyone to be friends with exactly 2 of the
people in the group? What about 3 people in the group? (from worksheet 12)
4. Draw a 2-colorable graph with degree sequence 5, 2, 2, 1, 1, 1 or prove that no such
graph exists. (from worksheet 12)
5. Consider the complete graph with 4 vertices, 𝐾4, does it have a 3-coloring? Does it have a
4-coloring? (from worksheet 13)
6. What is the smallest 𝑘 such that the complete graph with 𝑛 vertices, 𝐾n, has a k-coloring?
(from worksheet 13)
7. Show that if 𝐺 = (𝑉, 𝐸) is a connected simple graph, then |𝐸| ≥ |𝑉| − 1. furthermore,
show that if you actually have |𝐸| = |𝑉| − 1, then G must be a tree. (from worksheet
14)
8. Show that if 𝐺 = (𝑉, 𝐸) is an acyclic simple graph, then |𝐸| ≤ |𝑉| − 1. (from
worksheet 14)
9. Draw a graph 𝐺 = (𝑉, 𝐸) that satisfies |𝐸| = |𝑉| − 1 but is not a tree. (hint: I never
said this graph had to be connected) (from worksheet 14)
10. Prove or disprove: every bipartite simple graph with an Eulerian circuit has an even
number of edges. (from worksheet 15)
11. Prove or disprove: Every simple graph with an Eulerian circuit and an even number of
vertices has an even number of edges. (from worksheet 15)
12. Prove or disprove: Let G be a simple graph with an Eulerian circuit. If the edges 𝑒 and 𝑓
are incident to a shared vertex 𝑣, then G has an Eulerian circuit in which 𝑒 and 𝑓 appear
consecutively.
13. Prove by induction that every tree with n vertices has exactly n-1 edges. (this was
actually on the homework, but it’s good practice with induction and graph theory)
14. Prove by induction that if a graph is connected, then it has a spanning tree. (this is in the
notes from lecture 16 near the end)
Directed graphs and graphs with loops are not covered in this course.
Only simple graphs and some multigraphs :)

Counting and Combinatorics problems:


𝑛
𝑛! 𝑛
1. Given that 𝐶(𝑛, 𝑘) = 𝑘!(𝑛−𝑘)!
, prove that ∑ 𝐶(𝑛, 𝑘) = 2 (hints: (a) sum rule (b) How
𝑘=0
many size-k subsets of (1, 2, 3,...,n) are there?) (worksheet 16)
𝑛
() ( )
𝑛
2. Give a combinatorial proof that 𝑖 = 𝑛−𝑖 (worksheet 17)
6 13
3. Using the binomial theorem, what is the coefficient of the term with 𝑥 𝑦 in the
following binomials: (inspired from worksheet 17)
19
a. (𝑥 + 𝑦)
19
b. (2𝑥 − 7𝑦)
2 16
c. (2𝑥 − 7𝑦)
4. How many ways are there to fill a 2 × 𝑛 box with 𝑛 dominos of size 1 × 2, if each
domino can be placed either vertically or horizontally, and no dominos are allowed to
overlap? (worksheet 18)
5. How many bit strings of length 5 are there? What about bit strings that have 00 at the end
of them? What about the bit strings that start with a 1? And what about the bit strings that
either start with 1 or have a 00 at the end? (hint: use the sum rule) (from the notes from
lecture 18)
6. How many unique ordered 6 card hands can be drawn from a deck of 52 cards? What
about unique UNordered 6 card hands? (more or less from lecture 18 notes)
7. How many different phone numbers can be made? Using a 7 digit phone number with
digits being from the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} (From lecture notes 19)
a. Part two: what is the total if we include a 3 digit area code to the number? Again
with the digits being from the same set of numbers.
8. How many different ice cream sundaes can be made that have 3 scoops of ice cream,
with the possible flavors being Mint, Chocolate, Vanilla, Strawberry, and Pistachio?
(hint: does order matter? Are repetitions allowed?) (more or less from lecture notes 19)
9. Super hard final question: how many unordered sets of 5000 distinct objects are there?
(very very very hard)
Putting Tokens in Boxes, Counting with Recurrence Relations, and
Pigeonhole (Lectures 20, 21) will not be on the Midterm.

You might also like