Discrete Math Final Exam

Ace your homework & exams now with Quizwiz!

Bijective

both injective and surjective. An inverse exists only if f is bijective.

Binomial Theorem

(a + b)^n = \sum\limits_{k}^n (n choose k) (a ^{n-k}) (b^k}

A three-tree is a tree such that all vertices have either degree 1 or 3. Let T be a three-tree with at least four leaves, that is, l >= 4. Show that there is some internal vertex that is adjacent to two leaves.

1. Consider the maximal path P in T. We know that P terminates in two leaves, say u and v. WLOG, consider the vertex adjacent to u, say w. Since w is not a leaf, w must have degree of 3. Since w lies along P, w must have an adjacent vertex that is not along the path P. I claim that this vertex, x, is a leaf. Assume towards a contradiction that x is not a leaf. That is, x has a neighbor j also not along P. Then, we could construct a larger path v, ..., w, x, j. This is a contradiction since P is maximum. Hence, w is adjacent to two leaves. 2. Consider the graph T' induced on the internal vertices of T. That is, we remove all the leaves from T. Since there are at least 4 leaves in T, we know there are at least 2 internal vertices in T'. We also know that T' is connected, since removing leaves from a tree does not disconnect it. Also, T' is acyclic since removing leaves from a tree cannot create a cycle. Hence, T' is a tree with at least two leaves, say u and v. WLOG, we know that the degree of u in T' is 1 and the degree of u in T is 3. Hence, we must have removed two leaves adjacent to u.

If the minimum degree d >= 0 and there are no cycles of length three, there must be at least 2d vertices in the G.

1. Let P(d) be the claim that if a graph G has minimum degree d >= 0 and there are no cycles of length three, then there must be at least 2d vertices in G. BC: d = 0. If the minimum degree is 0 and there are no cycles of length three, we want to show that there are at least 0 islands in G. This is trivially true. d = 1. If the minimum degree is 1 and there are no cycles of length three, we want to show that there are at least 2 islands in G. This is trivially true. IH: Assume that P(j) is true for all 0 <= j <= k. IS: Consider a graph G with no cycles of length three and minimum degree k + 1 >= 0. Consider two arbitrary vertices u, v in G. Let G' = G - {u, v}. By removing two vertex, we cannot create a cycle of length 3. Also, we've decreased the degree of any vertex by at most 1. Assume towards a contradiction that removing u and v decreases the degree of a vertex s by 2. In that case, (s, u) and (s, v) must have existed. This is not the case since G contained no cycles of size 3. Now, we can apply IH. By IH, G' consists of at least 2k vertices. Adding u and v back to G' shows that G consists of at least 2k + 2 vertices, or 2(k + 1) vertices. 1. Consider an arbitrary but particular vertex in G, say v. Let's consider the neighborhood of v. If It exists, let us consider an arbitrary but particular vertex u, such that u belongs to the neighborhood of v. Before we move forward, note that there are d + 1 vertices in G, since the degree of v is d and v itself is a vertex. Now, since u is a neighbor of v, we know there is an edge between them. If there are no cycles of length three in G, then we know any arbitrary but particular vertex adjacent to u, say y, cannot also be adjacent to v. Now, let us count the distinct vertices given by the neighborhood of u. Just as the neighborhood of v yields d + 1 vertices, u does too. However, both u and v have been counted in the neighborhood of v, so we must subtract 2 from d + 1. Adding these together, we find that d + 1 + (d - 1) >= 2d.

DeMorgan's Law's

A - (B \cup C) = (A - B) \cap (A - C) A - (B \cap C) = (A - B) \cup (A - C)

Hamiltonian cycle

A Hamiltonian cycle in a graph G is a cycle in which each vertex of G appears exactly once. A graph is Hamiltonian if it contains a Hamiltonian cycle.

Every connected graph with n vertices has at least n - 1 edges

A connected graph has 1 connected component. We see that 1 >= n - m. We see that m >= n - 1. Hence, the number of edges is at least n - 1.

Subdivision

A subdivision of G is formed from G by replacing edges with paths. If a graph is planar, then so are its subdivisions. Hence, any graph that contains K_5 or K_{3, 3} as a subdivision is nonplanar.

For any integer n at least 3, let G be a simple graph on n vertices. If the minimum degree of G is at least n/2, then G has a Hamiltonian cycle.

Assume that G does not have a Hamiltonian cycle. Add new edges to G one-by-one until we come to a point where adding an edge, say {x, y}, creates a Hamiltonian cycle. Let G' be a graph in which all vertices have degree at least n/2 and G' does not have a Hamiltonian cycle, but adding {x, y} will make G' Hamiltonian. Consider the maximum path P in G', say x, v_1, v_2, v_3, ..., v_{n-1}, y. Since x and y are the endpoints of P, all neighbors of x and y must be in P. The degree of x and y is at least n/2, so we must account for their n/2 - 1 other neighbors. There are a few things that we know: {x, y} does not exist, {x, v_1} exists, and {v_{n-1}, y} exists. In P, there are exactly n-1 edges between x and y. Let these edges be the holes, and let the n - 2 edges of the form {x, v_{i + 1}} and {v_i, y} be the pigeons. By PHP, there exists the ceiling of (n-2)/(n-1) = 1 hole that satisfies {x, v_{i + 1}} and {v_i, y}. In other words, there exists an edge {v_i, v_{i+1}} that is incident on two vertices. Observe that {x, v_{i+1}} and {v_i, y} must exist. There is a Hamiltonian cycle from x, v_1, v_2, ..., v_i, y, v_{n-1}, ..., v_{i + 1}, v_i, x.

G contains no cycle but G + {x, y} does, for any two non-adjacent vertices x,y in G implies any two vertices of G are linked by a unique path in G.

Assume that there are two paths from u to v. Beginning at u, let a be the first vertex at which the two paths separate and let b be the first vertex after a where the two paths meet. Then, there are two simple paths from a to b with no common edges. Combining these two paths gives us a cycle. This is a contradiction since G contains no cycle.

If for any three odd cycles in G at least two share a vertex, then the chromatic number of G is less than 9.

Assume the contraposition. If the chromatic number is at least 9, then G contains three odd cycles with no shared vertices. Let us partition G into three sub-graphs, say G_1, G_2, and G_3. We will construct these sub-graphs such that each sub-graph contains all the vertices of at least three different colors. We have that x(G_1) >= 3, x(G_2) >= 3, and x(G_3) >= 3. We know from Lecture that a graph is bipartite if it is 2-colorable, hence G_1, G_2, and G_3 are not bipartite. We also know that a graph is bipartite if and only if it has no odd cycles. Since G_1, G_2, and G_3 are not bipartite, they must all contain odd cycles. Hence, G is composed of at least three odd cycles, none of which share a vertex.

Prove that K_5 is nonplanar.

Assume towards a contradiction that K_5 is planar. Then, by Euler's formula, f = 2 - n + m. We know that n = 5. By Handshaking, m = 10. Hence, 10 <= 3(5) - 6 by upper-bound of planar graphs. This is clearly not true. K_5 is nonplanar.

Prove that K_{3, 3} is nonplanar.

