subject
Mathematics, 26.11.2019 01:31 nina1390

Given an array a = [a1, a2, . . , an] of nonnegative integers, consider the following problems: 1 p partition: determine whether there is a subset p ⊆ [n] ([n] : = {1, 2, · · · , n}) such that i∈p ai = p j∈[n]\p aj 2 subset sum: given some integer k, determine whether there is a subset p ⊆ [n] such that p i∈p ai = k 3 knapsack: given some set of items each with weight wi and value vi , and fixed numbers w and v , determine whether there is some subset p ⊆ [n] such that p p i∈p wi ≤ w and i∈p vi ≥ v for each of the following clearly describe your reduction, justify runtime and correctness.(a) find a linear time reduction from subset sum to partition.(b) find a linear time reduction from subset sum to knapsack.

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 14:50
Name the most appropriate metric unit for each measurement like a length of an carrot
Answers: 2
question
Mathematics, 21.06.2019 16:30
Amuffin recipe, which yields 12 muffins, calls for cup of milk for every 1 cups of flour. the same recipe calls for cup of coconut for every cup of chopped apple. to yield a batch of 30 muffins, how much flour will be needed in the mix?
Answers: 1
question
Mathematics, 21.06.2019 18:00
Janie has $3. she earns $1.20 for each chore she does and can do fractions of chores. she wants to earn enough money to buy a cd for $13.50. write an inequality to determine the number of chores, c, janie could do to have enough money to buy the cd.
Answers: 1
question
Mathematics, 21.06.2019 18:40
Which expression gives you the distance between the points (5,1)and(9,-6)
Answers: 2
You know the right answer?
Given an array a = [a1, a2, . . , an] of nonnegative integers, consider the following problems: 1...
Questions
Questions on the website: 13722362