533 L R closest pair dL dR d d In this
illustration the problem of finding the
closest pair in a set of 16 points is
reduced to two problems of finding the
closest pair in a set of eight points and
the problem of determining whether
there are points close

approaches, especially when it is
simpler to work with the closed form
of a generating function than with the
terms of the sequence themselves. We
illustrate how generating functions can
be used to prove identities with
Example 18. EXAMPLE 18 Use
generati

each set. The first person answers
either yes or no. When the first
person answers each query truthfully,
we can find x using log n queries by
successively splitting the sets used in
each query in half. Ulams problem,
proposed by Stanislaw Ulam in 1976,
a

1002 25. Is every zeroone
square matrix that is symmetric and
has zeros on the diagonal the
adjacency matrix of a simple graph?
26. Use an incidence matrix to
represent the graphs in Exercises 1
and 2. 27. Use an incidence matrix to
represent the graphs i

vertices of degree three and the edges
connecting them must be isomorphic if
these two graphs are isomorphic (the
reader should verify this). However,
these subgraphs, shown in Figure 11,
are not isomorphic. To show that a
function f from the vertex set o

d 4. a b d e c 5. Represent the graph in
Exercise 1 with an adjacency matrix. 6.
Represent the graph in Exercise 2 with
an adjacency matrix. 7. Represent the
graph in Exercise 3 with an adjacency
matrix. 8. Represent the graph in
Exercise 4 with an adjace

sort has been used to sort the pairs
according to their x coordinates and
according to their y coordinates, we
find that the increasing function f (n)
satisfying the recurrence relation f (n)
= 2f (n/2) + 7n, where f (2) = 1, exceeds
the number of compari

coefficient u k is defined by u k = u(u
1)(u k + 1)/k! if k > 0, 1 if k = 0.
EXAMPLE 7 Find the values of the
extended binomial coefficients 2 3
and 1/2 3 . Solution: Taking u = 2 and
k = 3 in Definition 2 gives us 2 3 =
(2)(3)(4) 3! = 4. Similarly, taki

some generating functions that arise
frequently. Remark: Note that the
second and third formulae in this table
can be deduced from the first formula
by substituting ax and xr for x,
respectively. Similarly, the sixth and
seventh formulae can be deduced fr

you read about traversing edges of a
graph. The text [GrYe06] is a good
reference for the alternative
terminology described in this remark.
EXAMPLE 1 In the simple graph shown
in Figure 1, a, d, c, f , e is a simple path
of length 4, because cfw_a, d, cfw

G(x)shows that G(x) = 2/(1 3x). Using
the identity 1/(1 ax) = k = 0 akxk,
from Table 1, we have G(x) = 2 k = 0
3kxk = k = 0 2 3kxk. Consequently,
ak = 2 3k. EXAMPLE 17 Suppose
that a valid codeword is an n-digit
number in decimal notation containing
an ev

concerned with questions of
convergence or the uniqueness of
power series in our discussions.
Readers familiar with calculus can
consult textbooks on this subject for
details about power series, including
the convergence of the series we
consider here. We

graph. As the path travels along its
edges, it visits the vertices along this
path, that is, the endpoints of these
edges. P1: 1 CH10-7T Rosen-2311T
MHIA017-Rosen-v5.cls May 13, 2011
16:18 10.4 Connectivity 679 A formal
definition of paths and related
ter

conventional algorithm for multiplying
two n n matrices uses O(n3)
additions and multiplications, it
follows that for sufficiently large
integers n, including those that occur
in many practical applications, this
algorithm is substantially more
efficient

as its center. (Otherwise, the distance
between these points is greater than
the difference in their x coordinates,
which exceeds d.) To examine the
points within this strip, we sort the
points so that they are listed in order
of increasing y coordinates,

need only consider the distances
between p and points in the set that lie
within the rectangle of height d and
width 2d with p on its base and with
vertical sides at distance d from . We
can show that there are at most eight
points from the set, including

number of modular multiplications
used to compute an mod m using the
recursive algorithm. 21. Suppose that
the function f satisfies the recurrence
relation f (n) = 2f (n) + 1 whenever n
is a perfect square greater than 1 and f
(2) = 1. a) Find f (16). b)

sequences besides those described in
this section, such as their use for
establishing asymptotic formulae for
the terms of a sequence. We begin with
the definition of the generating
function for a sequence. DEFINITION 1
The generating function for the
seq

all the solutions of the equation with
the given constraints. However, the
method that this illustrates often can
be used to solve wide classes of
counting problems with special
formulae, as we will see. Furthermore,
a computer algebra system can be used

or the divide-and-conquer method
based on part (b) more efficient? The
most efficient way to solve Ulams
problem has been determined by A.
Pelc [Pe87]. In Exercises 2933,
assume that f is an increasing function
satisfying the recurrence relation f (n)
= a

possibilities concerning the positions
of the closest points: (1) they are both
in the left region L, (2) they are both in
the right region R, or (3) one point is in
the left region and the other is in the
right region. Apply the algorithm
recursively to

are n/2 games in the first round, with
the n/2 = 2k1 winners playing in the
second round, and so on. Develop a
recurrence relation for the number of
rounds in the tournament. 15. How
many rounds are in the elimination
tournament described in Exercise 14
w

and additional constraints may exist.
Such problems are equivalent to
counting the solutions to equations of
the form e1 + e2 + en = C, where C is
a constant and each ei is a nonnegative
integer that may be subject to a
specified constraint. Generating
fu

brute-force algorithm for solving this
problem; then we develop a divideandconquer algorithm for solving it. a)
Use pseudocode to describe an
algorithm that solves this problem by
finding the sums of consecutive terms
starting with the first term, the sum

C(t 1, t n)xt = r = n C(r 1, r
n)xr . We have shifted the summation
in the next-to-last equality by setting t
= n + r so that t = n when r = 0 and n + r
1 = t 1, and then we replaced t by r
as the index of summation in the last
equality to return to our

x7 in this expansion, which equals 26.
[Hint: To see that this coefficient
equals 26 requires the addition of the
coefficients of x7 in the expansions (x +
x2 + x5)k for 2 k 7. This can be
done by hand with considerable
computation, or a computer algebra

which vertices it passes through.
Consequently, it does not specify a
unique path when there is more than
one path that passes through this
sequence of vertices, which will
happen if and only if there are multiple
edges between some successive
vertices in

, where the four entries shown are
rectangular blocks. A simple graph G is
called self-complementary if G and G
are isomorphic. 50. Show that this
graph is self-complementary. d c a b 51.
Find a self-complementary simple
graph with five vertices. 52. Show

adjacency matrix? c) an incidence
matrix? A devils pair for a purported
isomorphism test is a pair of
nonisomorphic graphs that the test
fails to show that they are not
isomorphic. 71. Find a devils pair for
the test that checks the degree
sequence (defin