Assume towards a contradiction that K_{3, 3} is planar. Then, by Euler's formula, f = 2 - n + m. We know n = 6 and m = 9 for K_{3, 3}. Hence, f = 2 - 6 + 9 = 5. Now, since K_{3, 3} is bipartite, it takes at least 4 edges to form a cycle. We must cross an independent set four times to get back to a particular vertex since no two vertices in an independent set are adjacent. Then, by Handshaking Lemma for faces, 4f <= 2m. Substituting m, we find that 4f <= 18. Hence, f <= 18/4, f <= 4. This is a contradiction since f = 5 by Euler's formula.

The chromatic number in G is greater than or equal to the size of the maximum clique in G.

Assume towards a contradiction that the chromatic number is less than the maximum clique. Let's consider the clique of maximum size in G, say C. We know that C consists of Q(G) vertices. Let the x(G) colors be the holes and the Q(G) vertices in C be the pigeons. By PHP, there exists at least 1 color that colored 2 distinct vertices in C since x(G) < Q(G). However, we know that all vertices in C are adjacent. Two adjacent vertices cannot be the same color. This is a contradiction. We also know that x(G) cannot always equal Q(G) because if the size of the maximum clique in G is 2 and G has an odd cycle, then x(G) >= 3 since a graph is not bipartite if it has an odd cycle.

Prove that there are infinitely many prime numbers.

Assume towards a contradiction that there are only finitely many prime numbers. Let p be the largest prime number. Then, all the prime numbers can be listed as 2, 3, 5, 7, ..., p. Consider an integer n that is formed by multiplying all the prime numbers and then adding 1. Clearly, n > p. Since p is the largest prime number, n cannot be a prime number. Let q be any prime number. Because of the way n is constructed, n mod q is 1. That is, n is not a multiple of q. This contradicts the fundamental theorem of arithmetic which states that every positive number can be uniquely represented as a product of primes.

If G is a graph with n + 1 vertices and n edges, prove that there exists at least one vertex in G that is connected to at most 1 other vertex.

Assume towards a contradiction that there does not exist at least one vertex in G that is connected to at most 1 other vertex. In other words, all vertices in G are connected to at least 2 other vertices. By Handshaking Lemma, 2(r + 1) is no more than 2m. We see that m is at least r + 1. This is a contradiction, since m = r.

Prove that √15 is irrational.

Assume towards a contradiction that √15 is rational. Then, √15 can be expressed as (a/b), where b \neq 0. Note that a and b must be co-prime here since the fraction is simplified. This means a and b share no common factors. We can set √15 equal to (a/b). Square both sides. Multiple both sides by b^2. We have that 15 must divide a^2. Clearly, 3 must divide a^2. Since a^2 is just a times a, we have that 3 divides a. We can say that a^2 is equal to 3k^2 for some integer k. Substituting in, we find that 15b^2 is equal to 9k^2. We can divide both sides by 3 to find that 5b^2 is equal to 3k^2. By the same logic, 3 must divide either 5 or b^2. 3 clearly doesn't divide 5, so 3 must divide b^2. Since b^2 is just b times b, we have that 3 divides b. This is a contradiction since a and b share no common factors.

Let P1 and P2 denote two paths in a connected graph G with maximum length. Prove that P1 and P2 have a common vertex

Assume towards a contradiction the P1 and P2 do not share a common vertex. Since the graph is connected, P1 and P2 must be connected via at least one edge. This edge has endpoints u in P1 and v in P2. Call the endpoints of P1 a and b. Call the endpoints of P2 c and d. Since u is in P1, we know there exists a path from a to u and u to b. Let the larger of these two paths be called P3. Since v is in P1, we know there exists a path from c to v and v to d. Let the larger of these two paths be called P4. Now consider the path P3 \cup {(u, v)} \cup P4. We know this path has size at least l + 1. This is a contradiction, since P1 and P2 are maximum length paths of size l.

Let G be a connected planar graph with n vertices and m edges. Let f be the number of faces in a crossing-free embedding for G. Then n - m + f = 2.

BC: m = n - 1. G is a tree by definition. G has only 1 face. Hence n - (n -1) + 1 = 2. IH: Assume that P(k) is true for some k >= n - 1. IS: We want to show that P(k + 1) is true. In other words, we want to show that n - (k + 1) - f = 2. Consider a planar graph G with n vertices and k + 1 edges. Choose a crossing free embedding G and let f be the number of faces in G. If we remove an edge e, we know that G is still connected. Removing an edge causes the two faces of G to merge into one, so f' = f - 1. By IH, we have that n - k + (f - 1) = 2. Rearranging, we see that n - k - 1 + f = 2, or n - (k + 1) + f = 2.

If G is planar, then G is 6-colorable.

BC: n < 6. If n < 6 for a planar graph, then these vertices can be trivially colored with 6 colors. IH: Assume that P(k) is true for some k >= 0. IS: We want to show that P(k + 1) is true. In other words, we want to show that a planar graph G with k + 1 vertices is 6 colorable. Since G is planar, we know that the minimum degree of G is at most 5. We proved this with the average degree manipulation. Hence, there is a vertex in G with at most degree 5 in G. Let G' = G - {v} where deg(v) <= 5. By IH, G' is six-colorable. We can add v back into G'. Observe that v has at most 5 neighbors, so there is some other color that we can assign to v that is different from the colors of its neighbors. Clearly, G is 6-colorable.

Consider a set A with at n => 1 elements. We color independently each of the elements of A red with probability of 1/3 and blue with probability of 2/3. Let R be the equivalence relation of this partition.

By definition, R includes (a, a) where a \in A. Also, if a \neq b, then (a, b) is in R. Likewise, (b, a) is in R. Let X be the random variable denoting the number of ordered pairs in R. Let X_ij be the random indicator variable that is 1 if (i, j) \in R and is 0 otherwise. By linearity, E(X) = \sum\limits_{ij} E(X_ij). Observe that if i = j, then Pr(X_ij = 1) = 1. If i \neq j, then Pr(X_ij = 1) = Pr(ij both red or ij both blue) = (1/3)^2 + (2/3)^2 = 5/9. Now, there are (n)(n-1) different ways that i \neq j and (n) different ways that i = j. Hence, we break up our summation. E(X) = (5/9) * (n) * (n-1) + (1) * (n)

Given numbers 1 to 9, how many permutations of the numbers do not have at least 7 consecutively increasing numbers?

C_1 is the set of sequences with at least 7 consecutive numbers beginning from the first position in line. C_2 is the set of sequences with at least 7 consecutive numbers beginning from the second position in line. C_3 is the set of sequences with at least 7 consecutive numbers beginning from the third position in line. C_1 \cup C_2 \cup C_3 = ... by Principle of Inclusion-Exclusion. Subtract this from 9! since there are 9! ways to permute 9 numbers.

Prove that G or the complement of G is connected.

Case 1: G is connected. Case 2: G is not connected. In other words, G consists of at least two connected components. We want to show that the complement of G is connected. To do so, we'll consider two arbitrary vertices, u and v, and show there exists a path between them in the complement of G. Case 2.1: u and v do not share an edge in G. Obviously, u and v will share an edge in the complement of G. Case 2.2: u and v share an edge in G. In other words, u and v are part of the same connected component in G. This connected component doesn't exist in the complement of G, so let's consider an arbitrary vertex x in a different connected component in G. Since x is connected to neither u or v in G, it must be that x is connected to both u and v in the complement of G. Hence, there is a path from to u to v that is u, x, v.

