1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
likoan [24]
3 years ago
15

Andy is trying to put together a holiday gift knapsack (with W=8) for Sarah. He has n items to choose from, each with infinitely

many copies (aka. knapsack with repetitions). Item i has weight wi, and value vi. Andy wants to pick some items (possibility with duplicates) so their total weight is exactly W, while minimizing the total value of the items picked. If OPT(w) denotes the minimum total value needed to make a weight of w, for every 0 ≤ w ≤ W, (i) write the recursive formula for finding OPT(w) and (ii) compute the values of OPT(1) . . . OPT(8) for the following three items: (w1 = 1, v1 = 3), (w2 = 3, v2 = 2), (w3 = 4, v3 = 3).
Computers and Technology
1 answer:
Sever21 [200]3 years ago
3 0

Answer:

See explaination

Explanation:

Given 3 items: {w1 = 1, v1 = 3}, {w2 = 3, v2 = 2}, {w3 = 4, v3 = 3}

Hence OPT(1) = 3, OPT(3) = 2, OPT(4) = 3

Recursive formula for OPT(k) to minimize value is

OPT(k) = INFINITE if k <= 0

= min(3 + OPT(k-1), 2 + OPT(k-3), 3 + OPT(k-4))

Let us calculate OPT(1) to OPT(8)

OPT(1) = 3

OPT(2) = min ( 3 + OPT(1), 2 + OPT(-1), 3 + OPT(-2)) = 6

OPT(3) = 2

OPT(4) = 3

OPT(5) = min ( 3 + OPT(4), 2 + OPT(2), 3 + OPT(1)) = min(6, 8, 6) = 6

OPT(6) = min ( 3 + OPT(5), 2 + OPT(3), 3 + OPT(2)) = min(9, 4, 9) = 4

OPT(7) = min ( 3 + OPT(6), 2 + OPT(4), 3 + OPT(3)) = min(7, 5, 5) = 5

OPT(8) = min ( 3 + OPT(7), 2 + OPT(5), 3 + OPT(4)) = min(8, 8, 6) = 6

You might be interested in
On the server side, the database environment must be properly configured to respond to clients' requests in the fastest way poss
Paraphin [41]

Answer:

<em>DBMS Performance </em>

Explanation:

Database tuning <em>defines a range of activities that are used to maximize and homogenize a database's output.</em>

This typically coincides with query tuning, but applies to database file layout, DBMS software selection, and database environment setup (operating system, CPU).

Database tuning helps to optimize the use of machine resources in order to carry out work as efficiently and quickly as possible.

Many systems are built to handle their use of system resources, but there is still plenty of space for enhancing their performance by tailoring their server and DBMS settings and configuration.

5 0
3 years ago
______was developed as an interim management protocol with OSI as the ultimate network management protocol.
RSB [31]

Answer:

Simple Network Management Protocol

Explanation:

Simple Network Management Protocol otherwise referred to as SNMP is a form of computer protocol that is mainly used in obtaining and regulating information relating to connected gadgets. It is practically based on the internet and was originally planned as an interim protocol.

Hence, it can be concluded that the Simple Network Management Protocol was developed as an interim management protocol with OSI as the ultimate network management protocol.

4 0
3 years ago
How to delete account on this
qwelly [4]

Answer:

Explanation:

Go and edit your profile then go on prefernces you will see that its written delete my account and that's how you delete your account on brainly.com and if you want to delete you account on phone then

Open your phone's Settings app.

Tap Accounts. If you don't see "Accounts," tap Users & accounts.

Tap the account you want to remove Remove account.

If this is the only Google Account on the phone, you'll need to enter your phone's pattern, PIN, or password for security.

Hope this helped you!

5 0
2 years ago
Read 2 more answers
How do I mark someone brainiest
svet-max [94.6K]

Answer:

when someone answers your questio correctly, you will see a red crown. Click on that and mark them the most brainiest

Explanation:

3 0
2 years ago
Read 2 more answers
How to turn off life360 without parents knowing on iphone
taurus [48]

Answer: Launch AnyGo. Once you download the AnyGo latest version, you can double click on the setup and install it on your PC.

Connect iPhone to the PC. Now take your iPhone and connect to the PC that you installed, AnyGo. ...

Check the current location. ...

Find the destination. ...

Teleport to the location. ...

6 0
2 years ago
Other questions:
  • based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
    8·1 answer
  • When you park facing downhill and there is a curb, turn your wheels _____ the curb. When you park facing uphill and there is a c
    13·2 answers
  • Which scenario is invalid for execution by unit Tests? A. Executing test scenarios for negative test scenarios.B. Executing meth
    5·1 answer
  • Name three recent advances that are influencing OS design.
    15·1 answer
  • Help with this quiz question thank you!
    12·2 answers
  • Ken is a mobile app developer. He is designing a mobile app that offers tips and guidance to people interested in learning jazz
    8·2 answers
  • Assessment
    12·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    13·1 answer
  • What’s cloud-based LinkedIn automation?
    14·1 answer
  • 4. Ernesto works in a small office with five other people. What are two possible connection
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!