integers. Even though the problem of
finding the maximum element in a
sequence is relatively trivial, it provides a
good illustration of the concept of an
algorithm. Also, there are many instances
where the largest integer in a finite
sequence of integers

25. Use Exercises 18 and 24 to solve the
system 7x1 8x2 + 5x3 = 5 4x1 + 5x2
3x3 = 3 x1 x2 + x3 = 0 26. Let A = 1 1 0
1 and B = 0 1 1 0 . Find a) A B. b) A B.
c) A B. 27. Let A = 101 110 001 and
B = 011 101 101 . Find a) A B. b)
A B. c) A B. 28. Find the

Algorithms One useful fact is that the
leading term of a polynomial determines
its order. For example, if f (x) = 3x5 + x4 +
17x3 + 2, then f (x) is of order x5. This is
stated in Theorem 4, whose proof is left as
Exercise 50. THEOREM 4 Let f (x) = anxn
+

x (ceiling function): the smallest integer
greater than or equal to x partial function:
an assignment to each element in a subset
of the domain a unique element in the
codomain sequence: a function with
domain that is a subset of the set of
integers geome

A B (the difference of A and B): the set
containing those elements that are in A
but not in B A (the complement of A): the
set of elements in the universal set that
are not in A A B (the symmetric
difference of A and B): the set containing
those elements

is a real number, then x + n m = x + n m .
27. Prove that if m is a positive integer
and x is a real number, then mx=x + x + 1
m + x + 2 m + + x + m 1 m . 28. We
define the Ulam numbers by setting u1 =
1 and u2 = 2. Furthermore, after
determining whether

updated to the value of a term if the term
exceeds the maximum of the terms
previously examined. This (informal)
argument shows that when all the terms
have been examined, max equals the value
of the largest term. (A rigorous proof of
this requires techni

positive integers to the set of positive
integers that is both one-to-one and onto.
d) Give an example of a function from the
set of positive integers to the set of
positive integers that is one-to-one but
not onto. e) Give an example of a function
from t

from the same universal set, find A B, A
B, A B, and A + B (see preamble to
Exercise 61 of Section 2.2). 3. Given fuzzy
sets A and B, find A, A B, and A B (see
preamble to Exercise 63 of Section 2.2). 4.
Given a function f from cfw_1, 2,.,nto the set
of

elements a1, a2,.,an, or determine that it
is not in the list. The solution to this
search problem is the location of the term
in the list that equals x (that is, i is the
solution if x = ai) and is 0 if x is not in the
list. THE LINEAR SEARCH The first
a

part of the title of his book Kitab al-jabr
wal muquabala. This book was translated
into Latin and was a widely used
textbook. His book on the use of Hindu
numerals describes procedures for
arithmetic operations using these
numerals. European authors used

Algorithms Introduction There are many
general classes of problems that arise in
discrete mathematics. For instance: given
a sequence of integers, find the largest
one; given a set, list all its subsets; given a
set of integers, put them in increasing
ord

(x) = x4/2 e) f (x) = 2x f ) f (x) = xx 3. Use
the definition of f (x) is O(g(x) to show
that x4 + 9x3 + 4x + 7 is O(x4). 4. Use the
definition of f (x) is O(g(x) to show that
2x + 17 is O(3x ). 5. Show that (x2 + 1)/(x
+ 1) is O(x). 6. Show that (x3 + 2x

finite sets, then |A B| |A B|.
Determine when this relationship is an
equality. 11. Let A and B be sets in a finite
universal set U. List the following in order
of increasing size. a) |A|, |A B|, |A B|, |
U|, | b) |A B|, |A B|, |A|+|B|, |A B|,
| 12. Let A

solution to the problem. Definiteness. The
steps of an algorithm must be defined
precisely. Correctness. An algorithm
should produce the correct output values
for each set of input values. Finiteness. An
algorithm should produce the desired
output after a

each, namely, 12 13 15 16 18 19 20 22.
Because 16 < 19 (comparing 19 with the
largest term of the first list) the search is
restricted to the second of these lists,
which contains the 13th through the 16th
terms of the original list. The list 18 19 20
22

Show that 2 3 1 121 1 1 3 is the
inverse of 7 8 5 4 5 3 1 1 1 .
19. Let A be the 2 2 matrix A = a b c d .
Show that if ad bc = 0, then A1 =
d ad bc b ad bc c ad bc a ad bc
. 20. Let A = 1 2 1 3 . a) Find A1.
[Hint: Use Exercise 19.] b) Find A3. c)
Find

