Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : ( 5 0 pts ) Consider the Differentiated Set Coverage Problem: Input: n items, U = 1 , 2 , . .

Question 1: (50 pts) Consider the Differentiated Set Coverage Problem: Input: n items, U=1,2,..., n, coverage requirements of the items = f_1, f_2,..., f_n, m sets, S_1, S_2,..., S_m, price of the sets = p_1, p_2,..., p_m. Let = x_1, x_2,..., x_m be the selection decisions of the sets, x_i in {0,1}. Output: A minimum price selection x of the sets S_1, S_2,..., S_m that can cover the items in U at least times. Ex: Let n=5 and U=1,2,3,4,5 having coverage requirements =1,2,1,2,1. Let m=5 and S_1={1,2}, S_2={2,3,4}, S_3={2,5}, S_4={3,4}, S_5={1,4} with prices =5,6,10,2,4. For instance, item j=2 in U should be covered by at least f_2=2 different sets S_i. We note that item 2 can be covered by S_1 with price p_1=5, by S_2 with price p_2=6 and by S_3 with price p_3=10.1.(20 pts) Determine a greedy selection rule for the sets. Design a greedy algorithm for the Differentiated Set Coverage Problem and report the pseudocode. 2.(10 pts) Discuss the time complexity of your greedy algorithm. Is it efficient? Can your algorithm find the optimum solution? 3.(20 pts) Implement your algorithm in Java. Use the input given in the example and report the console outputs. Report your Java code scripts.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions