Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a parts of a single problem. Please solve all three as I can not upload it by parts . Thank you sir. 26.

This is a parts of a single problem. Please solve all three as I can not upload it by parts . Thank you sir.

image text in transcribed

26. The Economic condition in BD is not good, even in DK. To reduce the operating costs, the government of DK has decided to optimize road lighting. Till now every road was lighted all night long, which costs a lot of electricity bill. To save money, they decided to no longer illuminate every road but to switch off the road lighting of some streets. To make sure that the inhabitants of DK still feel safe, they want to optimize the lighting in such a way, that after darkening some junctions at night, there will still be at least one illuminated path from every junction in DK to every other junction. What is the maximum amount of money the government of DK can save, without making their inhabitants feel unsafe? a. Write a pseudo code for this problem with a proper algorithm given the conditions with the following input & output. The algorithm should not take more than O(n log in) or O(n log n) time. Sample input: 7 11 017 0 35 Sample output: 1 28 51 139 1 47 //hint: 90-39 =51 2 4 5 3 4 15 Output Explanation: 356 For the test case print one 4 58 line containing 4 69 maximum amount the 5 6 11 government can save. the Input Explanation: The first line starts with two numbers 7 and 11, the mumber of nodes/junctions in DK, and the number of roads/edges in DK Then follow 11 integer triples x, y, z specifying that there will be a bidirectional road between x and y with total cost z. b. Draw an undirected weighted graph from the above input and show the simulation of how you got the output step by step. Mention an alternative algorithm name that can also be used to solve the above problem. C. Show the time complexity breakdown of your pseudo code

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

Eoc Only Davis Managerial Accounting

Authors: Charles E. Davis, Elizabeth Davis

2nd Edition

111883464X, 978-1118834640

More Books

Students also viewed these Accounting questions