Skip to content

Dichotomic method (part of the Network programming method) of Vladimir N. Burkov for solving the knapsack problem

Notifications You must be signed in to change notification settings

moskvo/dicho-method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dicho-method

The knapsack problem:

  1. values (p), weights (w) and the knapsack capacity (c) are nonnegative integers.
  2. the problem is to maximize sum(pi*xi) while sum(wi*xi)<=c, over xi belonging to {0,1}.

Command to compile:
mpicc -o solver dichosolver.c burkov.c task.c -I./headers -lm

Command to run:
srun -n90 solver knaproblem.txt

Format of input file:
<knapsack size>
<number of items>
<items' values>
<items' weights>

About

Dichotomic method (part of the Network programming method) of Vladimir N. Burkov for solving the knapsack problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages