Problem Set 10

advertisement
Problem Set 10 solutions
Section 9.1
#18 How many vertices does a full 5-ary tree with 100 internal vertices have?
#20 How many leaves does a full 3-ary tree with 100 vertices have?
#22 A chain letter starts when a person sends a letter to five others. Each person who receives
the letter either send it to five other people who have never received it or does not send it to
anyone. Suppose that 10,000 people send out the letter before the chain ends and that no one
receives more than one letter. How many people receive the letter, and how many do not send it
out?
Section 9.2
#2 Build a binary search tree for the words oenology, phreonology, campanology, ornithology,
ichthyology, limnology, alchemy and astrology using alphabetical order.
Section 9.3
#4 Suppose the address of the vertex v in the ordered rooted tree T is 3.4.5.2.4
a) At what level is v?
b) What is the address of the parent of v?
c) What is the least number of siblings v can have?
d) What is the smallest number of vertices in T if v has this address?
Discrete Computational Structures
Sheller
discretes06ps10 – work
Spring 2006
Page 1
#8 Determine the order in which a preorder traversal visits the vertices of the given ordered
rooted tree:
#14: Determine the postorder traversal of the tree in problem 8:
#22 Draw the ordered rooted tree corresponding to each of these arithmetic expressions written
in prefix notation, then write each expression using infix notation
a) + * + - 5 3 2 1 4
b) ^ + 2 3 – 5 1
c) * / 9 3 + * 2 4 – 7 6
Section 9.4
#4 Find a spanning tree for the graph shown by removing edges in simple circuits
Discrete Computational Structures
Sheller
discretes06ps10 – work
Spring 2006
Page 2
#14 Use a depth-first search to produce a spanning tree for the given simple graph, choosing a as
the root of the spanning tree and assuming vertices are ordered alphabetically:
#16 Use a breadth-first search starting with a as root to build a spanning tree:
Section 10.1
#2 Find the values, if any, of the Boolean variable x that satisfy the following equations:
a) x  1 = 0
b) x + x = 0
c) x  1 = x
d) x  x = 1
#18 Use a truth table to the distributive law: x + yz = (x + y)(x + z)
#26 Find the duals of the following Boolean expressions:
a) x + y
b) x  y
c) x y z + x  y  z
d) x z + x  0 + x  1
Discrete Computational Structures
Sheller
discretes06ps10 – work
Spring 2006
Page 3
Section 10.2
#4 Find the sum-of-products expansions of the Boolean function F(x,y,z) that equals 1 if and
only if:
a) x = 0
b) xy = 0
c) x + y = 0
d) xyz = 0
Discrete Computational Structures
Sheller
discretes06ps10 – work
Spring 2006
Page 4
Download