dynamic programming the elements of the quadruple area set of items to be takenthe list of items for which decision has not been madethe total value of the items in the set of items to be taken (this is merely an optimizationsince the value could be computed from the set)and the remaining space in the knapsack (againthis is an optimization since it is merely the difference between the weight allowed and the weight of all the items taken so far the tree is built top-down starting with the root one element is selected from the still-to-be-considered items if there is room for that item in the knapsacka node is constructed that reflects the consequence of choosing to take that item by conventionwe draw that node as the left child the right child shows the consequences of choosing not to take that item the process is then applied recursively until either the knapsack is full or there are no more items to consider because each edge represents decision (to take or not to take an item)such trees are called decision trees figure is table describing set of items figure is decision tree for deciding which of those items to take under the assumption that the knapsack has maximum weight of name value weight figure table of items with values and weights it may seem odd to put the root of tree at the topbut that is the way that mathematicians and computer scientists usually draw them perhaps it is evidence that those folks do not spend enough time contemplating nature decision treeswhich need not be binaryprovide structured way to explore the consequences of making series of sequential decisions they are used extensively in many fields