Exam 11: A: Trees

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Find a spanning tree of minimum cost for this graph. Find a spanning tree of minimum cost for this graph.

Free
(Essay)
4.7/5
(41)
Correct Answer:
Verified

The minimum weight is 24. One example of a tree is The minimum weight is 24. One example of a tree is

refer to this graph. refer to this graph.   -Using alphabetical ordering, find a spanning tree for this graph by using a depth-first search. -Using alphabetical ordering, find a spanning tree for this graph by using a depth-first search.

Free
(Essay)
4.8/5
(36)
Correct Answer:
Verified

Suppose you have 5 coins, one of which is counterfeit (either heavier or lighter than the other four). You use a pan balance scale to find the bad coin and determine whether it is heavier or lighter. (a) Prove that 2 weighings are not enough to guarantee that you find the bad coin and determine whether it is heavier or lighter. (b) Draw a decision tree for weighing the coins to determine the bad coin (and whether it is heavier or lighter) in the minimum number of weighings.

Free
(Essay)
4.8/5
(36)
Correct Answer:
Verified

(a) Two weighings yield a 3-ary tree of height 2, which has at most 9 leaves, but 5 coins require a tree with 10 leaves.
(b) Use the weighing 1 and 2 against 3 and 4 as the root. If the four coins have the same weight, weigh 1 against 5 to determine whether 5 is heavy or light. If 1 and 2 are lighter or heavier than 3 and 4, weigh 1 against 2. If 1 and 2 balance, weigh 3 against 4 to find out which of these coins is heavier or lighter; if 1 and 2 do not balance, then immediate information is obtained regarding coins 1 or 2. (The "<" symbol on an edge means that the coins in the left pan weigh less than the coins in the right pan.) (a) Two weighings yield a 3-ary tree of height 2, which has at most 9 leaves, but 5 coins require a tree with 10 leaves.  (b) Use the weighing 1 and 2 against 3 and 4 as the root. If the four coins have the same weight, weigh 1 against 5 to determine whether 5 is heavy or light. If 1 and 2 are lighter or heavier than 3 and 4, weigh 1 against 2. If 1 and 2 balance, weigh 3 against 4 to find out which of these coins is heavier or lighter; if 1 and 2 do not balance, then immediate information is obtained regarding coins 1 or 2. (The < symbol on an edge means that the coins in the left pan weigh less than the coins in the right pan.)

Find a spanning tree for the graph K3,4 using a breadth-first search. (Assume that the vertices are labeled u1,u2,u3u_{1}, u_{2}, u_{3} in one set and v1,v2,v3,v4v_{1}, v_{2}, v_{3}, v_{4} in the other set, and that alphabetical ordering is used in the search, with numerical ordering on the subscripts used to break ties.)

(Essay)
4.7/5
(38)

Use the merge sort to sort the list 3, 8, 12, 4, 1, 5, 9, 6 in increasing order.

(Essay)
4.8/5
(38)

fill in the blanks. -Every full binary tree with 45 vertices has ____ internal vertices.

(Short Answer)
4.8/5
(37)

refer to this graph. refer to this graph.   -Using reverse alphabetical ordering, find a spanning tree for the graph by using a breadth-first search. -Using reverse alphabetical ordering, find a spanning tree for the graph by using a breadth-first search.

(Essay)
4.7/5
(32)

refer to this graph. refer to this graph.   -Using the ordering C, D, E, F, G, H, I, J, A, B, C, find a spanning tree for this graph by using a breadth-first search. -Using the ordering C, D, E, F, G, H, I, J, A, B, C, find a spanning tree for this graph by using a breadth-first search.

(Essay)
4.9/5
(28)

Write the compound proposition (¬p)(q(r¬s))( \neg p ) \rightarrow ( q \vee ( r \wedge \neg s ) ) in infix notation.

(Short Answer)
4.9/5
(26)

refer to this graph. refer to this graph.   -Using alphabetical ordering, find a spanning tree for this graph by using a breadth-first search. -Using alphabetical ordering, find a spanning tree for this graph by using a breadth-first search.

(Essay)
4.8/5
(41)

There is a tree with degrees 3, 3, 2, 2, 1, 1, 1, 1.

(True/False)
4.9/5
(38)

fill in the blanks. -If each edge of Q4Q _ { 4 } has weight 1, then the cost of any spanning tree of minimum cost is ____.

(Short Answer)
4.9/5
(40)

Use backtracking to find a sum of integers in the set {18, 19, 23, 25, 31} that equals 44.

(Essay)
4.8/5
(31)

Use the merge sort to sort the list 4, 8, 6, 1, 5, 7, 3, 2 in increasing order.

(Essay)
5.0/5
(29)

The string p r q¬qpp\ r\ q \rightarrow \neg q \triangle p \rightarrow \wedge is postfix notation for a logic expression; however, there is a misprint. The triangle should be one of these three: r,V,Or¬r , V , Or \neg Determine which of these three it must be and explain your reasoning.

(Essay)
4.8/5
(31)

fill in the blanks. -The minimum number of weighings with a pan balance scale needed to guarantee that you find the single counterfeit coin and determine whether it is heavier or lighter than the other coins in a group of five coins is ____.

(Short Answer)
4.8/5
(37)

fill in the blanks. -If T is a full binary tree with 50 leaves, its minimum height is ____.

(Short Answer)
4.7/5
(41)

(a) Set up a binary tree for the following list, in the given order, using alphabetical ordering: SHE, SELLS, SEA, SHELLS, BY, THE, SEASHORE. (b) How many comparisons with words in the tree are needed to determine if the word SHARK is in the tree? (c) How many comparisons with words in the tree are needed to determine if the word SEAWEED is in the tree? (d) How many comparisons with words in the tree are needed to determine if the word SHELLS is in the tree?

(Essay)
4.9/5
(36)

fill in the blanks. -There are ____ full 3-ary trees with 6 vertices.

(Short Answer)
4.9/5
(38)

Describe the difference between Prim's algorithm and Kruskal's algorithm for finding a spanning tree of minimum cost.

(Essay)
4.9/5
(42)
Showing 1 - 20 of 94
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)