Appendix F Hints and Solutions to Selected Exercises
For the most part, solutions are provided here for odd-numbered exercises.
1 Set Theory
1.1 Set Notation and Relations
1.1.3 Exercises for Section 1.1
1.1.3.3.
1.1.3.5.
1.1.3.7.
1.2 Basic Set Operations
1.2.4 Exercises
1.2.4.1.
1.2.4.3.
1.2.4.5.
1.2.4.7.
1.3 Cartesian Products and Power Sets
1.3.4 Exercises
1.3.4.1.
1.3.4.3.
1.3.4.5.
1.3.4.7.
1.3.4.9.
1.4 Binary Representation of Positive Integers
1.4.3 Exercises
1.4.3.1.
1.4.3.3.
1.4.3.5.
1.4.3.7.
1.5 Summation Notation and Generalizations
1.5.3 Exercises
1.5.3.1.
1.5.3.3.
1.5.3.5.
1.5.3.7.
1.5.3.9.
2 Combinatorics
2.1 Basic Counting Techniques - The Rule of Products
2.1.3 Exercises
2.1.3.1.
2.1.3.3.
2.1.3.5.
2.1.3.7.
2.1.3.9.
2.1.3.11.
2.1.3.13.
2.1.3.15.
2.1.3.17.
Answer.

