Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION - 2 Design of a network: Suppose that you are wiring a building so that all the rooms are connected via bidirectional communication wires.
QUESTION
Design of a network: Suppose that you are wiring a building so that all the rooms are
connected via bidirectional communication wires. Suppose that you can connect any two rooms
at the cost of the wire connecting the rooms, which depends on the specifics of the building
and the rooms but is always a positive real number. We can represent the possible connection
between rooms as a graph, where vertices represent rooms and weighted edges represent
possible connections along with their cost weight To minimize the cost of the wiring, you
could find a minimum spanning tree of the graph.
Design an algorithm to minimize the cost of the wiring for the network and also analyze the
algorithm by giving the results using order notation.
QUESTION
A thief breaks into a store and wants to fill his knapsack of capacity with goods of as much
value as possible. The thief's knapsack can hold and has to choose from:
gms of gold dust at Rs
gms of silver dust at Rs
gms of platinum dust at Rs
a Find what is the maximum possible solution to get more profit
b Design greedy algorithm that finds the optimal solution for the given problem.
c Is the solution return using b algorithm is it optimal? Justify
d Analyze your algorithm and give the results using order notation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started