Computers and Technology

Problem 1 In one of the national parks the park administration wants to set up warning signs to inform tourists that they should check themselves for ticks after their hike. The park has a number of recommended routes, each of which touch some points of interest (POI). Different routes may contain the same POI. The signs will be placed at the POIs. The park wants to put up as few signs as possible, but in such a way that each route contains at least one sign. There are a total of n POIs and m routes.

(a) (5 points) Assume that you are given a "black-box" machine that can answer certain questions instantaneously. You can post to it the routes (as POI sequences) and a number k, and then the machine will output "yes" if there is a set of k locations for the signs so that each route contains some. Otherwise it returns "no". (It will not tell you the exact locations though.) Show an algorithm that can use polynomial number of calls to this machine and finds the minimum number k of signs required.

(b) (10 points) In class, you have learned about a problem called the set cover problem. Show that the sign placement problem is equivalent to the set cover problem, in the following way. Give a reduction of the sign placement problem to the set cover problem, and also a reduction from of the set cover problem to the sign placement problem.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:10, brylove603
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately. next, the program determines and prints the prime factorization of the product, listing the factors in increasing order. if a prime number is not a factor of the product, then it must not appear in the factorization. sample runs are given below. note that if the power of a prime is 1, then that 1 must appear in t
Answers: 3
image
Computers and Technology, 22.06.2019 22:40, nsuleban9524
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, carter1809
Choose the answers that best complete each sentence. on average, are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
image
Computers and Technology, 24.06.2019 00:50, JakeCline
Which of the following is not a key player in the sale of travel products?
Answers: 2
Do you know the correct answer?
Problem 1 In one of the national parks the park administration wants to set up warning signs to info...

Questions in other subjects:

Konu
Mathematics, 29.04.2021 21:40
Konu
Mathematics, 29.04.2021 21:40
Konu
Mathematics, 29.04.2021 21:40