Some pairs of ramen bowls x, y are connected by a noodle with one end in x and one end in y. Among any group of four bowls of ramen, there will always be at least one bowl in the group that has a noodle from it to each of the other tree bowls. Prove that among n bowls of ramen, there exists a bowl b such that for every other bowl b', b and b' have a noodle between them.

Consider an arbitrary bowl r. Case 1: r has a noodle between it and every other bowl. We're done. Case 2: There is not a noodle between r and r'. Consider an arbitrary x, y that are not r or r'. We know that between x, y, r, and r', there must be a bowl that shares a noodle with the other three. Since r and r' don't share a bowl, either x or y must share a noodle with all other three bowls. WLOG, let x share a noodle with r, r', and y. Now, we can substitute y with an arbitrary noodle l. We have that l must share a noodle with x. Hence, x has a noodle between it and every other bowl. We're done.

Prove that (A ∪ B) \ C = (A \ C) ∪ (B \ C).

Consider arbitrary element x in (A ∪ B) \ C. Manipulate (A ∪ B) \ C to form (A \ C) ∪ (B \ C). Repeat this process with arbitrary element x in (A \ C) ∪ (B \ C).

Let G be a planar graph with n vertices, m edges, and c connected components. Let f be the number of faces in a crossing-free embedding of G. Prove that n - m + f - c = 1.

Consider the graph G with c connected components. Let us treat each of these connected components as a vertex. We can construct a minimally connected graph G' such that each connected component in G is like a vertex in G'. Since G' is minimally connected, we've added c-1 edges between the c "vertices". G' can be treated like a tree where each vertex is actually a connected component. Since G' is a planar graph, we can apply Euler's formula. By Euler's formula, the following is true: n - (m + (c - 1)) + f = 2. n - (m + c - 1) + f = 2 n - m - c + 1 + f = 2 n - m - c + f = 1 n - m + f - c + 1

Prove that every tree with at least two vertices has at least two leaves and deleting a leaf from an n-vertex tree produces a tree with n-1 vertices.

Consider the maximal path P of a tree. We know that the endpoints of P cannot be extended, so they have degree exactly 1. Hence, a tree has at least 2 leaves. We know that the degree of a leaf is exactly 1. If we remove an arbitrary leave from n-vertex tree, the only vertex that was affected is the vertex adjacent to the leaf. A vertex of degree 1 belongs to no path connecting two vertices other than v. Hence, for any two vertices u, w, every path from u to w in T is also in T'. Hence, T' is connected.

If the minimum degree of G is at least 2, then G contains a cycle.

Consider the maximum path P in G terminating at vertices u and v. We know that the degree of u and v is at least 2, and that all vertices adjacent to u and v must lie along P. Hence, u has a neighbor x \in P via an edge that is not in V. The edge {u, x} completes the cycle with the portion of P from x to u.

Consider a normal chessboard (an 8x8 grid), in which in each row and in each column there are exactly n pieces, where 0 < n ≤ 8. Prove that we can pick 8 pieces such that no two of them are in the same row or column.

Construct a bipartite graph G = (R, C, E). Let R be the set of vertices representing the rows of our chess board and C be the set of vertices representing the columns of our chess board. Let there exist an edge e \in E between r_i \in R and c_j \in C iff there is a piece at position [i][j] on the chess board. We want to show that there is a matching that saturates all vertices in R. To do so, we need to prove that Hall's condition is satisfied. Consider an arbitrary subset in R, say S. We know that each row has n pieces, so there must be exactly n * |S| edges from S to N_G(S). We know that each column has n pieces, so there are at most n * |N_G(S)| edges from N_G(S) to S. We have that n * |S| <= n * |N_G(S)|. Clearly, |S| <= |N_G(S)|.

Let T be a tree where the maximum degree is ∆. Prove that T has at least ∆ leaves.

Contradiction: Assume that ∆ is greater than or equal to 2, since the cases of ∆ = 0 and ∆ = 1 are clearly true. Suppose for the sake of contradiction that there are at most λ(T) < ∆ leaves. For each u_i \in N(v) let P_i be the maximum length path beginning with v, {v, u_i}, u_i. Note that there must be ∆ such paths since deg(v) = ∆. We know that any such path must terminate in a leaf. By PHP, where the pigeons are the terminating leaves of each path and the holes are the λ(T) leaves available, we know that, since λ(T) < ∆, two leaves must share the same maximal path. This is a contradiction since T is acyclic.

Let T be a tree where the maximum degree is ∆. Prove that T has at least ∆ leaves.

Direct: Let v \in V have degree ∆ in T = (V, E). Consider the subgraph induced on the vertices V \ {v}. Each neighbor of v is in a distinct connected component in this graph because T is acyclic. Thus, there are ∆ connected components, each of which is a tree. There are two possibles for each component: Case 1: The tree consists of a single node. Clearly, this node is a leaf adjacent to v \in T. Case 2: The tree consists of at least two nodes. We know that a tree of at least two nodes has at least two leaves. One of these nodes may be adjacent to v \in T, but the other one cannot be. Hence, this component contains at least one leaf in T. T must contain at least ∆ leaves since there are ∆ connected components in T' = T \ {v}.

Law of Total Expectation

E(X) = \sum\limits_{y} E(X | Y = y) * Pr(Y = y)

Conditional Expectation

E(Y | Z = z) = \sum\limits_{y} y * Pr[Y = y |Z = z]

Let G be a planar graph. The sum of the degrees of the faces in a crossing-free embedding of G is 2|E(G)|.

Each edge contributes twice to the sum of the degrees of the faces.

How many even 4-digit numbers have no repeated digits?

For a number to be even, we know it must end in 0, 2, 4, 6, 8. For a number to be four digits, it must be that the first digit is not 0. However, if 0 is the last digit, then this restriction is irrelevant. Let S_0 be the set of digits that end in 0. Let S_n be the set of digits that don't end in 0. S_0: Step 1. Choose the first digit. There are 9 ways to do this. Step 2. Choose the second digit. There are 8 ways to do this. Step 3. Choose the third digit. There are 7 ways to do this. S_n: Step 1. Choose the last digit. There are 4 ways to do this. Step 2. Choose the first digit. There are 8 ways to do this. Step 3. Choose the second digit. There are 8 ways to do this. Step 3. Choose the third digit. There are 7 ways to do this. Add these via the addition rule.

Injective (one-to-one)

For all x_1, x_2 \in A, if x_1 \neq x_2, then f(x_1) \neq f(x_2)

Surjective (onto)

For all y \in B, there exists an x \in A s.t. f(x) = y

Prove that \sum\limits_{k = 0}^m (n choose k) (n - k choose m - k) = 2^m (n choose m) with a combinatorial proof.

Given a party of n people, how many ways are there to sit m people such that any number of those m people are sitting at the "cool" table? RHS: Step 1. Choose the m people to sit out of the n people. There are (n choose m) ways to do this. Step 2. Sit any number of the m people at the "cool" table. There are 2^m ways to do this. LHS: Let S be the set of all the different ways there are to sit m people such that any number of those m people are sitting at the "cool" table. Step 1. Choose the k people to sit at the cool table out of the n people. There are (n choose k) ways to do this. Step 2. Of the remaining n - k people, choose m - k of them to be sat so we have a total of m people sitting. Step 3. Sit the k people at the "cool" table. There is just 1 way to do this.

If G does not contain K_3 as a subgraph, then |E(G)| <= 2|V(G)| - 4.

If G does not contain K_3, then G is triangle free. Hence, the minimum degree of a face is 4. Using similar process, we see that 4(2 - |V(G)| + |E(G)|) <= 2|E(G)|. Rearranging, we see that |E(G)| <= 2|V(G)| - 4.

Prove that a connected graph G is Eulerian iff every vertex in G has even degree.

If G is Eulerian, then every vertex in G has even degree: Let C denote the Eulerian circuit in G. We know that every passage of C through a vertex uses two incident edges and the first edge is paired with the last the first vertex. Hence, every vertex has even degree. If every vertex in G has even degree, then G is Eulerian. BC: m = 0. In this case G has only one vertex and that itself forms . Eulerian circuit. IH: Assume that P(j) is true for all j such that 0 <= j <= k. IS: We want to prove that the property holds when G has n vertices and k + 1 edges. Since G has at least on edge and because G is connected and every vertex of G is even degree, we know that the minimum degree of G is at least 2. We've previously shown that if the minimum degree of G is at least 2, then G has a cycle C. Consider G' = G - {e} for all e \in C. We're removing all the edges in C. We want to apply the induction hypothesis, but how do we know G' is connected? For all vertices in G, we've decreased their degree by 2. Hence, all vertices in G' are still even. This means that G' consists of connected components that are either cycles themselves or lone vertices. We can apply IH on the connected components that are not lone vertices. Hence, these connected components contain Eulerian circuits themselves. Now, if we add all the edges in C back into G', we can see that a Eulerian circuit exists in G if for every time we reach a component of G', then we detour along the Eulerian circuit of that component before returning to our larger Eulerian circuit. Alternate Proof: Let G be a connected graph with all degrees even. Let W be the maximum walk in G. Since W cannot be extended, neighbors of the endpoints of W must be along W. Hence, W is a closed walk. If W is Eulerian, then we are done. If not, then there must be an edge in E(G) - E(W) that is incident on some vertex in W. Let this edge be e = {u, v_i}. Then the walk u, ..., v_0, v_l, ... u, v_i is longer than W. This is a contradiction.

Prove that a connected graph G contains exactly 1 cycle if and only if there are exactly n total edges.

If G is a connected graph with exactly 1 cycle, then there are exactly n total edges. If we remove an arbitrary edge e from G, we create a tree T with n - 1 vertices. We know this because T is minimally connected, so the addition of e creates a cycle. Hence, if we increment the number of edges by 1, we have n - 1 + 1 edges. If there are exactly n total edges, then G is a connected graph with exactly 1 cycle. Assume towards a contradiction that G has no cycle. Since G is connected, G is a tree. G has exactly n-1 edges. This is a contradiction, so G must have at least one cycle. Now, assume that G has more than one cycle. Since G has at least two distinct cycles, there exists an edge e = {u, v} that is contained in one of the cycles but not the other. Let G' = G - {u, v}. Note that G' has exactly n-1 edges on n vertices, so G' must be a tree. Hence, G' is acyclic. However, since {u, v} is contained in only one of the two cycles of G, we couldn't have affected the other cycle when we created G'. That is, G' should still contain one cycle. This is a contradiction.

A connected graph with at least two vertices has an Eulerian walk if and only if has exactly two vertices of odd degree.

If a connected graph with at least two vertices has exactly two vertices of odd degree, then it has a Eulerian walk. Consider a connected graph G with at least two vertices and exactly two vertices of odd degree. We'll call these two vertices u and v. Let us construct G' = G + {w} such that w is a vertex connected only to u and v. Now, G' has vertices all of even degree. We've proved in lecture that a graph with vertices all of even degree is Eulerian. Hence, there is a Eulerian circuit beginning at w and ending at w. Since w is connected via two edges, (w, u) and (w, v), these two edges must either begin or end our circuit. WLOG, consider the circuit w, u, ..., v, w. Clearly, there is a path from u to v through w and a path from u to v through the rest of the vertices. Now, let us remove w to obtain our original graph. There still exists a walk from u to v via the vertices that are not w. Since u and v are distinct vertices of odd degree, G contains a Eulerian walk. If a connected graph with at least two vertices has a Eulerian walk, then it has exactly two vertices of odd degree. Consider a graph G with an Eulerian walk. In other words, there exists a walk traversing every edge in G that begins an ends at two distinct vertices in G. Let u be the start vertex and v be the end vertex. Let us first consider the vertices that are not u and v. We know that the Eulerian walk doesn't begin or end at any of these vertices, so these vertices must have even degree. Two edges are incident on each vertex the walk passes through. Let's now consider u and v. We know that a Eulerian walk must initially leave the start vertex u, so u has a degree of at least 1. Each time the Eulerian walk passes through u, our degree increments by 2. The same can be said for v. Hence, the degree of u and v is equal to 2j + 1 and 2k + 1 for some integers j and k.

Prove that a graph is bipartite if and only if it has no odd cycles.

If a graph is bipartite, then it has no odd cycles: Assume towards contradiction that G = (U, V, E) contains an odd cycle C. Let C = x_1, x_2, x_3, ..., x_{2k+1}. We know that U and V are independent sets, so the only edges exist between two vertices in U and V. Hence, our cycle alternates between vertices in U and V. WLOG, let x_1 \in U. Clearly, x_1 \in U implies x_2 \in V implies x_3 \in U, and so on. Notice that x_i is in U if i is odd and x_i is in V if i is even. We see that x_{2k+1} is in U. Since this is a cycle, we know that x_1 and x_{2k+1} share an edge, but this isn't possible given the definition of an independent set. Hence, a bipartite graph has no odd cycles. If a graph has no odd cycles, then it is bipartite. Solution: Let P(m) be the claim that a graph with m edges and no odd cycles is bipartite. BC: m = 0. A graph with 0 edges is bipartite. We can color any two vertices with two colors since there are no adjacent vertices. IH: Assume that P(k) is true for some k >= 0. IS: WTS that a graph with k + 1 edges and no odd cycles is bipartite. Consider a graph G with k + 1 edges and no odd cycles. Case 1: G is acyclic. We have a forest. Let us select an arbitrary edge e = {x, y} where x is a leaf. Let G' = G - {e}. Note that G' is also a forest, so by IH, we have that G' is bipartite. Let G' = (U', V', E'). Let us now add e back into G. Since x is connected only to y, we can add x to either U' or V', depending on which independent set contains y. Case 2: G has at least one even cycle. Consider an arbitrary edge e = {x, y} that belongs to a cycle C. Let G' = G - {e}. Note that G' has no odd cycles, so by IH, G' is bipartite. Let G' = (U', V', E'). Note that when we removed e from C, we created an odd length path P from x to y in G'. Therefore, it must be that x and y are in different independent sets in G'. WLOG, let x \in U' and y \in V'. Therefore, we can simply let U = U' and V = V'.

Prove that a matching M in G is maximum iff G contains no M-augmenting path.

If a matching M in G is maximum, then G contains no M-augmenting path. Or, if G contains an M-augmenting path, then M is not maximum. Let our M-augmenting path be v_0, v_1, v_2, ..., v_{2m + 1}. We know that an M-augmenting path must be a path of odd length. Let M' = M \ { (v_1, v_2), (v_3, v_4), ..., (v_{2m - 1}, v_2m)} \cup {(v_0, v_1), (v_2, v_3), ..., (v_2m, v_{2m + 1}). Clearly, M' is a matching in G where |M'| = |M| + 1. Thus, M is not a maximum matching. If G contains no M-augmenting path, then M is maximum. Prove via contrapositive: If M is not maximum, then G contains an M-augmenting path. We assume that M is not maximum. Let M' be the maximum matching where |M'| > |M|. Let H be the symmetric difference of G(M') and G(M). In other words, H consists of all the vertices in G, but not the edges in both M' and M. We know that every vertex in H has a degree of either 1 or 2, since it can be incident with at most one edge of M and one edge of M', Thus, each connected component of H is either an even cycle or a path with edges alternating in M' and M. Since |M'| > |M|, H contains more edges from M' than M. Since even cycles have equal edges from M' and M, there must be a path P that starts and ends with edges from M'. These vertices are M'-saturated in H, so they must be M-unsaturated in G. Thus, P is an M-augmenting path in G.

Let G = (A, B, E) be a bipartite graph such that |A| = |B|. Prove that G has a perfect matching if and only if for all subsets X \subset (A \cup B), the inequality |X| <= |N(X)| holds.

If for all X \subset (A \cup B), the inequality |X| <= |N(X)| holds, then G has a perfect matching. Let G be a graph that satisfies the LHS. Since A \subset (A \cup B), and for all X \subset (A \cup B), |X| <= |N(X)|, then for all X \subset A, |X| <= |N(X)|. By Hall's Theorem, G has a matching, say M, that saturates every vertex in A. Since |A| = |B|, this is a perfect matching. If G has a perfect matching, then for all X \subset (A \cup B), the inequality |X| <= |N(X)| holds. Let M be the perfect matching in G. By definition, M saturates all the vertices in A and B. Now, let's consider and arbitrary but particular subset of A \cup B, say S. We know that each vertex in S is matched by M to a distinct vertex in the N(S). For this to be possible, |S| <= |N(S)|. Since S is arbitrary, this is true for all subsets of A \cup b.

Combinatorial Proofs

If there is a summation, then we know to partition. If there is an n choose k, then we know we've found the number of subsets of size k from n elements. If there is an (n - k) choose r. Then we're calculating the number of subsets of the remaining people. If there is a 2^n, then this is all the possible subsets of n people.

I have 10 bars of soap and 10 rolls of toilet paper to distribute to 6 rooms. I can't tell the difference between any 2 bars of soap or any 2 rolls of toilet paper. How many ways can I distribute the toilet paper rolls and soap bars to the different rooms?

If we treat the rooms as categories, then we know this is a stars and bars question. We have (6 - 1) bars. Now, we need to break this problem up into 2 stars and bars problems since the rolls of toilet paper and soap bars are distinguishable. We have (6 - 1) + 10 choose (6 - 1) ways to distribute the rolls of toilet paper. We have (6 - 1) + 10 choose (6 - 1) ways to distribute the soap bars. If we treat this problem in steps, our first step is to distribute the rolls of toilet paper and our second step is to distribute the soap bars. By the multiplication rule, there are 15 choose 5 times 15 choose 5 ways to do this.

Prove that a graph with maximum degree at most k is (k + 1)-colorable.

Induction on n BC: P(1) is clearly true as a graph with just one vertex has maximum degree 0 and can be colored using one color. IH: Assume that P(h) is true for some h >= 1. IS: We want to show that P(h + 1) is true. In other words, we want to show that a graph with maximum degree at most k and h + 1 vertices is (k + 1)-colorable. Consider a graph G that has such qualities. We know that there exists a vertex u in G that has maximum degree k. Let G' = G - {u}. By IH, G' is (k + 1)-colorable. Let's add u back into G'. Observe that u has at most k neighbors. Clearly, we can use one of the k + 1 colors to color u such that u is not the same color as any of its neighbors. P(h + 1) is true.

Trees

Internal vertex have degree at least 2. Leaves have degree exactly 1.

We want to split vertices up into k disjoint pairs. If the degree of each vertex in G is at least 2k, prove that it is possible to separate the vertices into k disjoint pairs.

Lemma: If we have a matching of size k, then we have a matching incident on 2k vertices. Hence, there are k disjoint pairs. We want to show that if the minimum degree of G is at least 2k, then there exists a matching of size k. Consider a maximal path P in G. Since the endpoints of P, say x and y, cannot be extends, all of the neighbors of x and y are along P. We know that the degree of x is at least 2k, so P consists of at least 2k + 1 vertices. 2k + 1 > 2k, so there exists a matching M that creates k disjoint pairs.

How many numbers from 100 to 999 are multiple of 3 or 5?

Let A be the set of numbers that are multiples of 3. Let B be the set of numbers that are multiples of 5. We're looking for |A \cup B|. By Principal of Inclusion-Exclusion, |A \cup B| = |A| + |B| - |A \cap B|. The first number that is multiple of 3 is 102 and the last number that is a multiple of 3 is 999. 102 / 3 = 34 and 999 / 3 = 333. There are 333 - 34 + 1 numbers in A. The first number that is multiple of 5 is 100 and the last number that is a multiple of 5 is 995. 100 / 5 = 20 and 995 / 5 = 199. There are 199 - 20 + 1 numbers in B. The first number that is a multiple of 15 is 105. The last number that is a multiple of 15 is 990. There are 990 - 105 + 1 numbers in A \cap B.

The size of the maximum independent set in G is equal to the size of the maximum clique in the complement G.

Let C be a maximum clique in G. By definition, for any two vertices, say u, v \in C, edge uv \in G. Now, we know that C is an independent set in the complement of G.

If G is a planar graph with at least two edges, then |E(G)| <= 3|V(G)| - 6.

Let G be a connected planar graph. By Euler's formula, f = 2 - |V(G)| + |E(G)|. We know that the sum of the degrees of the faces is at least 2|E(G)|. For a face to exist, the minimum degree is 3. Hence, 3f <= 2|E(G)|. We have that 3(2 - |V(G)| + |E(G)| = 2|E(G)|. Rearranging, we see that |E(G)| <= 3|V(G)| - 6.

A vertex cover of graph G is a set of vertices, S, such that every edge in G is incident to at least one vertex in S. Find a relationship between the size of a maximum matching the size of the minimum vertex cover of a graph G.

Let M be the maximum matching of G. By definition, M saturates every vertex in G. For every edge e \in M, there exists an endpoint of e that is in S by definition of a vertex cover. Hence, the vertex cover must have at least as many vertices as edges in M. |S| >= |M|.

A PIN is typically made of four symbols chosen fro 26 letters of the alphabet and the 10 digits, with repetitions allowed. How many PINS contain repeated symbols?

Let S denote the sell of all possible PINs. Let S_n denote the set of all possible PINs without repeated symbols. Let S_r denote the set of all possible pins with repeated symbols. S_n and S_r are disjoint, so |S| = |S_n| + |S_r|.

How many strings are there of four lower-case letters that have the letter x in them?

Let S denote the set of all possible strings of four lower-case letters. Let S_n denote the set of all possible strings of four lower-case letters excluding x. Let S_x denote the set of all possible strings of four lower-case letters with at least 1 x.

In how many ways can we select two books from different subjects among five distinct computer science books, three distinct math books, and two distinct art books?

Let S_1 be the set of ways we can select two books between computer science and math. Let S_2 be the set of ways we can select two books between math and art. Let S_3 be the set of ways we can select two books between computer science and art.

In any graph, there are an even number of vertices of odd degree.

Let S_e be the set of vertices with even degree. Let S_o be the set of vertices with odd degree. We know that the summation of the degree of all vertices is even. We have that 2j = 2k + a. Hence, a = 2(j - k). a must be even. Thus, |S_o| is even.

If k is a positive integer and T is a full binary tree with k internal vertices, then T has a total of 2k + 1 vertices and has k + 1 leaves.

Let S_w be the set of vertices in T without a parent. Let S_n be the set of vertices in T with a parent. We know that S_w consists solely of the root of the tree, so |S_w| = 1. Now, every internal vertex of a full binary tree has exactly 2 children, so total number of children of all internal vertices equals 2k. This is also the number of vertices that have a parent. We see that |S| = |S_o| + |S_w| = 2k + 1. We have that the total number of vertices in T is 2k + 1. We know that the total number of vertices in T is the sum of number of internal vertices in T and the number of leaves in T. Hence, the number of leaves in T is 2k + 1 - k = k + 1.

The expected number of hours that each student sleeps every night is 6. Using Markov's inequality, provide a lower-bound on the probability that Andrew sleeps less than 8 hours per night.

Let X be the random variable denoting the number of hours Andrew sleeps during the night. We're looking to calculate the expression: c <= Pr(X < 8). Markov's inequality gives us an upper-bound, so we must do some manipulation. We know that the Pr(X < 8) = 1 - Pr(X => 8) Pr(X => 8) <= 3/4 1 + Pr(X => 8) <= 1 + 3/4 1 - 3/4 <= 1 - Pr(X => 8) 1/4 <= Pr(X > 8)

A chess master who has 11 weeks to prepare for a tournament decides to play at least one game every day, but in order to not tire himself, he decides not to play more than 12 games during any calendar week. Show that there exists consecutive days during which the chess master will have played exactly 21 games.

Let a_i, 1 <= i <= 77, be the total number of games the chess master has played during the the first i days. This sequence is strictly increasing. 1 <= a_1 < a_2 < a_3 < ... < a_77 <= 132. Now, consider the sequence 22 <= a_1 + 21 < a_2 + 21 < a_3 + 21 < ... < a_77 + 21 <= 153. There are 154 numbers in all. However, these numbers are all between 1 and 153. By PHP, there exists two numbers such that a_i = a_j + 21. Hence, from a_{j + 1}, a_{j + 2}, a_{j + 3}, ..., a_i, the chess master has played exactly 21 games.

There are n concession stands at the concert. There are m wires that provide power to the stands; each wire connects exactly two stands, and there's at most one wire between two stands. Prove that n <= n^2 - 2m.

Let n be the number of vertices in G and m be the number of edges in G. We know that the maximum number of edges in G is n choose 2. Hence, m <= n choose 2. m <= (n^2 - n)/2, 2m <= n^2 - n, n <= n^2 - 2m.

Let T be a tree where the maximum degree is ∆. Prove that T has at least ∆ leaves.

Let v \in V have degree ∆. For each u_i, u_j \in N(v), let P_{ij} be a maximal path including u_i, v, u_j. Note that there must be at least ∆ choose 2 such paths, since any pair of edges adjacent to v gives a different path. We know that each maximal path must terminate in two leaves. Each pair of leaves admits one maximal path. Now, if there were less λ(T) < ∆ leaves, we would only have λ(T) choose 2 < ∆ choose 2 distinct maximal paths. This is a contradiction, so we must have that λ(T) is greater than or equal to ∆.

Let N be the number of digits missing from the 10 digit number, where the digits belong to S = {1, 2, 3, 4, 5, 6, 7, 8, 9}. Find E[N] and Var[N].

N = \sum\limits_{i = 1}^9 N_i, where N_i is the indicator random variable that is 1 if the ith digit is missing from the 10 digit number and is 0 otherwise. By linearity, E[X] = 9 * (8/9)^10. Var(N) = E(N^2) - E(N)^2 Var(N) = E( (N_1 + N_2 + ... + N_9)^2) - (9 * (8/9)^10)^2 When you expand the square root of 9 terms, you get 9^2 terms. 9 of these terms are of the form N_iN_i, whereas 72 of these terms are of the form N_iN_j. These random indicator variables are not independent, so we need to formally calculate them. Var(N) = 72(7/9)^10 + 9(8/9)^10 - 81(8/9)^20

G is connected and has exactly n-1 edges implies G is minimally connected, i.e., G is connected but G - {e} is disconnected for every edge e \in G.

Note that G - {e} has n vertices and n-2 edges. We know any graph has at least n - m connected components. Hence, G has at least n - (n - 2) = 2 connected components.

A three-tree is a tree such that all vertices have either degree 1 or 3. If a three-tree T has l leaves, show that it has l-2 vertices of degree 3.

Note that we have a total of l + t leaves in T. Since T is a tree, we have a total of l + t - 1 edges. By Handshaking Lemma, the sum of the degrees of all the vertices in T is equal to 2(l + t - 1). We can break our summation up into the summation of all vertices with degree 1 and the summation of all vertices with degree 3. Hence, 2l + 2t - 2 = l + 3t. Rearranging, we see that t = l - 2, where t is the number of vertices with degree 3.

What is the number of non-decreasing sequences of length 10 whose terms are take from 1 through 25?

Observe that given 10 numbers, we can always order them in a non-decreasing sequence. The procedure for constructing a sequence is as follows: Step 1. Choose 10 numbers with repetition allowed. Are there 25 choose 10 ways to do this? No, because two sequences with the same digits but different ordering are not the same. Hence, we can think of the 25 digits as categories. How many ways can we assign 10 numbers to 25 categories? There are (25 - 1) + 10 choose (25 - 1) ways to do this. Step 2. Order these numbers in non-decreasing order. There is 1 way to do this. The total number of ways that this can be done is given by 34 choose 10.

Let T be a tree where the maximum degree is ∆. Prove that T has at least ∆ leaves.

Partition the set of vertices V into three sets: V_i, V_o, and V_m. Let V_i be the set of all leaves. Let V_o be the set of all vertices such that 1 < deg(v) \in V_o < ∆. Let V_m be the set of all vertices with maximum degree ∆. We know that the sum of all of the degrees of all vertices in V is 2n - 2 by Handshaking Lemma. We set this equal to the sum of the degrees of all the vertices broken up into partitions. We know that the degree of any vertex in V_o is at least 2, so we can lower bound 2n - 2. To get rid of a third variable, we use the equation n = |V_i| + |V_o| + |V_m|. We know that there is at least one vertex with maximum degree, so we can further lower bound 2n - 2. Substituting in and solving for |V_i|, we see that |V_i| is greater than or equal to ∆. Hence, the number of leaves in V is greater than or equal to ∆.