computer program in some programming
language that finds its values
uncomputable function: a function for
which no computer program in a
programming language exists that finds
its values continuum hypothesis: the
statement there no set A exists such that

the defi- nition of the inverse image of a
set found in the preamble to Exercise 42,
both in Section 2.3. 16. Suppose that f is
a function from the set A to the set B.
Prove that a) if f is one-to-one, then Sf is a
one-to-one function from P(A) to P(B). b

integers, that generate all the orderings of
a finite set, that find the shortest path
between nodes in a network, and for
solving many other problems. We will also
introduce the notion of an algorithmic
paradigm, which provides a general
method for desig

there are no integers left in the sequence.
The temporary maximum at this point is
the largest integer in the sequence. An
algorithm can also be described using a
computer language. However, when that
is done, only those instructions permitted
in the lang

for |A B|, where A and B are sets. 4. a)
Define the power set of a set S. b) When is
the empty set in the power set of a set S?
c) How many elements does the power set
of a set S with n elements have? 5. a)
Define the union, intersection, difference,
and

third column of A? c) What is the second
row of A? d) What is the element of A in
the (3, 2)th position? e) What is At ? 2.
Find A + B, where a) A = 104 122 0
2 3 , B = 135 2 2 3 2 3 0 .
b) A = 1 05 6 4 3 5 2 , B = 3 9 3 4
0 2 1 2 . 3. Find AB if a) A = 2

can be shown to be transcendental and
for which famous numbers is it still
unknown whether they are
transcendental? 6. Expand the discussion
of the continuum hypothesis in the text.
P1: 1 CH02-7T Rosen-2311T MHIA017Rosen-v5.cls May 13, 2011 10:24 190 P1:

Let Hn be the nth harmonic number Hn =
1 + 1 2 + 1 3 + 1 n . Show that Hn is
O(log n). [Hint: First establish the
inequality n j=2 1 j < n 1 1 x dx by
showing that the sum of the areas of the
rectangles of height 1/j with base from j
1 to j , for j = 2,

term algorithm is a corruption of the
name al-Khowarizmi, a mathematician of
the ninth century, whose book on Hindu
numerals is the basis of modern decimal
notation. Originally, the word algorism
was used for the rules for performing
arithmetic using deci

functions such that f (x) is o(g(x) and c is
a constant, then cf (x) is o(g(x), where (cf
)(x) = cf (x). b) Show that if f1(x), f2(x),
and g(x) are functions such that f1(x) is
o(g(x) and f2(x) is o(g(x), then (f1 + f2)
(x) is o(g(x), where (f1 + f2)(x) =

O(g(x) and g(x) is O(h(x). Show that f
(x) is O(h(x). 18. Let k be a positive
integer. Show that 1k + 2k + nk is
O(nk+1). 19. Determine whether each of
the functions 2n+1 and 22n is O(2n). 20.
Determine whether each of the functions
log(n + 1) and log(n2

real numbers to the set of positive real
numbers, then f1(x) + f2(x) is (g(x). Is
this still true if f1(x) and f2(x) can take
negative values? 44. Suppose that f (x),
g(x), and h(x) are functions such that f (x)
is (g(x) and g(x) is (h(x). Show that f (x)

determines whether a compound
proposition in n variables is satisfiable by
checking all possible assignments of truth
variables is an algorithm with exponential
complexity, because it uses (2n)
operations. Finally, an algorithm has
factorial complexity if