image

THE KNAPSACK PROBLEM

In this chapter, we investigate the well-known knapsack problem, with Fibonacci and Lucas numbers as weights.

Let c028-math-001 denote the c028-math-002th gibonacci number. Recall from Chapter 7 that

equation

Consequently,

28.1 equation

We will use this result in our discussion.

28.1 THE KNAPSACK PROBLEM

Given a knapsack of integer volume c028-math-004, and n items of integer volumes c028-math-005, which of the items can fill the knapsack?

In other words, given the positive integers c028-math-006, called weights, and a positive integer c028-math-007, solve the linear diophantine equation (LDE) , where or 1. This is the well-known knapsack problem.

In particular, ...

Get Fibonacci and Lucas Numbers with Applications, Volume 1, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.