brute_force_knapsack: Brute Force Knapsack

Description Usage Arguments Value

View source: R/brute_force_knapsack.R

Description

This algorithm estimates how to put available items into the knapsack in order to get the maximum possible value less than weight of knapsack. Here brute force approach is implemented that means all possible combinations of items O(2^n) are considered.

Usage

1

Arguments

x

Data frame with two numeric columns: weights and values

W

Total weight of the knapsack

parallel

logical parameter for parallel computation

Value

List with numbers of items that can be put into knapsack and maximum obtained value


faridmusayev/R_lab06 documentation built on Dec. 20, 2021, 7:44 a.m.