It's UWAweek 19

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Algorithms, Agents and Artificial Intelligence.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 292 articles.
Currently 10 other people reading this forum.


SVG not supported

Login to reply

👍?
helpful
10:42pm Wed 2nd Aug, ANONYMOUS

Hello, I was practicing the knapsack problem and I think I might be doing something wrong. So in the formula:
> V(m,w) = max(V(m-1,w-wm) + vm, V(m-1,w))
And using the example provided in the slides, when I go to do cell V(2,1) I end up getting numbers such that
> V(2-1,1-2) + 3
becomes
> V(1,-1) + 3
Knowing that in the example, the cell is filled in with 2 and that
> V(2-1,1) = 2
does this mean that the first part of the max comparison is considered undefined as there is no such index for the table? Or would this be pointing to the last element of the row? Or am I doing this completely wrong? Thank you in advance.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy