subject
Computers and Technology, 12.04.2021 22:30 Nycin

The Muddy City consists of n houses but no proper streets; instead, the different houses are connected to each other via m bidirectional muddy roads. The newly elected mayor of the city aims to pave some of these roads to ease the travel inside the city but also does not want to spend too much money on this project, as paving each road e between houses u and v has a certain cost ce (different across the muddy roads). The mayor thus specifies two conditions: • Enough streets must be paved so that everyone can travel from any house to another one using only the paved roads (you may assume that this is always possible);
• The paving should cost as little as possible.
You are chosen to help the mayor in this endeavor.
(a) Design and analyze an O(m log m) time algorithm for this problem. (10 points)
(b) The mayor of a neighboring city is feeling particularly generous and has made the following offer to Muddy City: they have identified a list of O(log m) different muddy roads in the city and are willing to entirely pay the cost of paving exactly one of them (in exchange for calling the new street after the neighboring city).
Design and analyze an O(m log m) time algorithm that identifies the paving of which of these roads, if any, the mayor should delegate to the neighboring city to further minimize the total cost-note that if you decide to pave one of the roads payed by the neighboring city, you only need to pay a cost of 1 (for making a plaque of the name of the street). (15 points)
Hint: Design an algorithm that given a MST T of a graph G, and a single edge e, in only O(m) time finds an MST T' for the graph G' obtained by changing the weight of the edge e to 1.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
"gps interaction and cognitive process" respond to the following: imagine that you have been asked to design a gps product that will have voice recognition and bluetooth capability. discuss and conceptualize a user interaction model. predict two (2) problems that may arise in gps products with voice recognition and bluetooth capability. recommend solutions for each of these issues. attention is one of the six cognition processes. when attention is applied to a design, the goal is to make it easier for the end user to quickly locate where he / she should type information on the computer or mobile device screen. compare and contrast how the google search engine and the microsoft bing search engine employ the attention cognition process. provide your opinion as to which search engine better employs the attention cognition process and explain why.
Answers: 3
You know the right answer?
The Muddy City consists of n houses but no proper streets; instead, the different houses are connect...
Questions
question
Physics, 22.09.2019 05:00
Questions on the website: 13722360