How many 5 letter sequences can be made from the letters in the word "PIAZZA"?

Permutations of multi-set problem. S_P is the set of all letter sequences where 1 "P" is left out. S_I is the set of all letter sequences where 1 "I" is left out. S_A is the set of all letter sequences where 1 "A" is left out. S_Z is the set of all letter sequences where 1 "Z" is left out. Use the (n! / n_P! n_I! n_A! n_Z!) for each case. By addition rule, the number of 5 letter sequences is the sum. There are 180 sequences of letters.

Multiplication Rule for Probability

Pr[A ∩ B] = Pr[A] * Pr[B | A] Pr[A ∩ B] = Pr[B] * Pr[A | B]

Law of Total Probability

Pr[E] = Pr[E ∩ F] + Pr[E ∩ F]

G is a tree implies G is connected and has exactly n-1 edges.

Proof via induction. Consider a graph G with k+1 vertices. We we want to show that G has k edges. Remove a leaf from G to form G'. G' is still connected and acyclic, so by IH, G' has k - 1 edges. Since we removed a leaf, the addition of a leaf increases the number of edges by 1. G has k edges.

A binary tree of height at most h has at most 2^h leaves.

Prove this via induction on h. IH: Assume that P(k) is true for some k >= 0. BC: P(0) is clearly true. With height 0, this is just a single vertex. Clearly, 2^0 = 1. Our root is a single leaf. IS: We want to prove that P(k + 1) is true. In other words, we want to show that a binary tree of height at most k + 1 has at most 2^{k + 1} leaves. Consider a graph G with height k + 1. Observe that the root has at most 2 children. Each subtree rooted at a child of the root is a rooted binary tree of height at most k. By induction hypothesis, the number of leaves in these subtrees is at most 2^k. The total number of leaves is at most 2 * 2^k = 2^{k + 1}.

Every graph with n vertices and m edges has at least n - m connected components.

Prove via induction on m. By IH, G' has n - k at least n - k connected components. Case 1: u and v belong to the same connected component. Clearly, the addition of e doesn't change the number of connected components. We have that n - k > n - (k + 1) Case 2: u and v belong to different connected components. Clearly, the addition of e decreases the number of connected components by 1. We have that n - k - 1 is at least n - (k + 1)

If ab is irrational, then a, or b, or both must be irrational

Prove via the contrapositive: If a and b are rational, then ab is rational. Take the definition of rational numbers and multiply together. Observe that ab is clearly rational.

Let R and S be equivalence relations on the set A.

R \cup S is not always an equivalence relation. R \cap S is always an equivalence relation.

Composition

R is a relation from A to B. S is a relation from B to C. Then S of R = {(x, z) | y \in B s.t. (x, y) \in R and (y, z) \in S}. For example, if (a, b) \in R^{n + 1}, then R^{n+1} = R^n of R. This means that (a, x) \in R and (x, b) \in R^n.

Any two vertices of G are linked by a unique path in G implies G is a tree.

Since there is a path between any two vertices in G, G must be connected. Now we want to show that G is acyclic. Assume that G is cyclic. Then, any two vertices on the cycle can reach each other by two disjoint, simple paths that consist of edges of the cycle. Hence, there exists a pair of vertices of G not linked by a unique path in G. This is the contrapositive.

Prove that if a graph has an Eulerian circuit, its edges can be partitioned into a set of disjoint simple cycles.

Solution: Strong induction on m. BC: m = 3. The minimum number of edges for a Eulerian circuit to exist. This is a cycle graph of 3 vertices. Our partition of edges would just have one set. IH: Assume the claim holds for 3 <= j <= k, where j,k \in N. That is, assume that for a graph with j edges, if that graph has an Eulerian circuit, then its edges can be partitioned into a set of disjoint, simple cycles. IS: Consider an arbitrary graph with k + 1 edges that contains an Eulerian circuit C. C = v_1, v_2, v_3, ..., v_m. We know that a minimum, v_1 = v_m since this is a closed walk. Consider a pair of vertices in this circuit, v_i and v_j such that i < j and v_i = v_j. More specifically, the distance between these vertices should be minimized. Since v_i = v_j, we know that we can follow the circuit from v_i back to v_i. Since j - i is minimized, there exists no smaller circuit within this circuit. Hence, this circuit is a simple cycle. Let S be the set containing the edges in this cycle. Consider the graph G' = E(G) - S. We want to apply IH, but how do we know G' has an Eulerian circuit? Since we've removed only the edges in a cycle, the degrees of the vertices in the cycle decreased by 2. Thus, all the vertices in G' still have an even degree. We've shown in lecture that G' must contain a Eulerian circuit. Note that G' consists of either lone vertices or connected components containing an Eulerian circuit. By IH, each connected component with a Eulerian circuit can be partitioned into a set of disjoint, simple cycles. Between each of these connected components there are no shared edges, so we know our partitions are disjoint. Merging these partitions with S, we find that we have partitioned G into a set of disjoint, simple cycle.s

There are 100 people, and you want to divide them into 10 teams of 10 people each. How many possible ways are there to make the teams?

Step 1. Choose 10 people to be in Team 1. There are 100 choose 10 ways to do this. Step 2. Choose 10 people to be in Team 2. There are 90 choose 10 ways to do this. Repeat this process. Step 11. Remove the ordering of the teams that is inherently created by this process. There are 10 teams to permute, so we divide by 10!

There are 15 students enrolled in a course, but exactly 12 students attend on any given day. The classroom for the course has 25 distinct seats. How many different classroom seatings are possible?

Step 1. Choose the 12 students to attend. There are 15 choose 12 ways to do this. Step 2. Arrange the 12 students in the 25 seats. There are P(25, 12) ways to do this.

From a group of 8 women and 6 men, how many different committees consisting of 3 women and 2 men can be formed? What if 2 of the men are feuding and refuse to serve on the committee together?

Step 1. Choose the 3 women. There are 8 choose 3 ways to do this. Step 2. Choose the 2 men. There are 6 choose 2 ways to do this. Let S_n be the set of committees such that neither of the feuding men are included. Let S_o be the set of committees such that only one of the feuding men are included. S_n: Step 1. Choose the 3 women. There are 8 choose 3 ways do to his. Step 2. Choose 2 men that are not feuding. There are 4 choose 2 ways to do this. S_o: Step 1. Choose the 3 women. There are 8 choose 3 ways to do this. Step 2. Choose 1 of the feuding men to include. There are 2 choose 1 ways to do this. Step 3. Choose the other 2 men to include. There are 4 choose 1 ways to do this. Add these together via the addition rule.

How many ways can we order 26 letters of the alphabet so that no two of the vowels a, e, i, o, u occur consecutively?

Step 1. Order the 21 consonants. There are 21! ways to do this. Step 2. Insert vowels in between consonants or on the outside. There are P(22, 5) ways to do this.

