Question 10 Consider the following weighted graph. Weights of edges are given in parentheses. h(6) a(8) b(7) е (3) c(9) Which of the following sets of edges is a minimum spanning tree? A. b,e.g.h B. b.d.f.g C. a, d, e,h D. a,b, h, g E. b,d, e,g f(5) d(4) g(2)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Question 10
Consider the following weighted graph. Weights of edges are given in parentheses.
h(6)
a(8)
b(7)
е (3)
(9)
Which of the following sets of edges is a minimum spanning tree?
A. b, e.g.h
B. b,d, f.g
C. a, d, e, h
D. a,b, h,g
E. b, d, e,g
f(5)
d(4)
g(2)
Transcribed Image Text:Question 10 Consider the following weighted graph. Weights of edges are given in parentheses. h(6) a(8) b(7) е (3) (9) Which of the following sets of edges is a minimum spanning tree? A. b, e.g.h B. b,d, f.g C. a, d, e, h D. a,b, h,g E. b, d, e,g f(5) d(4) g(2)
Question 6
The worst-case run-time to change the priority of a heap element is:
A. e(n logn)
B. O(n)
C. e(1)
D. e(logn)
E. O(n)
Question 7
Consider a maximum heap, represented by an array: 52, 42, 32, 22, 27, 28, 29, 20, and
16. Now consider that a value 47 is inserted into this heap. What is the new heap after
the insertion?
A. 52, 42, 32, 22, 27, 28, 29, 20, 16, 47
В. 52, 47, 32, 42, 27, 28, 29, 22, 16, 20
C. 52, 42, 32, 22, 47, 28, 29, 20, 16, 27
D. 52, 47, 32, 22, 42, 28, 29, 20, 16, 27
E. 52, 47, 32, 42, 27, 28, 29, 22, 20, 16
Question 8
The output of an in-order traversal of a binary tree is 1,2.3,4.5.6, and the output of pre-
order traversal of the same binary tree is 6,1.4.2.3,5. what is the output of the post-order
traversal of the same binary tree?
A. 3,1,4,5,2,6
B. 3,2,4,5,1.6
C. 3,2,5,4,1.6
D. 1,2,4.6,5,3
E. 3,2,5,1.4.6
Question 9
Given an array A storing n elements. Which one of the following statements is true?
A. Heap sort is always the slowest algorithm in practice to sort A.
B. Shell sort is always the fastest algorithm in practice to sort A.
C. If A is almost sorted, selection sort should be used.
D. If A is sorted using selection sort, the best case and worst case run-time complexity
are the same.
E. If A is so large that it does not fit into the main memory, quick sort should be used.
Transcribed Image Text:Question 6 The worst-case run-time to change the priority of a heap element is: A. e(n logn) B. O(n) C. e(1) D. e(logn) E. O(n) Question 7 Consider a maximum heap, represented by an array: 52, 42, 32, 22, 27, 28, 29, 20, and 16. Now consider that a value 47 is inserted into this heap. What is the new heap after the insertion? A. 52, 42, 32, 22, 27, 28, 29, 20, 16, 47 В. 52, 47, 32, 42, 27, 28, 29, 22, 16, 20 C. 52, 42, 32, 22, 47, 28, 29, 20, 16, 27 D. 52, 47, 32, 22, 42, 28, 29, 20, 16, 27 E. 52, 47, 32, 42, 27, 28, 29, 22, 20, 16 Question 8 The output of an in-order traversal of a binary tree is 1,2.3,4.5.6, and the output of pre- order traversal of the same binary tree is 6,1.4.2.3,5. what is the output of the post-order traversal of the same binary tree? A. 3,1,4,5,2,6 B. 3,2,4,5,1.6 C. 3,2,5,4,1.6 D. 1,2,4.6,5,3 E. 3,2,5,1.4.6 Question 9 Given an array A storing n elements. Which one of the following statements is true? A. Heap sort is always the slowest algorithm in practice to sort A. B. Shell sort is always the fastest algorithm in practice to sort A. C. If A is almost sorted, selection sort should be used. D. If A is sorted using selection sort, the best case and worst case run-time complexity are the same. E. If A is so large that it does not fit into the main memory, quick sort should be used.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY