-
Write the negation of the statement “every connected graph with \(n\) vertices has at least \(n\) edges or is a tree”, decide which of the statement and its negation is true, and justify your answer from results in the text.
Solution
Write \(C(G)\) for “\(G\) is connected”, \(E(G)\) for “\(G\) has at least \(n\) edges”, where \(n\) is its number of vertices, and \(T(G)\) for “\(G\) is a tree”. The statement is \(\forall G\,\bigl(C(G)\to(E(G)\lor T(G))\bigr)\) . By Theorem 1.8, Theorem 1.4(e), and De Morgan’s law, its negation is
\[ \exists G\,\bigl(C(G)\land\neg E(G)\land\neg T(G)\bigr): \]there is a connected graph with \(n\) vertices that has fewer than \(n\) edges and is not a tree.
The original statement is true. Let \(G\) be connected with \(n\) vertices. By Theorem 6.8 it has at least \(n-1\) edges. If it has at least \(n\) , the first alternative holds. Otherwise it has exactly \(n-1\) edges, and a connected graph with \(n-1\) edges is a tree by Theorem 6.14(b). So the negation is false.
-
Prove that \(\sqrt6\) is irrational.
Hint
Suppose \(a^{2}=6b^{2}\) with \(a\) , \(b\) positive, and compare the exponent of the prime \(2\) on the two sides, as in Exercise 4.10: it is even on the left and odd on the right.
-
Let \(f:A\to B\) and \(g:B\to A\) satisfy \(g\circ f=\mathrm{id}_A\) . Prove that \(f\) is injective and \(g\) is surjective. Then prove that if \(A\) and \(B\) are finite sets of the same size, both \(f\) and \(g\) are bijections and each is the inverse of the other.
Solution
Injective. If \(f(a_1)=f(a_2)\) , apply \(g\) : \(a_1=g(f(a_1))=g(f(a_2))=a_2\) . Surjective. For \(a\in A\) , the element \(b=f(a)\) satisfies \(g(b)=a\) . These are parts (c) and (d) of Theorem 2.8 applied to the composition \(g\circ f=\mathrm{id}_A\) , which is both injective and surjective.
Now let \(A\) and \(B\) be finite with the same number of elements. By Corollary 5.12 the injective function \(f:A\to B\) is also surjective, hence bijective, and the surjective function \(g:B\to A\) is also injective, hence bijective. By Theorem 2.9, \(f\) has an inverse \(f^{-1}\) . Composing \(g\circ f=\mathrm{id}_A\) on the right with \(f^{-1}\) gives \(g=f^{-1}\) . So \(g\) is the inverse of \(f\) , and then \(f\) is the inverse of \(g\) . Without finiteness the conclusion fails: on \(\mathbb N\) , take \(f(n)=n+1\) and \(g(n)=n-1\) for \(n\ge 1\) , \(g(0)=0\) .
-
Define a relation on \(\mathbb Z\) by \(a\sim b\) if \(a^{2}\equiv b^{2}\pmod 7\) . Show that it is an equivalence relation, find the number of classes, and describe each class by remainders modulo \(7\) .
Answer
It is the relation “same value of the function \(a\mapsto a^{2}\bmod 7\) ”, an equivalence relation by Exercise 2.14. The squares modulo \(7\) of \(0,1,\dots,6\) are \(0,1,4,2,2,4,1\) , so there are four classes: integers with remainder \(0\) ; with remainder \(1\) or \(6\) ; with remainder \(2\) or \(5\) ; with remainder \(3\) or \(4\) .
-
Prove that \(\sum_{i=1}^{n}i\cdot i!=(n+1)!-1\) for every integer \(n\ge 1\) .
Solution
Let \(P(n)\) be the statement \(\sum_{i=1}^{n}i\cdot i!=(n+1)!-1\) .
Base case: for \(n=1\) the left side is \(1\cdot 1!=1\) and the right side is \(2!-1=1\) .
Inductive step: let \(k\ge 1\) and assume \(P(k)\) . Then
\[ \sum_{i=1}^{k+1}i\cdot i!=\bigl((k+1)!-1\bigr)+(k+1)\cdot(k+1)!=(k+1)!\,\bigl(1+(k+1)\bigr)-1=(k+2)!-1, \]where the first equality uses the induction hypothesis. This is \(P(k+1)\) .
By induction \(P(n)\) holds for all \(n\ge 1\) . The identity can also be seen without induction: \(i\cdot i!=(i+1)!-i!\) , and the sum telescopes.
-
Find \(\gcd(391,299)\) and integers \(x\) , \(y\) with \(391x+299y=\gcd(391,299)\) . Then find all solutions of \(299x\equiv 46\pmod{391}\) and say how many residue classes modulo \(391\) they form.
Solution
Euclid’s algorithm: \(391=1\cdot 299+92\) , \(299=3\cdot 92+23\) , \(92=4\cdot 23+0\) . So \(\gcd(391,299)=23\) . Back-substituting,
\[ 23=299-3\cdot 92=299-3(391-299)=4\cdot 299-3\cdot 391, \]so \(x=-3\) , \(y=4\) .
For the congruence \(299x\equiv 46\pmod{391}\) : \(d=\gcd(299,391)=23\) and \(23\mid 46\) , so by Theorem 4.16 there are solutions, forming \(23\) residue classes modulo \(391\) . Dividing by \(23\) gives \(13x\equiv 2\pmod{17}\) . The inverse of \(13\) modulo \(17\) is \(4\) , since \(13\cdot 4=52=3\cdot 17+1\) . Hence \(x\equiv 8\pmod{17}\) . The solutions are \(x\equiv 8,25,42,\dots\) , that is, \(x\equiv 8+17k\pmod{391}\) for \(k=0,1,\dots,22\) . Check: \(299\cdot 8=2392=6\cdot 391+46\) .
-
Find the last two digits of \(7^{2026}\) .
Answer
\(7^{4}=2401\equiv 1\pmod{100}\) and \(2026=4\cdot 506+2\) , so \(7^{2026}\equiv 7^{2}=49\) . The last two digits are \(49\) .
-
Six tasks are to be assigned to three workers. Count the assignments if (a) the tasks are different and every worker gets at least one; (b) the tasks are different and every worker gets exactly two; (c) the tasks are identical and every worker gets at least one.
Answer
(a) Surjections from a \(6\) -set to a \(3\) -set: \(3^{6}-3\cdot 2^{6}+3=729-192+3=540\) . (b) \(\frac{6!}{2!\,2!\,2!}=90\) . (c) Positive solutions of \(x_1+x_2+x_3=6\) : \(\binom 52=10\) .
-
Seven points are chosen inside or on a regular hexagon of side \(1\) . Prove that two of them are at distance at most \(1\) from each other.
Hint
Join the centre of the hexagon to its six corners, cutting it into six equilateral triangles of side \(1\) . Seven points and six triangles: two points lie in the same triangle, counting its boundary, and two points of an equilateral triangle of side \(1\) are at distance at most \(1\) .
-
A tree has \(20\) vertices, each of degree \(1\) or \(4\) . How many leaves does it have?
Answer
Let there be \(\ell\) leaves and \(k\) vertices of degree \(4\) . Then \(\ell+k=20\) and, by the handshake lemma with \(19\) edges, \(\ell+4k=38\) . So \(k=6\) and \(\ell=14\) .
-
Let \(G\) be the graph with vertex set \(\{0,1,\dots,6\}\) in which \(i\) and \(j\) are adjacent when \(i-j\) is congruent to \(1\) , \(2\) , \(5\) , or \(6\) modulo \(7\) . Decide whether \(G\) is bipartite and whether it has an Euler circuit, and find its chromatic number with evidence on both sides.
Solution
Bipartite? No. The vertices \(0,1,2\) are pairwise adjacent, since their differences are \(1\) , \(2\) , and \(1\) . A triangle is an odd cycle, so by Theorem 6.18 the graph is not bipartite.
Euler circuit? Yes. Each vertex \(i\) is adjacent to \(i\pm 1\) and \(i\pm 2\) modulo \(7\) , four different vertices, so every degree is \(4\) , which is even. The graph is connected, because it contains the cycle \(0,1,2,\dots,6,0\) . By Theorem 6.22 it has an Euler circuit.
Chromatic number. Four colours suffice: colour \(0,1,2,3,4,5,6\) with \(a,b,c,a,b,c,d\) . Vertices with the same colour are \(0\) and \(3\) , \(1\) and \(4\) , \(2\) and \(5\) , whose differences are \(3\) , not one of \(1,2,5,6\) ; so no edge joins equal colours. Three colours do not suffice: among any three vertices of the same colour no two could be adjacent, but any three of the seven vertices include two whose difference modulo \(7\) is \(1\) , \(2\) , \(5\) , or \(6\) , because three vertices pairwise at circular distance \(3\) would need \(3\cdot 3=9\) steps around a cycle of length \(7\) . So each colour is used at most twice, three colours cover at most \(6\) vertices, and \(\chi=4\) .
-
Solve the recurrence \(a_n=2a_{n-1}+8a_{n-2}\) with \(a_0=2\) and \(a_1=2\) .
Answer
The characteristic equation \(x^{2}=2x+8\) has roots \(4\) and \(-2\) , and the initial conditions give \(A=B=1\) : \(a_n=4^{n}+(-2)^{n}\) , with terms \(2,2,20,56,272\) .
-
Let \(T(1)=1\) and \(T(n)=9T(n/3)+n^{2}\) for \(n\) a power of \(3\) . Find \(T(n)\) exactly and state its growth rate.
Answer
Here \(a=9=b^{d}=3^{2}\) , the balanced case of Theorem 7.11. For \(n=3^{k}\) , \(T(n)=n^{2}(k+1)=n^{2}(\log_3 n+1)=\Theta(n^{2}\log n)\) ; the first values are \(1,18,243\) .
-
Claim: a relation that is both symmetric and antisymmetric is the equality relation. Proposed proof: “If \(a\mathrel R b\) then \(b\mathrel R a\) by symmetry, so \(a=b\) by antisymmetry. Hence \(R\) relates only equal elements, so \(R\) is equality.” Say what the argument proves, why the claim is false, and what must be added to make it true.
Solution
The argument proves that if \(a\mathrel R b\) then \(a=b\) . In other words, \(R\) is contained in the equality relation: it relates only equal elements. It does not prove the converse, that every element is related to itself. Equality on a set \(A\) is the relation \(\{(a,a):a\in A\}\) , and to conclude that \(R\) is that relation one needs both inclusions.
The claim is false. The empty relation on a nonempty set is symmetric and antisymmetric, both vacuously, and it is not equality. So is \(\{(1,1)\}\) on the set \(\{1,2\}\) .
What must be added is reflexivity. A relation that is reflexive, symmetric, and antisymmetric contains every pair \((a,a)\) by reflexivity and no other pair by the argument given, so it is the equality relation. The error is the one in Exercise 2.17 seen from the other side: a conditional property cannot produce pairs that are not already there.
-
Sixteen lamps form a \(4\times 4\) array, all switched off. A move switches every lamp in one row or in one column. Prove that it is impossible to reach a state in which exactly one lamp is on.
Solution
Choose any two rows and any two columns, and consider the four lamps where they cross. A move on one of the two chosen rows switches exactly two of these four lamps; so does a move on one of the two chosen columns; a move on any other row or column switches none of them. So every move changes the number of lit lamps among the four by \(-2\) , \(0\) , or \(2\) , and the property “an even number of these four lamps are on” is an invariant. It holds at the start, when none are on, so by the invariant principle it holds in every reachable state, for every choice of two rows and two columns.
Suppose a state with exactly one lamp on were reachable. Choose the row and column of that lamp together with any other row and any other column. Among the four lamps at the crossings exactly one is on, an odd number. This contradicts the invariant. Hence the state is unreachable. A count of all cases agrees: the \(2^{8}\) combinations of row and column moves produce \(128\) different states, and the number of lamps lit in them is always one of \(0,4,6,8,10,12,16\) .
-
How many bit strings of length \(12\) contain exactly four ones, no two of which are adjacent?
Answer
By the gap argument of Example 8.2 with \(n=12\) and \(k=4\) : \(\binom{12-4+1}{4}=\binom 94=126\) .
-
Prove that every graph with \(n\) vertices and at least \(n\) edges contains a cycle.
Hint
A graph with no cycle is a forest; each of its \(c\) components is a tree, so by Theorem 6.12 it has \(n-c\le n-1\) edges. Take the contrapositive.
-
Decide, with proof, whether \(F_n=O(2^{n})\) and whether \(2^{n}=O(F_n)\) , where \(F_n\) is the \(n\) -th Fibonacci number.
Hint
\(F_n<2^{n}\) by Example 3.5, so \(F_n=O(2^{n})\) with \(C=1\) . For the other direction use Example 7.4: \(F_n\le\varphi^{n}\) , so \(2^{n}/F_n\ge(2/\varphi)^{n}\) , and \(2/\varphi>1.2\) ; by Bernoulli’s inequality \((1.2)^{n}\ge 1+0.2n\) exceeds every bound. So \(2^{n}\) is not \(O(F_n)\) .