Computers and Technology

Given a set s of integers, an integer total, and a non-negative integer budget, the subsetsumdecision problem is to report whether or not there is a subset of s, containing at most budget elements, that sums to total.

given a set s of integers, an integer total, and a non-negative integer budget, the subsetsumsearch problem is to find a subset of s, containing at most budget elements, that sums to total or to report that no such set exists.

a) suppose you have a polynomial time algorithm called ssd that solves the subsetsumdecision problem. describe, in clear and concise english, a polynomial time algorithm called sss that solves the subsetsumsearch problem. (hint: sss should call ssd multiple times.) you should not need more than five sentences or so.

b) suppose s is a set containing n integers, and that ssd(s, total, budget) is o(f( what of these is the tightest upper bound on the running time of sss(s, total, budget)?

a. o(n f(n))
b. o(f(n)^2)
c. o(f(n) log n)
d. o(f(n^2))

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, kkeith121p6ujlt
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
image
Computers and Technology, 22.06.2019 10:00, ozzy55
Create a word problem that involves calculating the volume and surface area of a three-dimensional object. cube: surface area 6 s2 , volume s3
Answers: 3
image
Computers and Technology, 22.06.2019 16:30, mesposito
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
image
Computers and Technology, 23.06.2019 04:31, mjweed3381
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
Do you know the correct answer?
Given a set s of integers, an integer total, and a non-negative integer budget, the subsetsumdecisio...

Questions in other subjects:

Konu
Mathematics, 01.07.2019 20:00