solution to exercise 17a of section 2.1. From a start node, there are two branches. The first branch, labeled yes, has four branches coming from it, one for each of the possible follow-up responses. The second branch from start is an end branch labeled no.
2.1.3.19.
2.2 Permutations
2.2.2 Exercises
2.2.2.1.
2.2.2.3.
2.2.2.5.
2.2.2.7.
2.2.2.9.
2.2.2.11.
2.3 Partitions of Sets and the Law of Addition
2.3.3 Exercises
2.3.3.1.
2.3.3.3.
2.3.3.5.
2.3.3.7.
2.3.3.9.
2.3.3.11.
Answer.
2.4 Combinations and the Binomial Theorem
2.4.4 Exercises
2.4.4.1.
2.4.4.2.
2.4.4.3.
2.4.4.5.
2.4.4.7.
2.4.4.9.
2.4.4.11.
2.4.4.13.
2.4.4.15.
2.4.4.17.
3 Logic
3.1 Propositions and Logical Operators
3.1.3 Exercises
3.1.3.1.
3.1.3.3.
Answer.
-
and 8 is an even integer. False. -
If
then 8 is an even integer. True. -
If
and 8 is an even integer then 11 is a prime number. True. -
If
then either 8 is an even integer or 11 is not a prime number. True. -
If
then either 8 is an odd integer or 11 is not a prime number. False. -
If 8 is not an even integer then
True.
3.1.3.5.
3.2 Truth Tables and Propositions Generated by a Set
3.2.4 Exercises
3.2.4.1.
3.2.4.3.
3.2.4.5.
3.3 Equivalence and Implication
3.3.5 Exercises
3.3.5.1.
3.3.5.3.
3.3.5.5.
3.3.5.7.
3.3.5.9.
3.4 The Laws of Logic
3.4.2 Exercises
3.4.2.1.
3.4.2.3.
3.5 Mathematical Systems and Proofs
3.5.4 Exercises
3.5.4.1.
3.5.4.3.
Answer.
-
Indirect proof:
-
Negated conclusion -
Premise -
Indirect Reasoning (1), (2) -
Premise -
Indirect Reasoning (1), (4) -
Conjunctive (3), (5) -
DeMorgan’s law (6) -
Premise -
Indirect Reasoning (7), (8) -
Premise
-
-
Direct proof:Indirect proof:
-
Direct proof:
-
Premise -
Added premise (conditional conclusion) -
Involution (2) -
Disjunctive simplification (1), (3) -
Premise -
Detachment (4), (5) -
Premise
Indirect proof:-
Negated conclusion -
Conditional equivalence (1) -
DeMorgan (2) -
Conjunctive simplification (3) -
Premise -
Conditional equivalence (5) -
Detachment (4), (6) -
Premise -
Detachment (7), (8) -
Premise -
Detachment (9), (10) -
Conjunctive simplification (3)
-
-
Direct proof:Indirect proof:
-
Negated conclusion -
Premise -
(1), (2) -
Premise -
Detachment (3), (4) -
Premise -
Detachment (5), (6)
-
3.5.4.5.
Answer.
-
Let
stand for “Wages will increase,” stand for “there will be inflation,” and stand for “cost of living will increase.” Therefore the argument is: The argument is invalid. The easiest way to see this is through a truth table, which has one case, the seventh, that this false. Let be the conjunction of all premises. -
Let
stand for “the races are fixed,” stand for “casinos are crooked,” stand for “the tourist trade will decline,” and stand for “the police will be happy.” Therefore, the argument is:The argument is valid. Proof:-
Premise -
Premise -
Indirect Reasoning (1), (2) -
Premise -
Indirect Reasoning (3), (4) -
DeMorgan (5)
-
3.5.4.7.
3.6 Propositions over a Universe
3.6.3 Exercises
3.6.3.1.
3.6.3.3.
3.6.3.5.
3.6.3.7.
3.7 Mathematical Induction
3.7.4 Exercises
3.7.4.1.
3.7.4.3.
3.7.4.5.
3.7.4.7.
Answer.
Let be the set of strings of zeros and ones of length (we assume that is known). Let be the set of the “even” strings, and the odd strings. The problem is to prove that for Clearly, and, if for some it follows that by the following reasoning.
3.7.4.9.
3.7.4.11.
Solution.
Induction: Assume that for some are all true. Now consider the sum Any of the additions in this expression can be applied last. If the th addition is applied last, we have No matter how the expression to the left and right of the addition are evaluated, the result will always be the same by the induction hypothesis, specifically and We now can prove that If
3.7.4.12.
3.7.4.13.
3.8 Quantifiers
3.8.5 Exercises
3.8.5.1.
3.8.5.3.
Answer.
3.8.5.5.
3.8.5.7.
3.8.5.9.
3.8.5.10.
3.8.5.11.
3.9 A Review of Methods of Proof
3.9.3 Exercises
3.9.3.1.
Answer.
The given statement can be written in if , then format as: If and are two odd positive integers, then is an even integer.
3.9.3.3.
3.9.3.5.
4 More on Sets
4.1 Methods of Proof for Sets
4.1.5 Exercises
4.1.5.1.
Answer.
-
Assume that
(condition of the conditional conclusion ). Since by the definition of and implies that Therefore, if then -
(Indirect) Assume that is not a subset of . Therefore, there exists that does not belong to Therefore, and a contradiction to the assumption that -
There are two cases to consider. The first is when
is empty. Then the conclusion follows since both Cartesian products are empty.If isn’t empty, we have two subcases, if is empty, which is a subset of every set. Finally, the interesting subcase is when is not empty. Now we pick any pair This means that is in and is in Since is a subset of is in and so Therefore
4.1.5.3.
4.1.5.5.
4.1.5.6.
Answer.
The statement is false. The sets and provide a counterexample. Looking ahead to Chapter 6, we would say that the relation of being non-disjoint is not transitive 6.3.3
4.2 Laws of Set Theory
4.2.4 Exercises
4.2.4.1.
4.2.4.3.
4.2.4.5. Hierarchy of Set Operations.
4.3 Minsets
4.3.3 Exercises
4.3.3.1.
4.3.3.3.
4.3.3.5.
4.3.3.7.
Answer.
Let For each or since by the complement law. Let if and otherwise. Since is in each it must be in the minset Now consider two different minsets and where each and is either or Since these minsets are not equal, for some Therefore, since two of the sets in the intersection are disjoint. Since every element of is in a minset and the minsets are disjoint, the nonempty minsets must form a partition of
4.4 The Duality Principle
4.4.2 Exercises
4.4.2.1.
4.4.2.3.
4.4.2.5.
5 Introduction to Matrix Algebra
5.1 Basic Definitions and Operations
5.1.4 Exercises
5.1.4.1.
5.1.4.3.
5.1.4.5.
5.1.4.7.
5.2 Special Types of Matrices
5.2.3 Exercises
5.2.3.1.
5.2.3.3.
Solution.
The object here is to prove a formula for the inverse of which is denoted If inverts (which it does) then the formula is proven.
Similarly,
By Theorem 5.2.6, is the only inverse of If we tried to invert with we would be unsuccessful since we cannot rearrange the order of the matrices.
5.2.3.5. Linearity of Determinants.
5.2.3.7.
5.2.3.9.
5.3 Laws of Matrix Algebra
5.3.3 Exercises
5.3.3.1.
Answer.
5.3.3.3.
5.4 Matrix Oddities
5.4.2 Exercises
5.4.2.1.
Answer.
In elementary algebra (the algebra of real numbers), each of the given oddities does not exist.
-
may be different from Not so in elementary algebra, since by the commutative law of multiplication. -
There exist matrices
and such that yet and In elementary algebra, the only way is if either or is zero. There are no exceptions.
5.4.2.3.
5.4.2.5.
6 Relations
6.1 Basic Definitions
6.1.4 Exercises
6.1.4.1.
6.1.4.3.
6.1.4.5.
Answer.
-
When
there are 27 pairs in the relation. -
Imagine building a pair of disjoint subsets of
For each element of there are three places that it can go: into the first set of the ordered pair, into the second set, or into neither set. Therefore the number of pairs in the relation is by the product rule.
6.1.4.7.
6.2 Graphs of Relations on a Set
6.2.2 Exercises
6.2.2.1.
6.2.2.3.
Answer.
6.3 Properties of Relations
6.3.3 Equivalence Relations
Checkpoint 6.3.16.
6.3.4 Exercises
6.3.4.1.
Answer.
-
“Divides” is antisymmetric. Suppose
and are two distinct positive integers. One of them has to be less than the other, so we will assume If then for some positive integer where we have But this means that and since is not a positive integer, -
“Divides” is transitive. If
and are positive integers such that and there must be two positive integers and such that and Combining these equalities we get and so
6.3.4.3.
Answer.
Part | reflexive? | symmetric? | antisymmetric? | transitive? |
---|---|---|---|---|
i | yes | no | no | yes |
ii | yes | no | yes | yes |
iii | no | no | no | no |
iv | no | yes | yes | yes |
v | yes | yes | no | yes |
vi | yes | no | yes | yes |
vii | no | no | no | no |
-
See Table 6.3.20
-
Graphs ii and vi show partial ordering relations. Graph v is of an equivalence relation.
6.3.4.5.
6.3.4.7.
Answer.
Let be any element of since is reflexive, so each element of is in some equivalence class. Therefore, the union of all equivalence classes equals Next we show that any two equivalence classes are either identical or disjoint and we are done. Let and be two equivalence classes, and assume that We want to show that To show that let Also, there exists an element, of that is in the intersection of and by our assumption. Therefore,
6.3.4.9.
6.3.4.11.
6.4 Matrices of Relations
6.4.3 Exercises
6.4.3.1.
6.4.3.3.
6.4.3.5.
Answer.
The graph of a relation on three elements has nine entries. The three entries in the diagonal must be 1 in order for the relation to be reflexive. In addition, to make the relation symmetric, the off-diaginal entries can be paired up so that they are equal. For example if the entry in row 1 column 2 is equal to 1, the entry in row 2 column 1 must also be 1. This means that three entries, the ones above the diagonal determine the whole matrix, so there are different reflexive, symmetric relations on a three element set.
6.4.3.7.
6.4.3.9.
Answer.
-
To verify that the converse is not true we need only one example. For
let and all other entries equal and let be the zero matrix. Since and are both the zero matrix, but since is false. -
The matrices are defined on the same set
Let be the equivalence classes defined by and let be those defined by Claim:
6.5 Closure Operations on Relations
6.5.3 Exercises
6.5.3.3.
6.5.3.5.
6.5.3.7.
Answer.
-
By the definition of transitive closure,
is the smallest relation which contains therefore, it is transitive. The transitive closure of , is the smallest transitive relation that contains Since is transitive, -
The transitive closure of a symmetric relation is symmetric, but it may not be reflexive. If one element is not related to any elements, then the transitive closure will not relate that element to others.
7 Functions
7.1 Definition and Notation
7.1.5 Exercises
7.1.5.1.
7.1.5.3.
7.1.5.5.
7.2 Properties of Functions
7.2.3 Exercises
7.2.3.1.
7.2.3.3.
7.2.3.5.
7.2.3.7.
7.2.3.9.
Answer.
-
The proof is due to Georg Cantor (1845-1918), and involves listing the rationals through a definite procedure so that none are omitted and duplications are avoided. In the first row list all nonnegative rationals with denominator 1, in the second all nonnegative rationals with denominator 2, etc. In this listing, of course, there are duplications, for example,
etc. To obtain a list without duplications follow the arrows in Figure 7.2.15, listing only the circled numbers.We obtain: Each nonnegative rational appears in this list exactly once. We now must insert in this list the negative rationals, and follow the same scheme to obtain:which can be paired off with the elements of

7.2.3.11.
7.2.3.13.
Answer.
The proof is indirect and follows a technique called the Cantor diagonal process. Assume to the contrary that the set is countable, then the elements can be listed: where each is an infinite sequence of 0s and 1s. Consider the array:
We assume that this array contains all infinite sequences of 0s and 1s. Consider the sequence defined by
Notice that differs from each in the th position and so cannot be in the list. This is a contradiction, which completes our proof.
7.3 Function Composition
7.3.4 Exercises
7.3.4.1.
7.3.4.3.
Answer.
-
If
and are permutations of then they are both injections and their composition, is a injection, by Theorem 7.3.6. By Theorem 7.3.7, is also a surjection; therefore, is a bijection on a permutation. -
Induction: Assume that the number of permutations on a set with
elements, is Furthermore, assume that and that contains an element called Let We can reduce the definition of a permutation, on to two steps. First, we select any one of the permutations on (Note the use of the induction hypothesis.) Call it This permutation almost completely defines a permutation on that we will call For all in we start by defining to be We may be making some adjustments, but define it that way for now. Next, we select the image of which can be done different ways, allowing for any value in To keep our function bijective, we must adjust as follows: If we select then we must find the element, of such that and redefine the image of to If we had selected then there is no adjustment needed. By the rule of products, the number of ways that we can define is
7.3.4.5.
7.3.4.7.
7.3.4.9.
7.3.4.11.
7.3.4.12.
7.3.4.13.
Answer.
7.3.4.15.
Answer.
8 Recursion and Recurrence Relations
8.1 The Many Faces of Recursion
8.1.8 Exercises
8.1.8.1.
8.1.8.3.
8.1.8.5.
8.2 Sequences
8.2.3 Exercises
8.2.3.1.
8.2.3.3.
Answer.
Imagine drawing line in one of the infinite regions that it passes through. That infinite region is divided into two infinite regions by line As line is drawn through every one of the previous lines, you enter another region that line divides. Therefore regions are divided and the number of regions is increased by From this observation we get
8.2.3.5.
8.3 Recurrence Relations
8.3.5 Exercises
8.3.5.13.
8.3.5.15.
8.4 Some Common Recurrence Relations
8.4.5 Exercises
8.4.5.1.
8.4.5.3.
8.4.5.4.
8.4.5.5.
8.4.5.7.
Answer.
-
A good approximation to the solution of this recurrence relation is based on the following observation:
is a power of a power of two; that is, is where , then By applying this recurrence relation times we obtain Going back to the original form of or We would expect that in general, is We do not see any elementary method for arriving at an exact solution. -
Suppose that
is a positive integer with Then can be written in binary form, with and is equal to the sum If then we can estimate this sum to be between and Therefore,
8.5 Generating Functions
8.5.7 Exercises
8.5.7.1.
8.5.7.3.
8.5.7.5.
8.5.7.7.
8.5.7.9.
9 Graph Theory
9.1 Graphs - General Introduction
9.1.5 Exercises
9.1.5.1.
Answer.
In Figure 9.1.8, computer can communicate with all other computers. In Figure 9.1.9, there are direct roads to and from city to all other cities.
9.1.5.3.
9.1.5.5.
9.1.5.7.
9.1.5.9.
Answer.
-
Not graphic - if the degree of a graph with seven vertices is 6, it is connected to all other vertices and so there cannot be a vertex with degree zero.
-
Graphic. One graph with this degree sequence is a cycle of length 6.
-
Not Graphic. The number of vertices with odd degree is odd, which is impossible.
-
Graphic. A "wheel graph" with one vertex connected to all other and the others connected to one another in a cycle has this degree sequence.
-
Graphic. Pairs of vertices connected only to one another.
-
Not Graphic. With two vertices having maximal degree, 5, every vertex would need to have a degree of 2 or more, so the 1 in this sequence makes it non-graphic.
9.2 Data Structures for Graphs
9.2.3 Exercises
9.2.3.1.
Answer.
-
A rough estimate of the number of vertices in the “world airline graph” would be the number of cities with population greater than or equal to 100,000. This is estimated to be around 4,100. There are many smaller cities that have airports, but some of the metropolitan areas with clusters of large cities are served by only a few airports. 4,000-5,000 is probably a good guess. As for edges, that’s a bit more difficult to estimate. It’s certainly not a complete graph. Looking at some medium sized airports such as Manchester, NH, the average number of cities that you can go to directly is in the 50-100 range. So a very rough estimate would be
This is far less than so an edge list or dictionary of some kind would be more efficient. -
The number of ASCII characters is 128. Each character would be connected to
others and so there are edges. Comparing this to the an array is probably the best choice. -
The Oxford English Dictionary as approximately a half-million words, although many are obsolete. The number of edges is probably of the same order of magnitude as the number of words, so an edge list or dictionary is probably the best choice.
9.2.3.3.
9.3 Connectivity
9.3.6 Exercises
9.3.6.1.
9.3.6.3.
9.3.6.5.
Answer.
-
The eccentricity of each vertex is 2; and the diameter and radius are both 2 as well. All vertices are part of the center.
-
The corners (1,3,10 and 10) have eccentricities 5. The two central vertices, 5 and 8, which are in the center of the graph have eccentricity 3. All other vertices have eccentricity 4. The diameter is 5. The radius is 3.
-
Vertices 1, 2 and 5 have eccentricity 2 and make up the center of this graph. Verticies 7 and 8 have eccentricity 4, and all other vertices have eccentricity 3. The diameter is 4. The radius is 2.
-
The eccentricity of each vertex is 4; and the diameter and radius are both 4 as well. All vertices are part of the center.
9.3.6.7.
Answer.
Basis: Is the relation defined by if there is a path of length 1 from Yes, since if and only if an edge, which is a path of length connects to
Induction: Assume that if and only if there is a path of length from to We must show that if and only if there is a path of length from to
By the induction hypothesis, there is a path of length from And by the basis, there is a path of length one from to If we combine these two paths, we obtain a path of length from to Of course, if we start with a path of length from to we have a path of length from to some vertex and a path of length 1 from to Therefore,
9.4 Traversals: Eulerian and Hamiltonian Graphs
9.4.3 Exercises
9.4.3.1.
Answer.
Using a recent road map, it appears that an Eulerian circuit exists in New York City, not including the small islands that belong to the city. Lowell, Massachusetts, is located at the confluence of the Merrimack and Concord rivers and has several canals flowing through it. No Eulerian path exists for Lowell.
9.4.3.3.
9.4.3.5.
9.4.3.7.
9.4.3.8.
9.4.3.9.
9.4.3.11.
Solution.
No, such a line does not exist. The dominoes with two different numbers correspond with edges in a See corresponding dominos and edges in Figure 9.4.25. Dominos with two equal numbers could be held back and inserted into the line created with the other dominoes if such a line exists. For example, if were part of the line, could be inserted between those two dominoes. The line we want exists if and only if there exists an Eulerian path in a Since all six vertices of a have odd degree no such path exists.

