Translate 1 0 + (0 + 1) = 0, the
equality found in Example 1, into a
logical equivalence. Solution: We
obtain a logical equivalence when we
translate each 1 into a T, each 0 into an
F, each Boolean sum into a disjunction,
each Boolean product into a
conju
built up using the basic operations of
Boolean algebra. We will provide an
algorithm for producing such
expressions. The expression that we
obtain may contain many more
operations than are necessary to
represent the function. Later in the
chapter we will
y) (x z) and x (y z) = (x y)
(x z). Showing that a complemented,
distributive lattice is a Boolean algebra
has been left as Supplementary
Exercise 39 in Chapter 9. P1: 1 CH127T Rosen-2311T MHIA017-Rosenv5.cls May 13, 2011 10:27 818 12 /
Boolean Algebra E
Once it is shown that a particular
structure is a Boolean algebra, then all
results established about Boolean
algebras in general apply to this
particular structure. Boolean algebras
can be defined in several ways. The
most common way is to specify the
pr
n variables are equal if and only if F
(b1, b2,., bn) = G(b1, b2,.,bn)
whenever b1, b2,.,bn belong to B. Two
different Boolean expressions that
represent the same function are called
equivalent. For instance, the Boolean
expressions xy, xy + 0, and xy 1 a
Boolean product xyz has the value 1 if
and only if x = y = 1 and z = 0. Similarly,
the product xyz has the value 1 if and
only if x = z = 0 and y = 1. The Boolean
sum of these two products, xyz + xyz,
represents G, because it has the value 1
if and only i
algebra, as can be seen from Table 6 in
Section 1.3. Similarly, the set of subsets
of a universal set U with the union and
intersection operations, the empty set
and the universal set, and the set
complementation operator, is a
Boolean algebra as can be s
of a 0 bit is 0.9 and the frequency of a 1
bit is 0.1 and bits occur independently.
a) Construct a Huffman code for the
four blocks of two bits, 00, 01, 10, and
11. What is the average number of bits
required to encode a bit string using
this code? b) Con
y, z) = (x + y)z = xz + yz Distributive law
= x1z + 1yz Identity law = x(y + y)z + (x
+ x)yz Unit property = xyz + xy z + xyz +
xyz Distributive law = xyz + xy z + xy z.
Idempotent law Second, we can
construct the sum-of-products
expansion by determining
limited, and so on. In Exercises 3133
find a degree-constrained spanning
tree of the given graph where each
vertex has degree less than or equal to
3, or show that such a spanning tree
does not exist. 31. a b c d f e 32. c d e a
b f g h i P1: 1 CH11-7T Ro
weight, then the edge with least weight
incident to a vertex v is included in
every minimum spanning tree. 44. Find
a minimum spanning tree of each of
these graphs where the degree of each
vertex in the spanning tree does not
exceed 2. a) b a c e f d 2 1
shown in Table 6. The identity holds
because the last two columns of the
table agree. The reader should
compare the Boolean identities in
Table 5 to the logical equivalences in
Table 6 of Section 1.3 and the set
identities in Table 1 in Section 2.2. All
a
on letter frequencies as they change as
characters are successively read, such
as adaptive Huffman coding. 8. Explain
how alpha-beta pruning can be used to
simplify the computation of the value
of a game tree. 9. Describe the
techniques used by chess-play
EXAMPLE 7 How many different
Boolean functions of degree n are
there? Solution: From the product rule
for counting, it follows that there are
2n different n-tuples of 0s and 1s.
Because a Boolean function is an
assignment of 0 or 1 to each of these 2n
dif
expressions produces their duals. The
duals are x + (y 1) and (x + 0)(yz),
respectively. The dual of a Boolean
function F represented by a Boolean
expression is the function represented
by the dual of this expression. This
dual function, denoted byFd , do
complete, because it is impossible to
express the Boolean function F (x) = x
using these operators (see Exercise
19). We have found sets containing two
operators that are functionally
complete. Can we find a smaller set of
functionally complete operators,
(x, y, z) = xy b) F (x, y, z) = x + yz c) F (x,
y, z) = xy + (xyz) d) F (x, y, z) = x(yz + y
z) 6. Use a table to express the values of
each of these Boolean functions. a) F
(x, y, z) = z b) F (x, y, z) = xy + yz c) F (x,
y, z) = xyz + (xyz) d) F (x, y, z
directed graph G to find all the vertices
reachable from a vertex v G. b)
Explain how to use breadth-first search
in Gconv to find all the vertices from
which a vertex v G is reachable.
(Recall that Gconv is the directed graph
obtained from G by reversing
is no danger of confusion, the symbol
can be deleted, just as in writing
algebraic products. Unless parentheses
are used, the rules of precedence for
Boolean operators are: first, all
complements are computed, followed
by all Boolean products, followed b
to find a minimum spanning tree of
this graph. 18. Given the list of edges
and their weights of a weighted
undirected connected graph, use
Kruskals algorithm to find a minimum
spanning tree of this graph.
Computations and Explorations Use a
computational
recursively as 0, 1, x1, x2,.,xn are
Boolean expressions; if E1 and E2 are
Boolean expressions, then E1, (E1E2),
and (E1 + E2) are Boolean expressions.
Each Boolean expression represents a
Boolean function. The values of this
function are obtained by subs
state of the circuit. In other words,
these circuits have no memory
capabilities. Such circuits are called
combinational circuits or gating
networks. We will construct
combinational circuits using three
types of elements. The first is an
inverter, which a
minterm x1x2x3x4x5 has the correct
set of values. By taking Boolean
sums of distinct minterms we can build
up a Boolean expression with a
specified set of values. In particular, a
Boolean sum of minterms has the value
1 when exactly one of the minterms in
in Section 1.3. Identities in Boolean
algebra can be used to prove further
identities. We demonstrate this in
Example 10. EXAMPLE 10 Prove the
absorption law x(x + y) = x using the
other identities of Boolean algebra
shown in Table 5. (This is called an
a
represented using the three Boolean
operators , +, and . The second
problem is: Is there a smaller set of
operators that can be used to
represent all Boolean functions? We
will answer this question by showing
that all Boolean functions can be
represented
the universal addresses of its vertices.
7. Given the ordered list of edges of an
ordered rooted tree, list its vertices in
preorder, inorder, and postorder. 8.
Given an arithmetic expression in
prefix form, find its value. 9. Given an
arithmetic expressi
faculty in 1956, where he continued
his study of information theory.
Shannon had an unconventional side.
He is credited with inventing the
rocket-powered Frisbee. He is also
famous for riding a unicycle down the
hallways of Bell Laboratories while
jugglin
exceeding 10. 7. Find a minimum
spanning tree of the graph that
connects the capital cities of the 50
states in the United States to each
other where the weight of each edge is
the distance between the cities. 8.
Draw the complete game tree for a
game of
and y = 1, or x = y = z = 0. [Hint: Take
the Boolean product of the Boolean
sums found in parts (a), (b), and (c) in
Exercise 7.] 9. Show that the Boolean
sum y1 + y2 + yn, where yi = xi or yi
= xi, has the value 0 for exactly one
combination of the value