Preview

The 0-1 Knapsack Problem (KP)

Powerful Essays
Open Document
Open Document
2736 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
The 0-1 Knapsack Problem (KP)
2.1 The 0-1 Knapsack Problem (KP)
The Knapsack Problem is a combinatorial optimization problem, which search out a best solution from among many other feasible solutions. It is concerned with a fixed size knapsack that has positive integer capacity (or volume) V. There are n numbers of distinct items that may potentially be placed in the knapsack. Item i has a positive integer capacity(volume) Vi and integer benefit Bi. In addition, there are Qi quantity of item i available, where quantity Qi is a integer with positive value satisfying 1 ≤ Qi ≤∞.
Let Xi determines how many quantity of item i are to be filled into the knapsack. The aim is to:
Maximize
N
∑ Bi Xi i = 1

Subject to the constraints
N
∑ Vi Xi ≤V i = 1

And
0 ≤ Xi ≤Qi

If one or
…show more content…
A state space tree is a rooted tree where each level represents a choice in the solution space that depends on the level above and any possible solution is represented by some path starting out at the root node and ending at a leaf node. The root node, by definition, has level 0 and represents the state where no partial solution has been made. A leaf has no offspring and represents the state where all choices making up a solution have been made. In the context of the Knapsack problem, if there are N possible items to choose from, then the kth level represents the state where it has been decided which of the first k items have or have not been filled into the knapsack also there are 2k nodes on the kth level and the state space tree’s leaves are all on level N …show more content…
Outline of basic GA s
1. Start: Randomly generate a population of N chromosomes.
2. Fitness: Calculate the fitness of all chromosomes.
3. Create a new population:
a. Selection: Randomly select 2 chromosomes from the population.
b. Crossover: Perform crossover on the 2 chromosomes selected.
c. Mutation: Perform mutation on the chromosomes obtained.
4. Replace: Replace the current population with the new population.
5. Test: Test whether the end condition is satisfied. else stop. If not, return in current population and go to Step 2.
Each repetition of this process is called generation. The entire generation sets are called a run. [14][16].
Complexity
The complexity of the genetic algorithm depends on the number of items (N) and the number of chromosomes in each generation (Size). It is

You May Also Find These Documents Helpful

  • Good Essays

    Food Booth Case Study

    • 1116 Words
    • 5 Pages

    As she has only $1500 for purchasing food articles, and the cost of all the articles cannot exceed this amount of $1500, the constraint can be expressed as…

    • 1116 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    MAT540 - Quiz 5

    • 821 Words
    • 4 Pages

    In a 0-1 integer programming problem involving a capital budgeting application (where xj = 1, if project j is selected, xj = 0, otherwise) the constraint x1 - x2 ≤ 0 implies that if project 2 is selected, project 1 can not be selected.…

    • 821 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Step 6: To be able to continue the experiment for further generations, the population must be first restored back to 50 individuals. For example, if 20 lethal genes were removed from the population, replace these with 20 normal genes so the population will remain at 50 individuals throughout the generations.…

    • 550 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Beginning the introduction with a definition or metaphor of an Invisible Knapsack is powerful and fully agree with the idea of viewing the unprivileged. We are grown to believe every race is equal. We have the same opportunities are capable of achieving the same goal. When in reality it is the Invisible Knapsack that protects the idea of “equality.” When introducing the Knapsack it enables a better perspective of advantages.…

    • 415 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mat 540 Quiz 5

    • 1011 Words
    • 5 Pages

    The solution to the linear programming relaxation of a minimization problem will always be __________ the value of the integer programming minimization problem.…

    • 1011 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    B. Verify that the value derived in part (a) is consistent with the optimal stocking quantity in the…

    • 850 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Knapsack Narrative

    • 1974 Words
    • 8 Pages

    Today I was dropped off by my crew, to start the survival series, where I will have to live in the wilderness and use the materials around for 11 days, with a camera in front of my head. I only came with an empty knapsack to carry the materials that I’ll find during this series. There are two rules for the series, I have to move to another shelter everyday and you can only bring things in your knapsack, you can’t just carry them, so it will be more exciting for the viewers to watch. I started by ripping off some branches from the trees nearby and went to settle under that small overhang near the mountain. I gathered some rocks that contained some quartz near the river, and broke them in half by smashing them into other rocks, then I smashed the parts together and got sparks which started a fire. After creating a fire, I went out to see if there are any food, I found a good amount of blueberries which can last me a while because it can satisfy my thirst too. I gathered some fallen leaves and slept on them.…

    • 1974 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Miss Tilburg

    • 1009 Words
    • 5 Pages

    his case deals with strategic planning issues for a large company. The main issue is planning the company’s production capacity for the coming year. At issue is the overall level of capacity and the type of capacity—for example, the degree of flexibility in the manufacturing system. The main tool used to aid the company’s planning process is a mixed integer linear programming (MILP) model. A mixed integer program has both integer and continuous variables.…

    • 1009 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Mba 6205 Assignment 1

    • 891 Words
    • 4 Pages

    6-Consider the (Q,R) policy analyzed in Section 2.2.6. Explain why the expected level of inventory before receiving the order is Z x STD x √L. While the expected level of inventory immediately after receiving the order is Q + z x STD x √L…

    • 891 Words
    • 4 Pages
    Better Essays
  • Powerful Essays

    A common form of the product-mix linear programming seeks to find the quantities of items in the product mix that maximizes profit in the presence of limited resources.…

    • 1510 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    The Invisible Knapsack

    • 1013 Words
    • 5 Pages

    It is easy for me to walk into a stationery store and find a greeting card appropriate for my family or most of my friends. But recently, my husband and I wanted to send a card to dear friends who just had a baby girl. But we had a challenging experience finding the right card. The problem was not in the lack of congratulatory messages, but in the lack of cards which properly identify with our friends. Our friends are African American. It is also heartbreaking to notice that their birth announcement portrays a sketch of a white baby; they, too, had a hard time finding an appropriate greeting.…

    • 1013 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Step # 5 – Calculate the test statistic, arrive at a decision, and state a conclusion:…

    • 658 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Homework 1

    • 1341 Words
    • 6 Pages

    4. State the value of x after the statement if P(x) then x := 1 is executed, where P(x) is the statement “x > 1,” if the value of x when this statement is reached is…

    • 1341 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    The algorithm begins with multi-population of randomly generated chromosomes. These chromosomes undergo the operations of selection, crossover and mutation. Crossover combines the information from two parent chromosomes to produce new individuals, exploiting the best of the current generation, while mutation or randomly changing some of the parameters allows exploration into other regions of the solution space. Natural selection via a problem specific cost function assures that only the best fit chromosomes remain in the population to mate and produce the next generation. Upon iteration, the genetic algorithm converges to a global solution.…

    • 5119 Words
    • 21 Pages
    Powerful Essays
  • Good Essays

    1. Discuss in words or contrast in graphical/sketch form the differences of Prokaryotic cells from the Eukaryotic cells.…

    • 533 Words
    • 3 Pages
    Good Essays