Four dominos lay end-to-end with numbers on abutting ends matching. They correspond with four connecting edges in a
9.5 Graph Optimization
9.5.5 Exercises
9.5.5.1.
9.5.5.3.
Answer.
-
Optimal cost
which is attained with the nearest neighbor algorithm. Strip algorithm phase 1 cost Strip algorithm phase 2 cost -
Optimal cost
which is attained with the nearest neighbor algorithm. Strip algorithm phase 1 cost is Strip algorithm phase 2 cost -
There are 4 points; so we will divide the unit square into two strips.
-
Optimal Path:
-
Phase I Path:
-
Phase II Path:
-
-
There are 5 points; so we will divide the unit square into three strips.
-
Optimal Path:
-
Phase I Path:
-
Phase II Path:
-
9.5.5.5.
Answer.
-
There are three possible flow-augmenting paths.
with flow increase of 1. with flow increase of 1, and with flow increase of 2. -
The new flow is never maximal, since another flow-augmenting path will always exist. For example, if
is used above, the new flow can be augmented by 2 units with
9.5.5.7.
9.5.5.9.
Answer.
To locate the closest neighbor among the list of other points on the unit square requires a time proportional to Therefore the time required for the closest-neighbor algorithm with points is proportional to which is proportional to Since the strip algorithm takes a time proportional to it is much faster for large values of
9.6 Planarity and Colorings
9.6.3 Exercises
9.6.3.1.
Answer.
A has 10 edges. If a is planar, the number of regions into which the plane is divided must be 7, by Euler’s formala ( ). If we re-count the edges of the graph by counting the number edges bordering the regions we get a count of at least But we’ve counted each edge twice this way and the count must be even. This implies that the number of edges is at least 11, which a contradiction.
9.6.3.2.
Hint.
Don’t forget Theorem 9.6.21!
9.6.3.3.
9.6.3.5.
9.6.3.7.
Answer.
Suppose that is not connected. Then is made up of 2 components that are planar graphs with less than edges, and For let be the number of vertices, regions and edges in By the induction hypothesis, for
One of the regions, the infinite one, is common to both graphs. Therefore, when we add edge back to the graph, we have and
9.6.3.9.
9.6.3.11.
9.6.3.13.
9.6.3.15.
Solution.
-
The chromatic number will always be two. One coloring of any of these graphs would be to color all vertices whose coordinate add up to an even integer one color and the other vertices whose coordinates have an odd sum some other color. This works because for any vertex, if the sum of coordinate is even, the adjacent vertices differ in exactly one coordinate by
and so they have a coordinate sum that is odd. -
If both
and are odd, then does not have a Hamiltonian circuit. To see why, we can color vertices with an even coordinate sum white and the ones with a odd sum black. If and then there are vertices. There will be white vertices and one fewer black one. Any circuit that starts and ends at any vertex must have an even number of vertices if we count the beginning/ending vertex once. This implies that a Hamiltonian circuit that includes all vertices cannot exist.If either of the are even, does have a Hamiltonian circuit. There are many different possible circuits, but one of them, assuming is even, would be to start at traverse the left border, the top border and the right border, leaving you at then you can zig-zag back to visiting all of the vertices in the interior of the graph and the bottom border. This is is illustrated in the following graph ofA Hamiltonian circuit of as described in the text. -
As in the two diminsional case there will be a Hamiltonian circuit if at least one of the
are even.
10 Trees
10.1 What Is a Tree?
10.1.3 Exercises
10.1.3.1.
10.1.3.3.
10.1.3.5.
Solution.
-
The proof of this part is similar to part (a). If we assume that there are less than three vertices of degree three, we can still infer
using the fact that a non-chain tree has at least one vertex of degree three or more.
10.1.3.7.
Solution.
We can prove this by induction for trees with vertices, The basis is clearly true since the only tree with two vertices is a Now assume that (✶) is true for some greater than or equal to two and consider a tree with vertices. We proceed by removing a leaf from If there exists a leaf connected to a vertex of degree two, we select one such leaf. The resulting tree satisfies (✶) for the number of leaves; and adding the removed leaf neither changes the number of leaves nor the value of (✶). If all interior vertices have degree three or more remove any leaf from Again, the number of leaves in the resulting tree is (✶), but this time when we put the removed leaf back on the tree the number of leaves will increase by one, but the value of (✶) will increase by one to match it
10.2 Spanning Trees
10.2.4 Exercises
10.2.4.1.
10.2.4.3.
Solution.
-
There is only one minimal spanning tree. If we start with BOS as the “right set”, the edges in the following set are ordered according to how they are added in Prim’s Algorithm:
-
There is only one minimal spanning tree, which has edges
10.2.4.5.
Solution.
10.2.4.7.
10.3 Rooted Trees
10.3.4 Exercises
10.3.4.1.
10.3.4.3.
10.4 Binary Trees
10.4.6 Exercises
10.4.6.1.
10.4.6.3.
10.4.6.5.
10.4.6.7.
Answer.
Solution 1:
Basis: A binary tree consisting of a single vertex, which is a leaf, satisfies the equation
Induction:Assume that for some all full binary trees with or fewer vertices have one more leaf than internal vertices. Now consider any full binary tree with vertices. Let and be the left and right subtrees of the tree which, by the definition of a full binary tree, must both be full. If and are the numbers of internal vertices in and and and are the numbers of leaves, then and Therefore, in the whole tree,
Solution 2:
Imagine building a full binary tree starting with a single vertex. By continuing to add leaves in pairs so that the tree stays full, we can build any full binary tree. Our starting tree satisfies the condition that the number of leaves is one more than the number of internal vertices . By adding a pair of leaves to a full binary tree, an old leaf becomes an internal vertex, increasing the number of internal vertices by one. Although we lose a leaf, the two added leaves create a net increase of one leaf. Therefore, the desired equality is maintained.
10.4.6.8.
Solution.
11 Algebraic Structures
11.1 Operations
11.1.4 Exercises
11.1.4.1.
Answer.
-
Commutative, and associative. Notice that zero is the identity for addition, but it is not a positive integer.
-
Commutative, associative, and has an identity (1)
-
Commutative, associative, has an identity (1), and is idempotent
-
Commutative, associative, and idempotent
11.1.4.3.
11.1.4.5.
11.2 Algebraic Systems
11.2.4 Exercises
11.2.4.1.
Answer.
The terms “generic” and “trade” for prescription drugs are analogous to “generic” and “concrete” algebraic systems. Generic aspirin, for example, has no name, whereas Bayer, Tylenol, Bufferin, and Anacin are all trade or specific types of aspirins. The same can be said of a generic group where is a nonempty set and is a binary operation on When examples of typical domain elements can be given along with descriptions of how operations act on them, such as * or then the system is concrete (has a specific name, as with the aspirin). Generic is a way to describe a general algebraic system, whereas a concrete system has a name or symbols making it distinguishable from other systems.
11.2.4.3.
11.2.4.5.
11.2.4.7.
11.3 Some General Properties of Groups
11.3.3 Exercises
11.3.3.1.
11.3.3.3.
Answer.
11.3.3.5.
Answer.
In this answer, we will refer to Lemma 11.3.13 simply as “the lemma.”
-
For
let be for all The basis for this proof follows directly from the basis for the definition of exponentiation.Induction: Assume that for some is true. ThenTo complete the proof, you need to consider the cases where and/or are negative. -
Induction; Assume that
is true for some 0,Finally, if is negative, we can verify that using many of the same steps as the positive case.
11.4 Greatest Common Divisors and the Integers Modulo
11.4.2 The Euclidean Algorithm
Investigation 11.4.1.
Solution.
If quotient in division is 1, then we get the slowest possible completion. If then working backwards, each remainder would be the sum of the two previous remainders. This described a sequence like the Fibonacci sequence and indeed, the greatest common divisor of two consecutive Fibonacci numbers will take the most steps to reach a final value of 1.
11.4.6 Exercises
11.4.6.1.
11.4.6.3.
11.4.6.5.
11.4.6.7.
11.4.6.9.
Solution.
-
The operation table can be created with SageMath:We know that multiplication mod 14 is associative, 1 is the identity and from the table we see that each element has an inverse in this system.
-
We know that multiplication mod
is associative, 1 is the identity and we are assuming that all element are invertible. In the next part we see that the invertable elements are exactly the set -
Let
be an element of such that By Theorem 11.4.9 there exist integers and such that By the division property, we can divide into to get whereTherefore, has an inverse, and that inverse is in
11.4.6.10.
11.4.6.11.
11.4.6.13.
Solution.
11.4.6.15.
Solution.
There will always to two solutions, and We can prove this as follows:
The fourth step applies a theorem that follows from Bézout’s lemma that states that if a prime divides evenly into a product, then it must divide into one of the factors.
11.4.6.17.
11.5 Subsystems
11.5.5 Exercises
11.5.5.1.
11.5.5.3.
11.5.5.5.
Answer.
-
Based on the ordering diagrams for parts a through c in Figure 11.5.13, we would expect to see an ordering diagram similar to the one for divides on
(the divisors of 24) if we were to examine the subgroups of This is indeed the case.

Figure for exercise 5 of Section 11.5
11.5.5.7.
Answer.
Assume that and are subgroups of group and that, as in Figure 11.5.12, there are elements and Consider the product Where could it be placed in the Venn diagram? If we can prove that it must lie in the outer region, then we have proven that is not closed under and cannot be a subgroup of Assume that Since is in is in and so by closure which is a contradiction. Similarly,
One way to interpret this theorem is that no group is the union of two groups.
11.6 Direct Products
11.6.3 Exercises
11.6.3.1.
11.6.3.3. Algebraic properties of the -cube.
11.6.3.5.
11.7 Isomorphisms
11.7.4 Exercises
11.7.4.1.
11.7.4.3.
Answer.
Consider three groups and with operations respectively. We want to show that if is isomorphic to and if is isomorphic to , then is isomorphic to
Therefore, is an isomorphism from into proving that “is isomorphic to” is transitive.
11.7.4.5.
Answer.
11.7.4.7.
Answer.
11.7.4.11.
11.7.4.13.
12 More Matrix Algebra
12.1 Systems of Linear Equations
12.1.7 Exercises
12.1.7.1.
12.1.7.3.
Answer.
-
Basic variables:
and Free variable: The solution set is empty because the last row of the matrix converts to the inconsistent equation
12.1.7.5.
12.1.7.7.
12.2 Matrix Inversion
12.2.3 Exercises
12.2.3.3.
12.2.3.5.
12.3 An Introduction to Vector Spaces
12.3.3 Exercises
12.3.3.3.
12.3.3.7.
12.3.3.9.
12.3.3.11.
Answer.
-
The set is linearly independent: let
and be scalars such that then which has as its only solutions. The set generates all of let be an arbitrary vector in . We want to show that we can always find scalars and such that This is equivalent to finding scalars such that and This system has a unique solution and Therefore, the set generates
12.3.3.13.
12.4 The Diagonalization Process
12.4.4 Exercises
12.4.4.1.
12.4.4.3.
12.4.4.5.
12.4.4.7.
12.5 Some Applications
12.5.5 Exercises
12.5.5.4.
12.5.5.5.
Answer.
-
Since
there are 0 paths of length 1 from: node c to node a, node b to node b, and node a to node c; and there is 1 path of length 1 for every other pair of nodes. -
The characteristic polynomial isSolving the characteristic equation
we find solutions 1, 2, and -1.If we find the associated eigenvector by finding a nonzero solution to One of these, which will be the first column of isIf then the system determining the eigenvectors is and we can select although any nonzero multiple of this vector could be the third column of -
Assembling the results of part (b) we have
.Hence there are five different paths of length 4 between distinct vertices, and six different paths that start and end at the same vertex. The reader can verify these facts from Figure 12.5.4
12.5.5.7.
Answer.
-
Assume that
and commute. We will examine the first few terms in the product The pattern that is established does continue in general. In what follows, it is important that For example, in the last step, expands to not if we can’t assume commutativity.
12.6 Linear Equations over the Integers Mod 2
12.6.2 Exercises
12.6.2.1.
12.6.2.2.
Answer.
As suggested here is the augmented matrix with both right sides, and its row reduction:
There are only two basic variables here because the left side of the last equation is the sum of the left sides of the first two equations.
-
Ignoring the last column of both matrices, we see that the last equation of the first system reduces to
which is always true, and the first two equations yield two free variables, and The general solution is the set of quadruples The cardinality of the solution set is 4. -
If we replace the fifth column with the sixth one, the last row indicates that
which means that the solution set is empty.
12.6.2.3.
Answer.
-
The solution set has only two elements. It is
Since is a finite group, the solution set is a subgroup because it is closed with respect to coordinatewise mod 2 addition. -
Therefore, the solution to this system is a shift of the solution set to the homogeneous system by the vector
which is
13 Boolean Algebra
13.1 Posets Revisited
Exercises
13.1.1.
13.1.3.
13.1.5.
13.1.7.
Answer.
-
The sum of elements in
is odd and disqualifies the set from being an element of the poset. -
Any set that contains the union of
but also contains 3 or 5, but not both will be an upper bound. You can create several by including on not including 4 or 8. -
The least upper bound doesn’t exist. Notice that the union of
and isn’t in One of the two sets and is contained within every upper bound of and but neither is contained within the other.
13.2 Lattices
Exercises
13.2.5.
13.3 Boolean Algebras
Exercises
13.3.1.
13.3.3.
13.3.5.
13.3.7.
13.4 Atoms of a Boolean Algebra
Exercises
13.4.1.
13.4.3.
13.4.5.
Hint.
Answer.
Assume that is the third element of a Boolean algebra. Then there is only one possible set of tables for join and meet, all following from required properties of the Boolean algebra.
Next, to find the complement of we want such that and No element satisfies both conditions; hence the lattice is not complemented and cannot be a Boolean algebra. The lack of a complement can also be seen from the ordering diagram from which and must be derived.
13.4.7.
Answer.
Let be any countably infinite set, such as the integers. A subset of is cofinite if it is finite or its complement is finite. The set of all cofinite subsets of is:
-
Countably infinite - this might not be obvious, but here is a hint. Assume
For each finite subset of map that set to the integer You can do a similar thing to sets that have a finite complement, but map them to negative integers. Only one minor adjustment needs to be made to accommodate both the empty set and -
Closed under union
-
Closed under intersection, and
-
Closed under complementation.
Therefore, if then is a countable Boolean algebra under the usual set operations.
13.4.8.
13.5 Finite Boolean Algebras as -tuples of 0’s and 1’s
Exercises
13.5.1.
13.5.3.
13.6 Boolean Expressions
Exercises
13.6.1.
13.6.3.
Answer.
-
With two variables, there are
different Boolean functions. With three variables, there are different Boolean functions. -
Consider
defined by and with the images of all other pairs in defined arbitrarily. This function is not a Boolean function. If we assume that it is Boolean function then can be computed with a Boolean expression This expression can be put into minterm normal form:Therefore, and so, using this formula, This contradicts and so is not a Boolean function.
13.7 A Brief Introduction to Switching Theory and Logic Design
Exercises
13.7.1.
13.7.2.
13.7.3.
14 Monoids and Automata
14.1 Monoids
Exercises
14.1.1.
Answer.
-
is not a submonoid since the identity of which is 1, is not in is a submonoid since and is closed under multiplication; that is, for all is in -
The identity of
is the identity function defined by If thus the identity of is in However, the image of 1 under any function in is 2, and thus the identity of is not in so is not a submonoid. The composition of any two functions in and will be a function inand the two conditions of a submonoid are satisfied and is a submonoid of -
The first set is a submonoid, but the second is not since the null set has a non-finite complement.
14.1.3.
Answer.
The set of real matrices is a monoid under matrix multiplication. This follows from the laws of matrix algebra in Chapter 5. To prove that the set of stochastic matrices is a monoid over matrix multiplication, we need only show that the identity matrix is stochastic (this is obvious) and that the set of stochastic matrices is closed under matrix multiplication. Let and be stochastic matrices.
14.1.5.
Answer.
There are functions in for These four functions are named in the text. See Figure 14.1.4. The table for is
14.2 Free Monoids and Languages
Exercises
14.2.1.
14.2.3.
14.2.5.
Answer.
-
Terminal symbols: The null string, 0, and 1. Nonterminal symbols:
Starting symbol: Production rules: This is a regular grammar. -
Terminal symbols: The null string, 0, and 1. Nonterminal symbols:
Starting symbol: Production rules: , This is a regular grammar. -
See Exercise 3. This language is not regular.
14.2.7.
14.2.9.
14.3 Automata, Finite-State Machines
Exercises
14.3.1.
14.3.3.
14.3.5.
Answer.
-
-
Input: 10110, Output: 11011
10110 is in position 27 -
Input: 00100, Output: 00111
00100 is in position 7 -
Input:11111, Output: 10101
11111 is in position 21
-
-
Let
and recall that for where is the reverse of To prove that the Gray Code Decoder always works, let be the proposition “Starting in Copy state, ’s output is the position of in and starting in Complement state, ’s output is the position of in ” That p(1) is true is easy to verify for both possible values of 0 and 1. Now assume that for some is true and considerIf ’s output is a zero followed by the output for starting in Copy state. By the induction hypothesis, this is zero followed by the position of in which is the position of in by the definition ofIf ’s output is a one followed by the output for starting in Complement state. By the induction hypothesis, this is one followed by the position of in which is the position of in by the definition of
14.4 The Monoid of a Finite-State Machine
Exercises
14.4.1.
14.4.3.
Answer.
Yes, just consider the unit time delay machine of Figure 14.4.4. Its monoid is described by the table at the end of Section 14.4 where the row and column are omitted. Next consider the machine in Figure 14.5.7. The monoid of this machine is:
Hence both of these machines have the same monoid, however, their transition diagrams are nonisomorphic since the first has two vertices and the second has seven.
14.5 The Machine of a Monoid
Exercises
14.5.1.
15 Group Theory and Applications
15.1 Cyclic Groups
Exercises
15.1.1.
15.1.3.
15.1.5.
15.1.7.
Answer.
Theorem 15.1.13 implies that generates if and only if the greatest common divisor of and is 1. Therefore the list of generators of are the integers in that are relatively prime to The generators of are all of the nonzero elements except 5, 10, 15, and 20. The generators of are the odd integers in since 256 is
15.1.9.
Answer.
-
The actual sum is 91. Our result is incorrect, since 91 is not in
Notice that 91 and 14 differ by 77. Any error that we get using this technique will be a multiple of 77.
15.2 Cosets and Factor Groups
Exercises
15.2.1.
15.2.3.
Answer.
-
The four distinct cosets in
are and None of these cosets generates therefore is not cyclic. Hence must be isomorphic to -
The factor group is isomorphic to
Each coset of is a line in the complex plane that is parallel to the x-axis: where is an isomorphism. -
The four cosets are: and 1 generates all four cosets. The factor group is isomorphic to because is a generator.
15.2.5.
15.3 Permutation Groups
15.3.5 Exercises
15.3.5.1.
15.3.5.3.
15.3.5.5.
Answer.
15.3.5.7.
15.3.5.9.
15.3.5.13.
Answer.
-
Both groups are non-abelian and of order 6; so they must be isomorphic, since only one such group exists up to isomorphism. The function
defined by is an isomorphism, -
Recall that since every function is a relation, it is natural to translate functions to Boolean matrices. Suppose that
We will define its image, byThat is a bijection follows from the existence of If is a rook matrix,ForTherefore, is an isomorphism.
15.4 Normal Subgroups and Group Homomorphisms
15.4.3 Exercises
15.4.3.1.
15.4.3.3.
Answer.
15.4.3.5.
15.4.3.7.
15.4.3.9.
Answer.
15.5 Coding Theory, Linear Codes
15.5.4 Exercises
15.5.4.1.
15.5.4.3.
Answer.
-
Syndrome =
This syndrome occurs only if two bits have been switched. No reliable correction is possible.
15.5.4.5.
Answer.
-
Blocks of two bits are encoded into code words of length 4.
-
The code words are 0000, 1010, 0111 and 1101.
-
Since the first two code words have a Hamming distance of 2, not all single bit errors can be corrected. For example, if 0000 is transmitted and the first bit is switch, then 1000 is received and we can’t tell for sure whether this came from 0000 or 1010. To see what can be corrected, we note that
is encoded to and so if is recieved and no error has occurred,We can extract the parity check matrix from this set of equations. It isThe rows of this matrix correspond with the syndromes for errors in bits 1 through 4, which are all nonzero, so we can detect any single bit error. Notice that the syndromes for bits 1 and 3 are identical. This reflects the fact that errors in these bits can’t be corrected. However, the syndromes for bits 2 and 4 are unique and so we can correct them. Therefore the second bit of the original message can be sent with more confidence than the first.
15.5.4.7.
15.5.4.8.
16 An Introduction to Rings and Fields
16.1 Rings, Basic Definitions and Concepts
16.1.6 Exercises
16.1.6.1.
16.1.6.3.
16.1.6.5.
16.1.6.7.
Answer.
-
The left-hand side of the equation factors into the product
Since is an integral domain, and are the only possible solutions. -
Over
2, 3, 6, and 11 are solutions. Although the equation factors into this product can be zero without making either 2 or 3. For example. If = 6 we get Notice that 4 and 3 are zero divisors.
16.1.6.9.
Answer.
Let and be any rings, then
-
is isomorphic to and is isomorphic to implies that is isomorphic to and so “is isomorphic to” is a transitive relation on rings.
We haven’t proven these properties here, just stated them. The combination of these observations implies that “is isomorphic to” is an equivalence relation on rings.
16.1.6.11.
Answer.
-
Commutativity is clear from examination of a multiplication table for
More generally, we could prove a theorem that the direct product of two or more commutative rings is commutative. is the unity of -
Another example is
You never get an integral domain in this situation. By the definition an integral domain must contain a “zero” so we always have in
16.1.6.13.
16.2 Fields
Exercises
16.2.5.
16.2.7.
16.3 Polynomial Rings
Exercises
16.3.1.
16.3.3.
16.3.5.
16.3.7.
16.3.9.
16.3.11.
Answer.
For let be the proposition: For all and with there exist unique polynomials and such that and either or
Basis: is true, for if has degree 0, it is a nonzero constant, and so either if is not a constant, or if is also a constant.
Induction: Assume that for some is true for all If has degree then there are two cases to consider. If and we are done. Otherwise, if we perform long division as follows, where LDT’s stand for terms of lower degree than
Therefore,
with This establishes the existence of a quotient and remainder. The uniqueness of and as stated in the theorem is proven as follows: if is also equal to with deg then
Since the degree of both sides of the last equation is less than Therefore, it must be that or And so
16.4 Field Extensions
Exercises
16.4.1.
16.4.3.
16.4.5.
Answer.
-
is reducible if and only if it has a factor of the form By Theorem 16.3.14, is a factor if and only if is a zero. Neither 0 nor 1 is a zero of over -
Since
is irreducible over all zeros of must lie in an extension field of . Let c be a zero of can be described several different ways. One way is to note that since for all n. Therefore, includes 0, But since Furthermore, and Higher powers of repeat preceding powers. Therefore, -
Cite Theorem Theorem 16.2.10, part 3.