from Techopedia

Computer vision (CV) is the subcategory of artificial intelligence (AI) that focuses on building and using digital systems to process, analyze and interpret visual data. The goal of computer vision is to enable computing devices to correctly identify an object or person in a digital image and take…View Full Term

By clicking sign up, you agree to receive emails from Techopedia and agree to ourTerms of UseandPrivacy Policy.

The knapsack problem is an optimization problem used to illustrate both problem and solution. It derives its name from a scenario where one is constrained in the number of items that can be placed inside a fixed-size knapsack. Given a set of items with specific weights and values, the aim is to get as much value into the knapsack as possible given the weight constraint of the knapsack.

The knapsack problem is an example of a combinational optimization problem, a topic in mathematics and computer science about finding the optimal object among a set of objects. This is a problem that has been studied for more than a century and is a commonly used example problem in combinatorial optimization, where there is a need for an optimal object or finite solution where an exhaustive search is not possible. The problem can be found real-world scenarios like resource allocation in financial constraints or even in selecting investments and portfolios. It also can be found in fields such as applied mathematics, complexity theory, cryptography, combinatorics and computer science. It is easily the most important problem in logistics.

In the knapsack problem, the given items have two attributes at minimum an items value, which affects its importance, and an items weight or volume, which is its limitation aspect. Since an exhaustive search is not possible, one can break the problems into smaller sub-problems and run it recursively. This is called an optimal sub-structure. This deals with only one item at a time and the current weight still available in the knapsack. The problem solver only needs to decide whether to take the item or not based on the weight that can still be accepted. However, if it is a program, re-computation is not independent and would cause problems. This is where dynamic programming techniques can be applied. Solutions to each sub-problem are stored so that the computation would only need to happen once.

An Intro to Logic Trees and Structured Programming

New Technologies That Are Older Than You Think

How Graph Databases Bring Networking to Data

Naming Conventions: Whats the Big Deal?

7 Reasons Why You Need a Database Management System

Best Artificial Intelligence Learning Resources Online in 2021

7 Women Leaders in AI, Machine Learning and Robotics

Tech moves fast! Stay ahead of the curve with Techopedia!

Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.

By:Claudio ButticeData Analyst, Contributor

By:Dmitry BaraishukPartner and CTO of Belitsoft

By:Devin PartidaEditor-in-Chief for

Techopedia™ is your go-to tech source for professional IT insight and inspiration. We aim to be a site that isnt trying to be the first to break news stories, but instead help you better understand technology and we hope make better decisions as a result.

Copyright © 2021 Techopedia Inc. -Terms of UsePrivacy PolicyEditorial Review Policy

By clicking sign up, you agree to receive emails from Techopedia and agree to ourTerms of UsePrivacy Policy.

Techopedia is a part ofJanalta Interactive.