Computers and Technology

Gotham is being terrorized by joker, specially in night. batman has to stop him, but he can only do so if he catches joker on a well-lit street. gotham has n junctions fully-connected by m streets, but batman only has n − 1 street lights. lights are placed on streets, and a street with a light is considered well-lit. at most one light can be placed on each street.

(a) let l(e) denote the length of road e. batman senses that joker is more likely to end up on longer roads, so he wants to prioritize lighting longer roads. additionally, he wants to make sure that there is a well-lit path (a sequence of connected well-lit edges) from every junction to every other junction to make sure that all of gotham is covered. design an efficient algorithm for batman to choose which roads to light, maximizing the total length of well-lit roads under the above constraint.

(b) batman showed your algorithm to alfred, and alfred said, "know your algorithms, master wayne. this doesn’t have proof of correctness." address the concern raised by alfred.

(c) call the lit-up road network obtained in part (a) dkn (dark knight network). one of gotham’s roads e 0 has now been placed under maintenance, increasing the length of that road — the length of other roads e 6= e 0 remains the same. should batman update the placement of the n−1 street lights for his dkn? if ‘no’, justify your answer, otherwise design an efficient algorithm to compute an updated placement incorporating the road length increase

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, willowcollins3753
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
image
Computers and Technology, 22.06.2019 12:30, gerardoblk5931
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
image
Computers and Technology, 22.06.2019 23:30, elizabethburkha
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, colebuug9
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
Do you know the correct answer?
Gotham is being terrorized by joker, specially in night. batman has to stop him, but he can only do...

Questions in other subjects: