Chapter 12 HW

¡Supera tus tareas y exámenes ahora con Quizwiz!

Multiple Choice Question How many people have seen a chain letter if each person who receives the letter was asked to send it out to four other people, some people do this but others do not, no one receives more than one letter, and the chain ends after 100 people have read it but did not send it out?

133

Fill in the Blank Question The value of the postfix expression 10 2 8 * + 3 - is

Blank 1: 23

Fill in the Blank Question A disconnected graph containing no simple circuits is called a (BLANK 1). Any connected component of such a graph is a (BLANK 2).

Blank 1: forest Blank 2: tree

Multiple Select Question Select all that apply Which of these statements about Kruskal's algorithm are true?

Kruskal's algorithm is a greedy algorithm. Each step of Kruskal's algorithm adds an edge with least weight that does not create a simple circuit when added to the edges already selected.

Multiple Choice Question What is the average length encoding of a letter for a Huffman code of these letters and their frequencies: A : 0.15, B : 0.25, C : 0.20, D : 0.35, E : 0.05?

2.2

Multiple Select Question Select all that apply Which of these statements about m-ary trees are true? (Select all that apply.)

A 5-ary tree of height 3 can have 125 leaves. A 6-ary tree with 217 leaves has height not less than 4. A full and balanced 8-ary tree with 513 leaves has height 4.

Multiple Select Question Select all that apply Which of these statements are true? (Select all that apply.)

A rooted tree of height 100 can have leaves at level 1 and at level 100. A rooted tree of height 12 with 22 leaves, where 20 leaves are at level 12 and 2 are at level 11, is balanced.

Multiple Select Question Select all that apply Which of these statements about trees are correct?

A tree with n vertices must have n - 1 edges. A tree must be a simple graph. A tree must be connected.

Multiple Select Question Select all that apply Which of these statements about Prim's algorithm are true?

At each step of Prim's algorithm, the edges selected so far form a tree. Prim's algorithm is a greedy algorithm. The first edge selected by Prim's algorithm is an edge with the smallest weight in the graph.

Fill in the Blank Question A vertex of a rooted tree is called a (BLANK 1) if it has no children. Vertices that have children are called (BLANK 2) vertices. If d is a vertex in a tree, the with (BLANK 3) d as its root is the subgraph of the tree containing d and its descendants and all edges incident to these descendants.

Blank 1: leaf Blank 2: internal or branch Blank 3: subtree

Fill in the Blank Question A spanning tree in a connected weighted graph that has the smallest possible sum of the weights of its edges is called a (BLANK 1) spanning tree.

Blank 1: minimum

Fill in the Blank Question The strategy for a two-party game that can be represented by a game tree that has the first player move to a position corresponding to a child of the current position with maximum value and the second player move to the position of a child with minimum value is called the (BLANK ) strategy.

Blank 1: minmax

Fill in the Blank Question We draw a curve around an ordered rooted tree beginning at the root, moving along the edges. When we list each vertex the first time the curve passes it, we obtain the (BLANK 1) traversal of the tree. When we list each vertex by listing a leaf the first time the curve passes it and listing each internal vertex the second time the curve passes it, we obtain the (BLANK 2) traversal of the tree. When we list a vertex the last time the curve passes it on the way back to its parent, we obtain the (BLANK 3) traversal of the tree.

Blank 1: preorder Blank 2: inorder Blank 3: postorder

Fill in the Blank Question A subgraph of a graph G that is a tree containing all vertices of G is called a (BLANK) tree of G.

Blank 1: spanning

Fill in the Blank Question The edges selected using depth-first search to produce a spanning tree are called (BLANK 1) edges. All other edges of the graph must connect a vertex to an ancestor or a descendant of this vertex, and are called (BLANK 2) edges.

Blank 1: tree Blank 2: back

Fill in the Blank Question Trees can be used to model two-player games where players take turns making moves, each player knows the moves made by the other player, and no element of chance enters the game. We model such games using game trees. The (BLANK 1) of these trees represent the positions that the game can be in as the game progresses. The (BLANK 2) of these trees represent legal moves between these positions.

Blank 1: vertices or nodes Blank 2: edges

Multiple Select Question Select all that apply Which of these problems can be solved by finding the minimum spanning tree of a graph?

Finding the least expensive set of fiber links to ensure that there is a connection between any two of the data centers of a company Choosing the roads connecting a group of cities to keep open during a snowstorm with least total length to ensure a route between any two cities

Multiple Select Question Select all that apply Which of these structures can be modeled using a tree?

Hierarchical organizations Saturated hydrocarbons Computer files systems (links to directories not permitted) Female members of a family tree

Multiple Select Question Select all that apply Use a depth-first search to produce a spanning tree for the simple graph. Choose c as the root of this spanning tree and assume that the vertices are ordered alphabetically. Which of these edges of the graph are in this spanning tree? (Select all that apply.)

{h, j} {f, g} {d, e}

Multiple Select Question Select all that apply Which of these statements about spanning trees are true? (Select all that apply.)

If a simple graph has a spanning tree, then it is connected. A spanning tree of a connected graph can be constructed by successively removing an edge from a simple circuit. If a connected graph has n vertices, a spanning tree of this graph must have n - 1 edges.

Multiple Select Question Select all that apply A binary search tree is constructed using alphabetical order for the words kumquat, lime, lemon, orange, grapefruit, and pomelo, starting by assigning the key kumquat to the root. Which of these words are assigned as the keys of leaves? (Select all that apply.)

Pomelo Lemon Grapefruit

Which of these codes are prefix codes? (Select all that apply.)

Represent a by 111, b by 10, c by 110, d by 01, e by 00 Represent a by 1, b by 01, c by 001, d by 0001, e by 0000

Multiple Select Question Select all that apply Which of these statements about a breadth-first search of a graph are true?

The breadth-first search algorithm uses O(e) steps to find a spanning tree of a graph with e edges. The breadth-first search algorithm uses O(n2) steps to find a spanning tree of a graph with nvertices.

Multiple Select Question Select all that apply Which of these statements about the universal address system of a tree are true?

The labeling of the root of an ordered rooted tree in the universal address system of a tree must be 0. A vertex at level n + 1 that is the third child of its parent, labeled A, has labeling A.3. The vertices of an ordered rooted tree can be totally ordered using the universal address system of the tree.

Multiple Select Question Select all that apply Which of these statements about a depth-first search and a breadth-first search in directed graphs are true? (Select all that apply.)

The output of a breadth-first search when modified to run in a directed graph may be a spanning forest rather than a spanning tree. A depth-first search of a directed graph can be used to find the strongly connected components of the graph. Web spiders use both depth-first and breadth-first search algorithms.

Multiple Select Question Select all that apply Which of these statements are part of the recursive definition of the value of a vertex in a game tree? (Select all that apply.)

The value of an internal vertex at an even level is the maximum of the value of its children. The value of a leaf is the payoff to the first player when the game ends in the position represented by this leaf. The value of an internal vertex at an odd level is the minimum of the value of its children.

Multiple Select Question Select all that apply Consider the directed graph in the image. Determine for which vertices do there exist a path from vertex h to the listed vertex by conducting either a depth-first or breadth-first search of the graph beginning at the vertex h . (Select all that apply.)

g k e


Conjuntos de estudio relacionados

Marketing- The Promotional Mix Chapter 12

View Set

Spanish 2: reading La Yusca y el imperfecto

View Set

Sexual Assault & Trauma Syndrome

View Set

Complete First - Vocabulary and grammar review Units 1 and 2 (pgs. 28-29)

View Set

Consumer Behavior - Group Influence

View Set

Exam 4 - Practice Exam (Chap. 25: The Urinary System & Chap. 26: Fluid, Electrolyte, and Acid-Base Balance)

View Set