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
  • Satisfactory Essays

    This article describes an elusive "unspoken" advantage toward white people in our society called " white privilege" which basically gives white people invisible privileges that work against people of color and keep them oppressed. It also says being oblivious to white privilege is ingrained in our culture and is kept that way by the "few groups who have most of the power already"(White Privilege,McIntosh).…

    • 337 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Mat 540 Week 9 Discussion

    • 374 Words
    • 2 Pages

    Integer programming is concerned with optimization problems in which some of the variables are required to take on discrete values. Rather than allow a variable to assume all real values in a given range, only predetermined discrete values within the range are permitted. In most cases, these values are the integers, giving rise to the name of this class of models. Models with integer variables are very useful. Situations that cannot be modeled by linear programming are easily handled by integer programming. Primary among these involve binary decisions such as yes-no, build-no build or invest-not invest. Although one can model a binary decision in linear programming with a variable that ranges between 0 and 1, there is nothing that keeps the solution from obtaining a fractional value such as 0.5, hardly acceptable to a decision maker. Integer programming requires such a variable to be either 0 or 1, but not in-between. Unfortunately integer programming models of practical size are often very difficult or impossible to solve. Linear programming methods can solve problems orders of magnitude larger than integer programming methods. A typical mathematical program consists of a single objective function, representing either a profit to be maximized or a cost to be minimized, and a set of constraints that circumscribe the decision variables. In the case of a linear program (LP) the objective function and constraints are all linear functions of the decision variables. At first glance these restrictions would seem to limit the scope of the LP model, but this is hardly the case. Because of its simplicity, software has been developed that is capable of solving problems containing millions of variables and tens of thousands of constraints.…

    • 374 Words
    • 2 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

    Step 5: Calculate the resulting percentages of homozygous normal and heterozygous normal individuals (white beads), and lethal individuals (black beads) in the population. Record the results.…

    • 550 Words
    • 3 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
  • Good Essays

    Invisible Knapsack

    • 549 Words
    • 3 Pages

    White privilege is refers to the advantages inherent in being categorized as White. White privilege is usually not something a White person can notice but more of feature that come with being in the White race. It is not a privilege that exists but it is set in motion by people and is enacted upon. As Golash- Boza points out, A privilege enjoyed by White Americans would be not being followed around in a store because they are statistically less likely to shoplift. Also a privilege pointed out that Golash- Boza explains is the fact that when you are White, people you see on the street are more likely to smile at you instead of clinching their purses.…

    • 549 Words
    • 3 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

    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
  • 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

    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
  • 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