110 likes | 125 Views
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 12, Friday, September 26. Homework. Homework (MATH 310#4F): Read 4.1. Do Exercises 3.2: 6,14,17,19,20 Volunteers: ____________ ____________ Problem: 19 . Homework #4 is due Wednesday. Theorem 3.
E N D
MATH 310, FALL 2003(Combinatorial Problem Solving)Lecture 12, Friday, September 26
Homework • Homework (MATH 310#4F): • Read 4.1. • Do Exercises 3.2: 6,14,17,19,20 • Volunteers: • ____________ • ____________ • Problem: 19. • Homework #4 is due Wednesday.
Theorem 3 • Let T be an m-ary tree of height h with l leaves. Then • (a) l · mh, and if all leaves are at height h, l = mh. • (b) h ¸d logml e, and if the tree is balanced, • h = d logml e.
Example 4 • There is a balance and there are n = 8 coins, one of which is counterfeit (too light). • How many weighings are needed? 123|678 1|3 4|5 6|8 1 2 3 4 ? 5 6 7 8
A Spanning Tree • Each connected graph has a spanning tree. • For finite graphs the proof is easy. [Keep removing edges that belong to some circuit]. • A graph has a spanning tree if and only if it is connected.
Spanning Trees – More New Terms • More new terms: • depth-first spanning tree • breadth-first spanning tree • adjacency matrix
Example 1. Testing For Connectedness • Is the undirected graph whose adjacency matrix is given on the left connected?
Example 2: Traversing a Maze • Consider the maze in Figure 3.8. on p.108. • We start a location marked with an S and seek to reach the end marked with an E. • Depth-First Search • Breadth-First Search
Example 3: Pitcher Pouring Puzzle • We are given three pitchers of water, of sizes 10 quarts, 7 quarts and 4 quarts. • Initially, the 10-quart is full and the other two pitchers are empty. • Is there a way to pour among pitchers to obtain exactly 2 quarts in one of the pitchers?
Example 4: Jealous Wives Puzzle. • Three jealous wives and three husbands come to a river. • The boat is for two people. • Find a sequence of boat trips that will get 6 people across the river without ever letting any husband to be without his wife in the presence of another wife.
A Center of a Tree T • Let T be an arbitrary tree and let r be any of its vertices. Let Tr be the tree rooted at r. Vertex r is called a center if the correspondig rooted tree Tr has minimal height. Compare Exercise 18, p. 103. 7 3 2 4 8 1 6 5