Slashdot Mirror


The Secret of the Simplex Algorithm Discovered

prostoalex writes "While the Simplex algorithm is considered to be one of the most widely used algorithms in complex networks, the reason for its efficiency has been so far not too clear. Daniel Spielman and Shanghua Teng discovered the secret of why the Simplex algorithm works so well by introducing imprecision into the worst-case scenario analysis. Their article will be published in Journal of ACM, although MIT Technology Review at the aforementioned link quotes Spielman expressing his doubts whether anyone will be able to make it through 80-page document filled with equations and formal explanations of the method."

65 comments

  1. Oh really ? by Networkpro · · Score: 2, Interesting

    Euler was wrong?? I don't think that argument holds water. While 80 pages is long for a proof it looks like more of a philosophical diatribe than anything else.

  2. Pardon my ignorance... by recursiv · · Score: 2, Insightful

    But what is the simplex algorithm? Or at least, what problem does it solve? I've never heard of it before, and the linked description is either not describing what the algorithm actually does or is too dense for me to understand.

    The idea of an algorithm that is used on all kinds of major networks, but no one knows why it works sounds rather intriguing, but can anyone offer any background?

    Thanks in advance.

    --
    I used to bulls-eye womp-rats in my pants
    1. Re:Pardon my ignorance... by grmoc · · Score: 5, Informative

      The simplex algorithm is an algorithm for finding an optimal solution to a set of inequalities. (i.e. a system of constraints)

      I say 'an optimal solution' because there can be more than one.

      If viewed in space, the solution set for a simplex problem is a convex, generally closed region of space. In isn't neccessarily closed, but it is necessarily convex if it is closed, and it is never concave.

      The simplex algorithm is an algorithm whereby some of the points/vertices of that solution space are visited in a search, until an optimal vertex (i.e. solution) is discovered.

      It isn't completely fool-proof, you can get into states where the algorithm bounces between two vertices forever (looping), but for most well-stated linearly constrained problems (in any number of dimensions, really), the simplex is a good way to find an optimal solution.

      Sorry, for the rather rambling explanation.

      If you're truely interested, do a web search for "simplex method"

    2. Re:Pardon my ignorance... by p2sam · · Score: 5, Informative

      Disclaimer: IANAM (I am not a mathematician)

      The simplex method solves a class of problems called "Linear Programming" or simply "LP". Many different kinds of network or graph theory problems can be phrased as an LP.

      An LP consists of an objective function, and a number of linear contraints. For any given LP, there are 3 possibilites:

      1. there does not exist a feasible solution
      2. the LP is unbounded
      3. there exist an optimal solution.

      The goal is to determine an assignment to the variables in the linears system so that the objective value is maximized (or minimized) while satisfying every linear constraint.

      There are other algorithms for solving LP, such as the cutting-plane algorithm. But the simplex algorithm exhibits many useful properties over other algorithms. For example, if the solution of a linear system has already been computed, and if the system changes slightly, one can compute a new solution quickly from the old solution, instead of recomputing from scratch. This is obviously quite useful for continuously updating routing tables on a network.

      Some examples of LP are:

      - single source shortest path (think routing)
      - maximum st-flow
      - minimum cost flow

    3. Re:Pardon my ignorance... by ChadN · · Score: 5, Interesting

      One of the more interesting pieces of 'lore' about the inventor of the simplex method, George Dantzig, is that while in graduate school he showed up late for class and wrote down the pair of problems on the board, thinking they were an assignment.

      He struggled for a while, and finally turned his results into to the professor. However, the problems had been two famous unsolved problems in the field, and Dantzig had effectively solved them.

      While perhaps embellished (and not the only example of students solving 'unsolved' problems), it has become a parable for showing the power of unprejudiced thought. Occasionally it is mis-stated that he invented the simplex method to solve these problems, when in fact, he did that a couple of years afterwards.

      --
      "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
    4. Re:Pardon my ignorance... by zog+karndon · · Score: 4, Informative

      The interesting thing to me is that according to theoretical analysis, the simplex method ought to have exponential complexity in the worst case. (Hence, all the fuss about Karmakar's algorithm, which has provably polynomial complexity.) But for almost all problems, the simplex method actually has polynomial complexity. What the researchers have discovered is why simplex runs as well as it does.

    5. Re:Pardon my ignorance... by thefroatgt · · Score: 1

      You happen to have any of the additional examples of this you mentioned handy?

    6. Re:Pardon my ignorance... by ChadN · · Score: 5, Interesting

      Another famous one in the computer science field, was Huffman coding. As a graduate student, David Huffman (and the class) were early on given the choice of taking the final or doing a report on one of a few problems the professor outlined. The problems seemed straightforward, but the professor (Robert Fano of M.I.T., I believe) had assigned them because were unsolved problems; the idea being that the student would do the research, figure out that they were hard problems, and give a report on what research had been done to try and solve them.

      Huffman didn't do the research, just spent weeks thinking about it, and eventually, when he had decided to give up and study for the test, the answer came to him and he realized the solution was really quite trivial (the famous "greedy algorithm" for constructing optimal minimum redundancy codes).

      On the day of presentation, Huffman strode to the board, described the problem to the class, and totally unaware that it had not previously been solved (despite much effort), wrote the simple algorithm for constructing the codes on the chalkboard.

      The professor was, understandably, stunned.

      --
      "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
  3. So sad... by Anonymous Coward · · Score: 5, Insightful

    Does anyone else here think that it's sad that the number of comments for this story, which represents a significant breakthrough in mathematics and information theory, is less than 5 whereas the once-every-three-days stories about how Microsoft is screwing over their customers or some newfangled thing for Linux has been released always generates 100s of comments?

    1. Re:So sad... by Piquan · · Score: 3, Funny

      I do. That's why I posted this comment... to bring the count up to 5.

    2. Re:So sad... by Randolpho · · Score: 3, Informative

      I wish I had mod points so I could mod you up. I agree. However, I think the problem is that this was posted to developers.slashdot.org and not to slashdot.org. 90% of the people on slashdot will never see this article.

      --
      "Times have not become more violent. They have just become more televised."
      -Marilyn Manson
    3. Re:So sad... by Anonymous Coward · · Score: 0

      this ratio also corresponds to the number of slashdot readers who understand what those equations mean. I (sadly) don't.

    4. Re:So sad... by Insurgent2 · · Score: 2, Funny

      Hell, the only reason I read the topic was I though it was about simplex locks...if I has only known...now my friggin' head hurts!

    5. Re:So sad... by UnknowingFool · · Score: 1
      However, I think the problem is that this was posted to developers.slashdot.org and not to slashdot.org. 90% of the people on slashdot will never see this article.

      That and the subject matter is so specific and technical that most nerds (much less ordinary people) can't follow it. Really it's good reading for a nerd's nerd. I have to admit that I can't understand it.

      I'm not WORTHY!
      I'm not WORTHY!
      I'm not WORTHY!

      --
      Well, there's spam egg sausage and spam, that's not got much spam in it.
    6. Re:So sad... by cjackson0 · · Score: 1
      So many people post to the M$ sucks articles because that is the opinion of the masses here. (stating the obvious, I know). But frankly, not many of us can sit down, read 80 pages of graduate level mathematics, and have a strong opinion on this.

      Maybe this says something about the "Me hate Microsoft *grunt*" mentality, but you can't expect 300+ posts on something this complexity and relative obscurity. If you think it's hard to talk to the general public about OSS and computing topics, try explaining simplex to Joe Public. You'll get a confused look and maybe a punch in the face.

    7. Re:So sad... by artur9 · · Score: 1

      This is going to sound awful so I'm just going to say it and not try to finesse it.

      You don't need to know anything to bash MS. Partially it's because there's not a lot there, mostly it's because they are in your face every day of every week, and the rest is because everyone has an opinion.

      On the other hand, this stuff isn't opinion driven and once the algorithm is embedded in a Cisco router no one needs to know anything about it.

      Maybe slashdot needs a section like Fifty years ago today

      --
      ------- MacOS X, WebObjects, Apple (G5) hardware triply tied
  4. Simplex - important for many things by garyebickford · · Score: 5, Interesting

    The simplex method is widely used in Operations Research and many classic 'computing' problems. For example, IIRC the "Shortest Route" problem is managed (solved is too strong a word, for reasons explained in the previous post). For instance, if your business has three warehouses, 20 trucks and 10 major customers, how do you determine the cheapest way to supply all the customers with the goods they need? The 'best result' often seems counterintuitive.

    It's also used by the airlines to figure out how to schedule planes. There are uses in physics, social sciences, etc. I don't know any offhand, but I wouldn't be surprised if at one time it was used to assist in scheduling computing resources. It's also widely used in complex pricing models.

    It's also a way to decide, given 10 women and 10 men (or any number), which ones are most likely to get along with each other based on their preferences and characteristics. :O)

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    1. Re:Simplex - important for many things by DaoudaW · · Score: 2, Informative

      Linear programming has become a necessary part of basic mathematical literacy. Most secondary-level Algebra 2 books include it with some rudimentary graphical methods for solving problems. I'd be surprised if most slashdotters didn't have some knowledge of linear programming.

    2. Re:Simplex - important for many things by Tablizer · · Score: 1

      Linear programming has become a necessary part of basic mathematical literacy. Most secondary-level Algebra 2 books include it with some rudimentary graphical methods for solving problems. I'd be surprised if most slashdotters didn't have some knowledge of linear programming.

      I think math is more like law. Rather then trying to learn it all and remember it for 30 years after the fact, one should know the basic concepts, but be able to contact a consultant for the times they actually need something specific.

  5. This paper is already availible in preprint? by kgp · · Score: 5, Informative
    For those of you interested in the pre-print of the 84 page paper you need not wait for JACM to publish it.

    "Smoothed Analysis of Algorithms: Why the Simplex Algorithm Usually Takes Polynomial Time" by Daniel A. Spielman and Shang-Hua Teng

    http://arxiv.org/abs/cs.DS/0111050

    Quote (from the intro):

    We propose an analysis that we call smoothed analysis which can help explain the success of many algorithms that both worst-case and average case cannot. In smoothed analysis, we measure the performance of an algorithm under slight random perturbations of arbitrary inputs. In particular, we consider Gaussian perturbations of inputs to algorithms that take real inputs, and we measure the running times of algorithms in terms of their input size and the variance of the Gaussian perturbations.

    We show that the simplex method has polynomial smoothed complexity. The simplex method is the classic example of an algorithm that is known to perform well in practice but which takes exponential time in the worst case[KM72, Mur80, GS79, Gol83, AC78, Jer73, AZ99]. In the late 1970's and early 1980's the simplex method was shown to converge in expected polynomial time on various distributions of random inputs by researchers including Borgwardt, Smale, Haimovich, Adler, Karp, Shamir, Megiddo, and Todd[Bor80, Bor77, Sma83, Hai83, AKS87, AM85, Tod86]. However, the last 20 years of research in probability, combinatorics and numerical analysis have taught us that the random instances considered in these analyses may have special properties that one might not find in practice.

    1. Re:This paper is already availible in preprint? by DaoudaW · · Score: 5, Interesting

      From the paper:
      Another way of thinking about smoothed complexity is to observe that if an algorithm has low smoothed complexity, then one must be unlucky to choose an input instance on which it performs poorly.

      If my first scan of paper yielded anything worth reporting it's the idea that even though a worst case may take exponential time to solve, there is always a neighborhood around the worst case that can be solved in polynomial time and has (almost) the same solution. In other words you can always find a good enough solution quickly.

      BTW, those of you who described the idea as largely philosophical were wrong! The paper is mathematically rigorous. It uses the 80 pages to develop the theorems necessary to prove the idea.

    2. Re:This paper is already availible in preprint? by ChadN · · Score: 3, Interesting

      Does this mean we should randomly perturb our quicksort inputs to help them sort in polynomial time? That intuitively makes sense. For a worst case quicksort input (typically a reverse sorted input), you could randomly permute the values to makes it O(N log N) rather than O(N). Cool.

      --
      "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
    3. Re:This paper is already availible in preprint? by grimani · · Score: 2, Informative

      Yeah, I think this is actually done quite commonly when a semi-orderly input is expected.

  6. Simplex and Operational Research by jd · · Score: 5, Informative

    Oh wow! This takes me waaay back, to when I was an undergraduate.

    Simplex, for those who aren't familiar with it, is a method of solving linear inequalities by representing the inequalities as a set of vectors which describe the outer bounds of the valid problem space. All space within those bounds is a "valid" solution to the inequalities.

    Simplex assumes that some of the inequalities are contradictory. ie: that improving one variable will worsen one or more others.

    The method works by starting off in some corner, and then progressing round the outer bounds until an optimal solution is achieved.

    Operational Research is the science of applying the Simplex method to real-world problems. Early uses of OR (and, indeed, where the name originates) were in World War II, where the problem was to commit the fewest possible resources to achieve the greatest possible result with the fewest possible Allied casualties.

    (Too few resources, and the enemy would likely be able to inflict more damage. Too many resources would reduce that damage, but would also reduce the number of operations you could perform.)

    Modern uses of OR include production of prefabricated components from some material M, such that you get the most components out, and maximise the amount of M that is usable for some other production work, rather than having it as waste, while (at the same time) keeping additional production and processing costs below the savings made from more efficient use of the material.

    In this case, the number of components (N) is one inequality. You need to equal or exceed the ordered number.

    M is also an inequality - you want to order strictly less than you were ordering before, using the old process, or you've gained nothing.

    M' (the usable remainder) is an inequality, equal or greater than 0 and less than M - W.

    W (the waste) is the fourth inequality, which is greater than 0 and less than M - M'.

    If the cost per unit M is C, and the amount of M needed before applying the Simplex method is I, then your savings are (I - M) * C.

    This gives us the final inequality, where P (the increase in cost, due to increase in complexity) must be strictly less than (I - M) * C.

    Without OR, these inequalities are horribly complicated, and "good" solutions are very hard to find. So most companies who aren't familiar with OR just don't bother. Such companies are easy to spot - the only way they can cut costs is to cut workforce.

    Those companies with a good OR team can often make significant savings by improving the methods used. Such companies don't downsize when the going gets tough. Often, they'll simply revamp their methods and discover they can get more output for less cost, for the same labor force. These companies do brilliantly during recessions, as they can literally rob competitors of the remaining market, by out-producing and under-cutting anything that companies with poorer designs can do.

    You can see from that that VERY few companies use OR in their day-to-day practices. The number of layoffs, blamed on "restructuring" but really the result of restructuring the wrong thing, has been horrendous.

    OR isn't the perfect solution to all problems, and is only really designed to solve linear inequalities, but it's the best method out there. And it's about time it was understood.

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Simplex and Operational Research by jovlinger · · Score: 0, Offtopic

      let me take the opportunity to advertise my favorite. research paper. evar.


      Pessimal Algorithms and Simplexity analysis


      Only tangentially related. but good.

    2. Re:Simplex and Operational Research by Anonymous Coward · · Score: 1, Informative

      You seem to be under the misconception that what you saw in you undergraduate "introduction to OR" class is all there is to OR. To wit, linear programming is only one method applied in operations research, the science of using rigorous mathematical models to improve on company operations. It is true that in the 1950's linear programming was the primary tool in OR due to its efficacy, but the field has moved on since then. The subfield I'm involved in is combinatorial optimization of supply chains (production and logistics), using techniques such as constraint programming, integer programming, and heuristic search. Most multi-billion dollar companies these days employ such techniques in at least some parts of their operations, and yes, they still do lay-offs.

    3. Re:Simplex and Operational Research by Anonymous Coward · · Score: 0

      The idea that companies that use OR are immune from recessions and rarely have to resort to layoffs is false. OR is just another tool which can make companies more effecient, but its not a silver bullet.

      Layoffs and OR are basically independent. Even if your product can be produced for half the cost, if no one is buying you have to cut production. OR can be used in this instance to determine which and how many employees to let go.

    4. Re:Simplex and Operational Research by RAMMS+EIN · · Score: 1

      ``OR isn't the perfect solution to all problems, and is only really designed to solve linear inequalities, but it's the best method out there. And it's about time it was understood.''

      If the mathematician screams in the forest of managing suits, will anyone hear?

      --
      Please correct me if I got my facts wrong.
  7. Re:So sad... (only to a point) by zoloto · · Score: 3, Funny

    most of us working on a Masters in Mathematics are too busy to comment, sorry.

  8. Re:Well and good, but about my NZ Jetstream questi by Anonymous Coward · · Score: 0

    I've got mod points and would like to mod you off-topic, but I'll just wag my toungue at you instead. Your NZ Jetsteram thingy sounds kinda interesting but you give no details. You should include your submission in your bitch & moan post, or at a minimum, include it in your journal. You have no journal entries - write some!

    PS. please don't waste our time trying to make something "on topic" by adding useless filler.

  9. Re:Well and good, but about my NZ Jetstream questi by etcshadow · · Score: 0, Offtopic

    What the hell? I would mod you off topic if I had mod points. Some people _are_ going for a CS PhD...why can't they have stories, too? Besides, this isn't on the front page, and obviously only a few people are reading it, anyway. Cut 'em some slack.

    --
    :Wq
    Not an editor command: Wq
  10. Re:Well and good, but about my NZ Jetstream questi by thefroatgt · · Score: 1

    Waste of time this may be, it is still an interesting waste of time. I find it refreshing that occasionaly there are bits of complex math (and other stuff) that gets posted sometimes. And it makes my course work look easier.

  11. Simplex by SporkLand · · Score: 2, Funny

    What a poorly chosen name. Simplex is pretty complex when compared to some of the other things I studied in math class. I always wondered why they called it simplex.

    1. Re:Simplex by Cardbox · · Score: 3, Interesting

      It's a mathematical term. In 2 dimensions, a simplex is a triangle (3 points connected in all possible ways - ie. by 3 lines). In 3 dimensions, a simplex is a tetrahedron (4 points connected in all possible ways - ie. by 6 lines). In 10 dimensions, a simplex is 11 points connected in all possible ways - ie. by 11x10/2 lines.

    2. Re:Simplex by Anonymous Coward · · Score: 0

      They probably devised the name wanting to emulate SNMP: now waht does the SIMPLE stand in there for?

    3. Re:Simplex by oli_freyr · · Score: 1

      Uh... Simple ^ Complex == Simplex

      It appears complex while it is actually quite simple. ;)

    4. Re:Simplex by Anonymous Coward · · Score: 0

      The standard n-simplex is defined as Delta_n = {x_1, ..., x_n \in R^n | x_i >= 0, \sum{i=1}^n x_i = 1}. Note that in 10 dimensions(I assume you mean in R^10), it is possible to have 1-simplices, 2-simplices, etc. as well as 10-simplices. Also, simplices(according to my definition) are "filled". So the standard 3-simplex is made up of 4 points(0-simplices), 6 lines(1-simplices), and 4 triangles(2-simplices). These are generally referred to as m-faces.

  12. Integer Linear Programming is harder than LP by Anonymous Coward · · Score: 0
    LP is easy, but ILP is hard :P

    ILP has time of exponential complexity

    ILP was researched by millions of persons for >50 years, :P

    JCPM (c)

    1. Re:Integer Linear Programming is harder than LP by gomiam · · Score: 1
      Right... almost. One thing I think no one has still stopped to consider is that there is a numeric method (I forgot its name) to approximate an optimal solution to a given precision, with no need of vertex-walking, based on transforming the solution polyhedron to approach the best solution. There is, as well, a method that allows finding an optimal solution from the approximated one.

      Yes, I know I'm using floating point for ILP, but, then, there is a method to get back to ILP.

      Oh, something else has me puzzled: any closed n-dimensional polyhedron (and, with a little bit of an artifact, an open one too) maps to the corresponding n-dimensional sphere (Voronoi diagrams and Delaunay triangulations, anyone?). Thus the number of vertices is O(m^2), being m the number of linear constraints. How can ILP be O(e^n) then?

    2. Re:Integer Linear Programming is harder than LP by Myria · · Score: 1

      It's because the solutions are not necessarily on a vertex, unlike LP. A greedy approach won't necessarily work.

      It's the same reason that 0-1 Knapsack is NP-complete yet fractional Knapsack is P and very easy.

      Melissa ^-^

      --
      "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
    3. Re:Integer Linear Programming is harder than LP by gomiam · · Score: 1

      And thus gomiam was illuminated :-)

  13. So what's new about the result? by phr2 · · Score: 1
    It sounds pretty similar to what Smale and others proved decades ago, that the Simplex algorithm's running time is polynomial except on a measure-zero set of problem instances.

    Smale, Blum et al have a really good book called "Complexity and Real Computation" which analyzes the Simplex Method and other algorithms at some length. It tries to build up a theoretical foundation for complexity analysis of numerical algorithms (where the objects being computed are real numbers), just like traditional complexity theory (with Turing machines) analyzes algorithms which compute on discrete sets (e.g. bits).

  14. Re: Perturbing quicksort inputs by joaobranco · · Score: 1

    Just one thing. O(N) is less than O(N log N) so I assume that you meant the worst case of quicksort is O(N^2). I never studied its complexity, so I really don't know.

    This could work, I believe, but only if Quicksort exhibits the same sort of lets say "poly time affinity" (for lack of a better description) that the Simplex method does. Not all algorithms have this characteristic.

    It is worth looking into, though. If this is (statistically) true, one could try to solve in paralell 3 or 4 "pertubed" quicksorts, and still come out ahead of just a quicksort that exhibits O(N^2) because it is "a worst case". Of course this would only be useful for large values of N.

  15. Re: Perturbing quicksort inputs by Dyolf+Knip · · Score: 1

    Yes, worst case for Quicksort is O(n^2). As I recall, this requires that the data is already sorted but in the opposite order you want.

    --
    Dyolf Knip
  16. not news by Horny+Smurf · · Score: 1, Offtopic
    I discovered the secret of the Herpes Simplex 2 years ago :(

    1. Re:not news by Anonymous Coward · · Score: 0


      clearly, the solution to your particular simplex problem is valtrex.

      - a.c.

  17. simplexly facinating. by fish_in_the_c · · Score: 1

    what else can be said. I'm always amazed at all the complexity that is involved in modern computing and the mathematics that make it happen.

    --
    âoeTolerance applies only to persons, but never to truth. Intolerance applies only to truth, but never to persons.
  18. Re:Well and good, but about my NZ Jetstream questi by Brian+Boitano · · Score: 1

    how are they ripping people off?
    do you have some inside knowledge?

    --
    What would Brian Boitano do?
  19. Linear Programming by jefu · · Score: 1
    Not that many undergrad CS students are exposed to the wonders of linear programming and simplex. So, its not altogether surprising that it does not attract that much interest.

    Another factor may be that until you get a ways into advanced problems most of the applications linear programming and the simplex method are pretty much cookbook these days - but most courses in linear programming are a semester long - so its hard to tell a cs major that taking a course in LP is more important than taking a course in Visual Something-or-Other. As a professor type though, I always try to mention some of the techniques and ideas I've seen in other areas - even when not necessarily applicable to the class I'm currently teaching. This includes things like LP - but also things like cryptic crosswords, Intercal and so on. Something seen by some students as a Good Thing, by others (most, probably) as a Waste of Time.

    Me, I'm going to take a look at the paper and see what I can get from it. The posted information on what is said looks very interesting indeed.

    1. Re:Linear Programming by Anonymous Coward · · Score: 0

      I don't know why CS undergrads wouldn't see LP, at least in a mathematics course of some kind. I have presented LP in business calculus courses as well as "university mathematics"(math for poets). I don't always cover simplex method in depth, but it is always mentioned.

  20. Re: Perturbing quicksort inputs by ChadN · · Score: 1

    Yeah, I meant O(N^2), but was posting when tired. :)

    --
    "It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
  21. Very nice result - may have game applications by Animats · · Score: 4, Informative
    That's a neat result.

    It's been known for a long time that the simplex method is polynominal most of the time, and exponential in the worst case. It's also known that the exponential cases are metastable - a small perturbation in the inputs and they collapse to a polynominial case. So adding a little noise to the algorithm can kick it out of the bad cases.

    But that's been an ad-hoc result. There hasn't been theory on how much noise to add, and when, and how. With sound theory underneath, algorithms that use noise injection to get out of the pathological states may become much more reliable.

    Polyhedral collision detection, as used in games, works a lot like the simplex algorithm, and there are some pathological cases. The current best solution, "Enhanced GJK", is adequate but still has trouble in some "pathological cases". There are ways out of those difficulties, but they're inelegant. This new work might lead to a cleaner algorithm in that area.

    There are other algorithms with similar properties, where the worst case is far slower than the average case. The simplex algorithm is for linear optimization. Many of the same difficulties appear in nonlinear optimization, where everything is more complicated and the methods all have severe restrictions. This may have applications in physics engines for video games, but it's too early to say.

  22. Karmarkar's algorithm by gokeln · · Score: 1

    Say, does anybody know what ever happened with Karmarkar's algorithm? The early press releases when it came out said it was going to revolutionize Operations Research (specifically replacing Simplex). It doesn't appear this has happened. What's the scoop?

    --

    There's no time to stop for gas, we're already late.
    1. Re:Karmarkar's algorithm by Anonymous Coward · · Score: 2, Informative

      In practice, simplex is so good that it still wins on many problems. However, all serious modern linear programming libraries also do interior point algorithms, because they are faster in some cases, especially when the problem is large. But speed is not everything -- even when the methods are about equally fast, simplex has some practical advantages, such as the ability to modify the problem slightly and continue efficiently from the solution of the original problem. This is important in integer programming.

  23. Popularity? by RAMMS+EIN · · Score: 1, Insightful

    Never underestimate the power of stupid people in large groups. This is why it's a Good Thing that hardly anything is really democratic; the masses just aren't interested and thus ignorant.

    --
    Please correct me if I got my facts wrong.
  24. Re:Well and good, but about my NZ Jetstream questi by Anonymous Coward · · Score: 0

    You won't get it on the fron page cos it's in NZ, not NY or similar. This is /. - deal with it.

    Having said that, write your diatribe here and then we'll know what you're on about.

  25. Yet another explanation. by Dthoma · · Score: 1, Informative

    This might be considered redundant, but this is the only explanation of the simplex method I can comprehend. IANA Linear Programmmer, so I may be wrong. Bear that in mind.

    The simplex algorithm is a way of solving Linear Programming problems. Linear Programming problems require you to find an optimal solution for a series of constraints.

    An example might be:

    You are a baker, and you have 20 pounds of flour and a dozen eggs. You can make either loaves of bread (requiring four pounds of flour each) or cakes (requiring three pounds of flour and two eggs each). A loaf of bread sells for $1 and a cake for $4. How can you maximise or minimise your profit? (Those last two are the optimal solutions: minimising or maximising.) Let's say we want to maximise profit.

    We can illustrate the problem on a 2-D graph, using one axis for the number of loaves and one axis for the number of cakes. We draw inequalities as lines on the graph to demonstrate the boundaries; for example, we can make at most six cakes (which then implies two loaves, making you $26 in total) and at least zero cakes (which then implies five loaves, making you $5 in total). Thus, if cakes = 6, loaves = 2 and if cakes = 0, loaves = 5. We can plot these as two points on the graph (e.g. at co-ordinates (6,2) and (0,5)) and then join the two points to get a line, which is one of our boundaries; on one side of the line are feasible solutions and on the other impossible ones (e.g trying to make more than six cakes).

    In addition to this there are two more boundary lines, x=0 and y=0 (since we can't make fewer than zero cakes or fewer than zero loaves). These three boundary lines define a triangle, a polygon with three vertices. Inside the polygon are feasible solutions, on the outside...well, you probably can guess.

    The simplex method would work here by taking advantage of the fact that the optimal solution must be at a vertex of this polygon defined by the problem. Here it works very quickly since there's only three vertices to try.

    Now say we add another constraint, such as that loaves require 15 minutes to make, cakes require 25, and we only have four hours to bake what we need. This constraint would be represented by another axis on the graph, making it three-dimensional. Once again we would get a closed shape with straight edges; a 3-D shape instead of a 2-D polygon. Again, the optimal solution now lies at one of the vertices of this shape.

    The simplex method can be used here. We can continue adding more constraints on resources. This adds more axes to the graphs and each time the number of dimensions is incremented. Some problems may involve shapes in 20 or 30 dimensions, or even more with tens of thousands of vertices (any of which could be an optimal solution). Here the simplex method uses a probabilistic method to make its way to the vertex which gives maximum yied (in this case, profit.)

    I'll leave someone else to go into the specifics of how the simplex method traverses it. It's a very nice algorithm though, working in polynomial time.

    --

    Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".

    1. Re:Yet another explanation. by gomiam · · Score: 1

      Mmm... somehow I think the vertex-walking algorithm applied in simplex is completely deterministic: at each vertex, it is easy to find which is the best next candidate.

  26. MOD PARENT UP by Anonymous Coward · · Score: 0

    Don't mod it down just because you don't understand what it means, you stupid friggin' crackhead.

  27. Re: Perturbing quicksort inputs by gomiam · · Score: 1

    And that is why I prefer heap-sort (_always_ O(n log n)).

  28. That makes more sense. by Dthoma · · Score: 0

    I suppose it would only be marginally slower to implement; compare the neighbours and shift to the best one.

    --

    Note to M1-ers: a curt but otherwise insightful message is not "Flamebait" or "Troll".

  29. Re:So sad... (only to a point) by Poeir · · Score: 1

    Let alone read the article.

    --
    Sigs are like bumper stickers.
  30. Is Simplex the _most_ efficient? by Anonymous Coward · · Score: 0

    I catch the idea of what Simplex does but wonder how it compares to other algorithms? For example, a genetic algorithm (say using multi-objective GA) can be used to solve LP's as well without (I think) pathological cases but with an uncertainty on the time to arrive at a solution. Is Simplex preferred because of simplicity, efficiency, or what? TIA

  31. Re: Perturbing quicksort inputs by psmears · · Score: 1

    In fact to get O(n^2) it doesn't matter which way the data is sorted. The algorithm works by choosing an element as a "pivot", then dividing the remaining data into two sets, the set of data lower than the "pivot", and the set greater than the "pivot" (and then sorting those two sets recursively). The algorithm is efficient when the two sets are of roughly equal size (as will often be the case when the data is random), but O(n^2) when one is significantly larger than the other.

    Since most implementations pick the "pivot" as the first item in the list they're sorting, this gives the empty set as one of the sets, and the rest of the data as the other set, which is of course the worst case...

    Applying a random permutation to the input data, or choosing the pivot randomly from the set, can help if you know in advance that the data is likely to be biased in such a way that the two sets will often have different sizes.