Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 1 ( 2 0 points ) . Let G = ( V , E ) be a connected, undirected graph with real number edge

Q1(20 points).
Let G=(V,E) be a connected, undirected graph with real number edge weights. Also assume that all edge weights are distinct.
a.(5 pts) Does the min-weight edge of G have to be on Minimum Spanning Tree (MST) of G?
b.(5 pts) Can the max-weight edge of G belong to MST?
c.(5 pts) Adding the same positive value to every edge of G can change MST or not?
d.(5 pts) Adding the same positive value to every edge of G can change shortest path between two vertices or not?
For all question above, do not leave your answer as YES or NO. Discuss the situation with examples (by drawing simple graphs). If you can, prove your answer by contradiction or counter-examples. For some questions, answer may change at different conditions. If so, please discuss the answer separately for all different cases.
Q2(30 points).
Remember the rod cutting problem, the following is an instance of it:
\table[[length i,1,2,3,4,5,6,7,8,9,10],[price pi,1,4,8,9,10,17,18,22,22,30]]
a.(15 pts) Define the density of a rod of length i to be pli, that is, value per inch. A greedy strategy for cutting a rod of length n cuts first the piece with the highest density.
b.(15 pts) Show by a counterexample (at least for one n) that this greedy strategy does not always determine an optimal way to cut rods.
Q3(50 points).
a)(35 pts) Build an AVL tree after successively inserting the keys: 91,33,64,75,27,13,73,60,89,87,20,9,12,25,26,79,74,5. Show and explain every iteration.
b)(15 pts) Traverse the tree you build in-order, pre-order, and post-order.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions

Question

Explain the factors that determine the degree of decentralisation

Answered: 1 week ago

Question

What Is acidity?

Answered: 1 week ago

Question

Explain the principles of delegation

Answered: 1 week ago

Question

State the importance of motivation

Answered: 1 week ago

Question

Discuss the various steps involved in the process of planning

Answered: 1 week ago

Question

What other blunt questions do you think would be appropriate?

Answered: 1 week ago