Monadic predicate calculus: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Myasuda
m Expressiveness: avoid redirect
en>Magioladitis
problem addressed
Line 1: Line 1:
In [[theoretical computer science]], the '''continuous knapsack problem''' (also known as the '''fractional knapsack problem''') is an [[algorithm]]ic problem in [[combinatorial optimization]] in which the goal is to fill a container (the "knapsack") with fractional amounts of different materials chosen to maximize the value of the selected materials.<ref name="gt">{{citation|title=Algorithm Design: Foundations, Analysis, and Internet Examples|first1=Michael T.|last1=Goodrich|author1-link=Michael T. Goodrich|first2=Roberto|last2=Tamassia|author2-link=Roberto Tamassia|publisher=John Wiley & Sons|year=2002|contribution=5.1.1 The Fractional Knapsack Problem|pages=259–260}}.</ref><ref name="co">{{citation|title=Combinatorial Optimization: Theory and Algorithms|volume=21|series=Algorithms and Combinatorics|first1=Bernhard|last1=Korte|author1-link=Bernhard Korte|first2=Jens|last2=Vygen|publisher=Springer|year=2012|isbn=9783642244889|contribution=17.1 Fractional Knapsack and Weighted Median|pages=459–461|url=http://books.google.com/books?id=8535vmYbLGYC&pg=PA459}}.</ref> It resembles the classic [[knapsack problem]], in which the items to be placed in the container are indivisible; however, the continuous knapsack problem may be solved in [[polynomial time]] whereas the classic knapsack problem is [[NP-hard]].<ref name="gt"/>
Andrew Simcox is the name his parents gave him and he completely enjoys this name. My spouse and I live in Mississippi and I love  [http://fashionlinked.com/index.php?do=/profile-13453/info/ certified psychics] every working day residing right here. What me and my family members love is performing ballet but  accurate psychic predictions [[http://conniecolin.com/xe/community/24580 conniecolin.com]] I've been using on new things recently. Since he was eighteen he's been operating as an info officer but he plans on changing it.<br><br>Feel free to surf to my site ... free online tarot card readings - [http://chorokdeul.co.kr/index.php?document_srl=324263&mid=customer21 chorokdeul.co.kr] -
 
==Problem definition==
An instance of the either the continuous or classic knapsack problems may be specified by the numerical capacity ''W'' of the knapsack, together with a collection of materials, each of which has two numbers associated with it: the weight ''w<sub>i</sub>'' of material that is available to be selected and the value per unit weight ''v<sub>i</sub>'' of that material. The goal is to choose an amount ''x<sub>i</sub>''&nbsp;≤&nbsp;''w<sub>i</sub>'' of each material, subject to the capacity constraint
:<math>\sum_i x_i\le W</math>
and maximizing the total benefit
:<math>\sum_i x_i v_i</math>.
In the classic knapsack problem, each of the amounts ''x<sub>i</sub>'' must be either zero or ''w<sub>i</sub>''; the continuous knapsack problem differs by allowing ''x<sub>i</sub>'' to range continuously from zero to ''w<sub>i</sub>''.<ref name="gt"/>
Some formulations of this problem rescale the variables ''x<sub>i</sub>'' to be in the range from 0 to 1
 
==Solution technique==
The continuous knapsack problem may be solved by a [[greedy algorithm]], first published in 1957 by [[George Dantzig]],<ref name="co"/><ref>{{citation
| last = Dantzig | first = George B. | authorlink = George Dantzig
| doi = 10.1287/opre.5.2.266
| journal = Operations Research
| mr = 0089098
| pages = 266–277
| title = Discrete-variable extremum problems
| volume = 5
| year = 1957}}.</ref> that considers the materials in sorted order by their values per unit weight. For each material, the amount ''x<sub>i</sub>'' is chosen to be as large as possible:
*If the sum of the choices made so far equals the capacity ''W'', then the algorithm sets ''x<sub>i</sub>''&nbsp;=&nbsp;0.
*If the difference ''d'' between the sum of the choices made so far and ''W'' is smaller than ''w<sub>i</sub>'', then the algorithm sets ''x<sub>i</sub>''&nbsp;=&nbsp;''d''.
*In the remaining case, the algorithm chooses ''x<sub>i</sub>''&nbsp;=&nbsp;''w<sub>i</sub>''.
Because of the need to sort the materials, this algorithm takes time ''O''(''n''&nbsp;log&nbsp;''n'') on inputs with ''n'' materials.<ref name="gt"/><ref name="co"/> However, by adapting an algorithm for finding [[weighted median]]s, it is possible to solve the problem in time ''O''(''n'').<ref name="co"/>
 
==References==
{{reflist}}
 
[[Category:Combinatorial optimization]]

Revision as of 20:26, 7 February 2014

Andrew Simcox is the name his parents gave him and he completely enjoys this name. My spouse and I live in Mississippi and I love certified psychics every working day residing right here. What me and my family members love is performing ballet but accurate psychic predictions [conniecolin.com] I've been using on new things recently. Since he was eighteen he's been operating as an info officer but he plans on changing it.

Feel free to surf to my site ... free online tarot card readings - chorokdeul.co.kr -