Let S be a set of 16 distinct positive integers such that ∀x ∈ S, x < 60. Show that there exist distinct integers a, b, c, d ∈ S such that a + b = c + d.

There are 16 choose 2 pairs of integers in our sequence. Note that each pair has a sum associated with it. Since all elements of S are between 1 and 59 inclusive, the sum of any pair of distinct elements will be between 3 and 117 inclusive. There must be 115 distinct sums. By PHP, the ceiling of 120 divided by 115 is 2. Hence, there exists 2 distinct pairings that map to the same sum.

There are 15 customers and 4 distinct cashiers. How many different ways can these customers get into line?

There are 4 distinct categories. We can think of putting these 15 customers into 4 bins. There are (4 - 1) + 15 choose (4 - 1) ways to do this. Likewise, there are (4 - 1) + 15 choose 15 ways to do this.

Prove that in any graph with m edges, there are an even number of vertices of odd degree.

This is proved via weak induction. We take three cases after removing an arbitrary edge between vertices u and v in G. Case 1: u and v both have odd degree in G'. Case 2: u and v both have even degree in G'. Case 3: Exactly one of u and v have odd degree in G'.

There are n >= 2 people in attendance. Each of these people are friends with at least n/2 of the other concert attendees. Katie hears that the next act is starting soon, and tells all her friends, who in turn tell all their friend, and so on. Prove that all n people eventually get Katie's message.

To show that all n people eventually get Katie's message, we just have to prove that G is connected. Assume towards a contradiction that G is not connected. In that case, G must consist of at least two connected components, say C_1 and C_2. Now, consider an arbitrary vertex v \in C_1. We know that deg(v) is at least n/2, so there are at least n/2 + 1 vertices in C_1. This same logic can be applied to C_2. Hence, G consists of at least n + 2 vertices. This is a clear contradiction.

Consider 3 books: a computer science book, a math book, and a history book. Suppose the library has at least 6 copies of each of these books. How many ways are there to select 6 books?

Treat each of the books as categories. How many ways can we assign 6 books to three categories? (3 - 1) + 6 choose (3 - 1), or 8 choose 2, or 8 choose 6.

G is minimally connected, i.e., G is connected but G - {e} is disconnected for every edge e \in G implies G contains no cycle but G + {x, y} does, for any two-non adjacent vertices x,y \in G.

We are assuming that removing any edge in G disconnects G. If G contains a cycle then removing any edge, say {u, v}, that is part of the cycle does not disconnect G. Since G is connected there is a path from x to y in G. Let G' = G + {x, y}. G' consists of a cycle formed by the edge {x, y} and the path from x to y in G.

Every connected graph G = (V, E) contains a spanning tree.

We can construct a spanning tree T by removing edges in G until removing an edge in T disconnects T.

If an outer-planar graph G contains n >= 2 vertices and m edges, then m <= 2n - 3.

We know that G = (V, E) has a crossing-free embedding with an unbounded face. Let G' = (V \cup {u}, E), where u is an arbitrary vertex drawn anywhere in the region of the unbounded space. Since G has a crossing-free embedding, G' also has a crossing free-embedding since we haven't added any edges to G to create G'. Now, let us add n edges to G' from each vertex in G. We know that G' has a crossing-free embedding if we draw each pair of edges wider than the previous pair. Now, since G' is a planar graph with n + 1 vertices and .n + m edges, we can apply the inequality formula. Hence, m + n <= 3(n + 1) - 6. m + n <= 3n - 3. m <= 2n - 3.

Prove that every planar graph is a union of two bipartite spanning subgraphs.

We know that G is four-colorable. Let V_1, V_2, V_3, and V_4 partition G based on four colors. Let H_1 = (V_1 \cup V_2, V_3 \cup V_4, E') and H_2 = (V_1 \cup V_3, V_2 \cup V_4). Let V_h be the vertex set of H_1 \cup H_2 and E_h be the edge set of H_1 \cup H_2. Let V_g be the vertex set of G and E_g be the edge of G. We want to show that V_h = V_g and E_h = E_g. Since H_1 and H_2 are subgraphs of G, it is clearly true that V_h \subset V_g and E_h \subset V_g. Furthermore, since V_1, V_2, V_3, and V_4 partition G, we know that V_g \subset V_h. Now we must show that E_g \subset E_h. Consider an arbitrary edge in G. We know it must cross between two of V_1, V_2, V_3, V_4. It can't be within the same partition since these partitions are based on color and adjacent vertices must have different colors. Upon inspection, one observes that any pair of partitions V_i, V_j such that i \neq j is included in different sides of at least one of the two bipartite graphs H_1 and H_2. Hence, e must be included in at least one of H_1 or H_2. It follows that E_g \subset E_h.

Consider a set of twenty-five points, no three of which are collinear. How many straight lines do they determine? How many triangles do they determine?

We know that a line is formed between any two pair of points. Hence, there are 25 choose 2 lines. We know that a triangle is formed between any three points. Hence, there are 25 choose 3 triangles.

If G is a planar graph with minimum degree S, then S <= 5.

We know that the minimum degree of S is at most the average degree. We know that the average degree of G is the sum of all the degrees of vertices divided by the number of vertices. By Handshaking Lemma, we know that the average degree is equal to 2|E(G)| divided by |V(G)|. We know that |E(G)| is no more than 3|V(G)| - 6. Hence, the average degree is no more than 6|V(G)| - 12 divided by |V(G)|. We see that the average degree is no more than 6 - (12 / |V(G)|). Since |V(G)| is non-zero, our average degree is at most 5. Hence, our minimum degree is at most 5.

Prove that there will never be a point in Marn Yee's game where there are exactly two bowls in the row, where the left one is regular and the right one is spicy. We start with the left one is spicy and the right one is regular.

We want to prove that if we start with SR, then we can never be RS. Let r_o be the number of regular bowls at odd positions. Let r_e be the number of regular bowls at even positions. We're looking to find a state where r_o = 1, r_e = 0. In other words, r_e - r_o = -1. We claim that after any number of turns, r_e - r_o = 1. BC: After n = 0 moves, there is one regular bowl at an even position and zero regular bowls at an odd position. Hence, r_e - r_o = 1. IH: Assume that P(k) is true for k >= 0. IS: We wish to show that P(k + 1) holds. That is, all sequences of the first k + 1 moves result in r_e - r_o = 1. Consider an arbitrary arrangement after k + 1 moves. By IH, r_e - r_o = 1 after the first k moves. Now, consider the k + 1 move. We will either have removed or added two consecutive bowls of the same flavor. If we add two regular bowls, then we've added a regular bowl at an even position and a regular bowl at an odd position. This has no effect on r_e - r_o, so P(k + 1) still holds. Now, let's consider the bowls that we did not directly interact with. Positions to the left of the bowls we interact with will not change. All bowls to the right of the bowls added/removed shift their index by plus-minus 2. Since all the indices changed by an even number, they maintain their parity and r_e and r_o are unchanged.


Related study sets

Chapters 66, 69, 70 - Hinkle & Cheever: Brunner & Suddarth's and Chapter 49 - Maternal & Child Health Nursing

View Set

Chapter 6: An Introduction to Viruses, Viroids, and Prions

View Set

Point of View by E Reading Worksheets

View Set