Upload
juanjo23
View
135
Download
2
Tags:
Embed Size (px)
Citation preview
Solving 0-1 knapsack problems
based on amoeboid organism
algorithm
Xiaoge Zhang, Shiyan Huang, Yong Hu, YajuanZhang, Sankaran Mahadevan, Yong Deng
Juan José Miramontes Sandoval
Modelos de Sistemas de Software
1
Tabla de Contenido
• 0-1 Knapsack problem
• Amoeboid organism
• Proposed method
▫ Example with 4 items
▫ Example with 8 items
• Experimental results
• Conclusiones
2
0-1 Knapsack Problem
Given a set of items, each witha weight and a value, determinethe count of each item toinclude in a collection so thatthe total weight is less than orequal to a given limit and thetotal value is as large as
possible.
Combinatorial optimization problem
3
K. Pepper. Nakagaki. (2007). Knapsack Taken from: http://en.wikipedia.org/wiki/Knapsack_problem
0-1 Knapsack Problem
• Capital budgeting problems
• Loading problems
• Resource allocation
• Project selection problems
and can be found as a sub problem of other more general models
This model is widely used in real-life applications:
5
Amoeboid organism
6
P. Monzon. Alimentación Ameba. Taken from: http://vidadeamebas.blogspot.mx/
• Is a type of cell or organism which has the ability to alter its shape.
• Lacking cell wall.
• Capture food through movement.
Proposed method
• Recently, it is shown that anamoeboid organism can find theshortest path between twoselected points in a labyrinth.
A new method using the amoeboid organismmodel is propose to solve the 0-1 knapsackproblem
7
T. Nakagaki. (2001). Tracking the shortest path in a maze by the plasmodium.
Effective method to solve optimization problems
Proposed method
Example:
Knapsack capacity: W = 6
vj is the value of item j
wj is the weight of item j
9
j 1 2 3 4
vj40 15 20 10
wj4 2 3 1
3.- Finding the shortest path based on the amoeboid organism algorithm:Step 1. Remove the edges with conductivity equal to zero.Step 2. Calculate the pressure of each node using each node’s current conductivity and length.Step 3. Use the pressure of each node obtained from step 2 to calculate each node’s conductivity.Step 4. Judge whether each edge’s conductivity is 1, if not, go to step 5; otherwise go to step 7.Step 5. According to the current flux and conductivity, calculate the flux and conductivity next time.Step 6. Return to step 1.Step 7. Get the result and the algorithm is over.
13
Proposed method
• According to the network converting algorithm shown previously, there are 𝐖+ 𝟏 ∗ 𝒏 + 𝟐items in the converted network.
• For the amoeboid organism algorithm,regardless of the algorithm’s outer iterations, itsmain time is spent on solving the linearequations and its complexity is 𝑶(𝒏𝟑)
Then, the complexity of the of the proposed
method is: 𝐎 ( 𝑾+ 𝟏 ∗ 𝒏 + 𝟐)𝟑 = 𝑶(𝒏𝟑)
14
Complexity of the proposed method
Proposed method
Example with 8 items:
Knapsack capacity: W = 8
vj is the value of item j
wj is the weight of item j
15
j 1 2 3 4 5 6 7 8
vj83 14 54 79 72 52 48 62
wj 3 2 3 2 1 2 2 3
Experimental results
19
J 1 2 3 4 5 6 7 8
vj83 14 54 79 72 52 48 62
wj 3 2 3 2 1 2 2 3
Result of knapsack problem with 8 Items:
Six test problems with different dimensions are used to study the performance of the proposed method:
Conclusions
• Based on amoeboid organism algorithm and thenetwork converting algorithm, a new method isproposed to solve classical 0-1 knapsackproblems.
• Using benchmark problems to test the amoeboidorganism algorithm, the computational resultsdemonstrate the efficiency of the presentedapproach.
20