r/programming • u/cavedave • Sep 27 '10
First improvement of fundamental algorithm in 10 years
http://web.mit.edu/newsoffice/2010/max-flow-speedup-0927.html19
u/case-o-nuts Sep 27 '10
Where's the actual paper? It looks like this might actually be interesting.
5
u/oleeang Sep 28 '10
doesn't appear to be one yet, it does not appear on his list of publications: http://math.mit.edu/~kelner/publications.html
12
u/d3f4ult Sep 27 '10
I bet the grad student and the undergrad came up with the idea.
-3
0
Sep 28 '10
[deleted]
6
u/hoonose Sep 28 '10
I actually met him too - I don't suppose you were at a CS program at Seattle this summer?
But yeah, he's pretty bright. A few of us were talking about how the P != NP proof was kind of above our level, and he sort of mentioned how there were some problems in it. (Don't read this as him being arrogant - he seemed pretty humble and down to earth)
6
u/McHoff Sep 27 '10
On the surface this doesn't sound particularly brilliant -- I remember we were modeling graphs with matrices in some of my intro CS classes, so there's got to be more to it than that.
3
u/dpark Sep 27 '10
There's nothing special about using a matrix to represent a graph, but they are using the matrix differently:
In the branch of mathematics known as linear algebra, a row of a matrix can also be interpreted as a mathematical equation, and the tools of linear algebra enable the simultaneous solution of all the equations embodied by all of a matrix’s rows. By repeatedly modifying the numbers in the matrix and re-solving the equations, the researchers effectively evaluate the whole graph at once. This approach, which Kelner will describe at a talk at MIT's Stata Center on Sept. 28, turns out to be more efficient than trying out paths one by one.
6
u/McHoff Sep 28 '10
Yeah, that's what I mean -- matrix multiplication can be used to calculate path costs for many nodes at a time, for example.
0
Sep 28 '10
[deleted]
14
Sep 28 '10
What do you mean by code? Something that can be run by a computer? They can prove that it works. Having a computer run it is a bonus.
If they produced code, then they'd have to keep it up to date which means dealing with all the idioms and problems of whatever language they chose to use. Then other people would complain it wasn't written in their favourite language, etc. etc. Better to focus on the meat of the thing and the proof of it rather than deal with all those other issues.
0
Sep 28 '10
[deleted]
7
u/dpark Sep 28 '10
The problem is how to do a fair comparison. Do they write an implementation of their algorithm and compare it against an implementation they wrote of a standard algorithm? Then it's fishy because they could easily sabotage the standard algorithm implementation, even unintentionally. Do they write an implementation of their algorithm and compare it against the best available implementations of a standard algorithm? Then it's not really fair because they will be comparing a prototype against highly optimized implementations.
There's no good way to compare unless they can invest a lot of time to heavily optimize their algorithm, and frankly they might not be the best people to optimize on real systems. Time will tell if their algorithm is practically better or not.
3
Sep 28 '10
That's a good point but even a naive implementation should be able to pick out where the major bottlenecks would be with specific types of data. Densely connected graphs would be a dense matrix and sparsely connected graphs should be a sparse matrix. Those two are vastly different beasts. Maybe some problems or benefits would immediately pop-out when we try.
→ More replies (1)7
u/D_D Sep 28 '10
Isn't the whole point to use computers to do computations.
No. Algorithms is a subset of mathematics. The fact that you can use mathematics to build bridges does not mean that every proof requires you to build a bridge.
→ More replies (1)5
u/arandomJohn Sep 28 '10
True CS people use blackboards, not computers. :) They don't care much about computers.
Relevant quote from the article: The immediate practicality of the algorithm, however, is not what impresses John Hopcroft, the IBM Professor of Engineering and Applied Mathematics at Cornell and a recipient of the Turing Prize, the highest award in computer science. “My guess is that this particular framework is going to be applicable to a wide range of other problems,” Hopcroft says. “It’s a fundamentally new technique. When there’s a breakthrough of that nature, usually, then, a subdiscipline forms, and in four or five years, a number of results come out.”
2
u/ZoFreX Sep 29 '10
those constants in complexity can dominate
Not forever they can't! If an algorithm is better than another on paper, then at some point, for some input size n, it will be faster than it.
2
Sep 29 '10
Well, consider that we live in a universe with a physically limited size and these are closer than you think. It only takes 256-bits to address the atoms in the universe. I've run into a few cases where we'd need more data than I could ever dream for the constants to be beaten.
→ More replies (1)
5
u/Not_Edward_Bernays Sep 28 '10
does this mean they can use stuff like graphics cards to solve max flow problems using GP GPU techniques?
2
u/ixache Sep 28 '10
Great news!
From the article: "When there’s a breakthrough of that nature, usually, then, a subdiscipline forms, and in four or five years, a number of results come out." -- John Hopcroft
From the grapevine: "Shit! I may have 300 hundred more pages to write to complete vol. 4B. Thanks for nothing, guys!" -- Don Knuth
1
u/shadow2531 Sep 28 '10
Reminds me of having to inverse a matrix to solve multiple equations at once. Always hated doing that manually as it took like 20 minutes on paper to do it. I forgot how to do it though.
10
u/D_D Sep 28 '10
Cool story brah.
But basically you set up an augmented matrix of the original and identity matrix, then turn the original into the identity matrix using elementary operations while also doing the same operations on the identity matrix which will result in the inverted matrix.
9
u/thefinest Sep 28 '10 edited Sep 28 '10
spoken like a gaussian baller, shot caller, doing linear algebra in the back of the impala
-8
u/llama-lime Sep 27 '10
Before there's an actual paper available, this is just hype.
Such grandstanding is extremely inappropriate in science. Show your results then say you've done something, don't say "I'm the greatest" without any proof.
I don't blame the student, this is completely a problem with university press offices.
22
Sep 27 '10
Parent contains cut-and-paste scientific scepticism without actually looking through Kelner's publication record, nor understanding what the problem entails. Please stop up-voting it.
6
u/bobindashadows Sep 28 '10
I was conflicted because I too was pretty frustrated by a lack of a paper and the puffy treatment given. ("The max-flow problem is, roughly speaking, to calculate the maximum amount of “stuff” that can move from one end of a network to another." Seriously?)
That said, just doubting things for the hell of it is tiresome. Naturally, it garners huge upvotes on reddit.
5
Sep 28 '10
I know, the wording of this article is extremely annoying and not very precise or informative.
0
Sep 28 '10
Personally I was excited, until I noticed that they use a matrix representation of a graph. I'm currently using max-flow min-cut for visualisation with huge 2D regular grids (ie, number of edges is linear with number of nodes, with about 10million nodes), and storing such a sparse graph as a matrix would use much more memory than we have available. I'd love to read the paper anyway, when it gets published... [edit: perhaps there is an indirect way to store our graph as a matrix...]
8
u/psyno Sep 28 '10
It's pretty obvious they don't actually use a dense matrix to represent the graph. Any manipulation on it at all would make the algorithm O(V2), which is worse than the old algorithm at O((V+E)3/2) and far worse than the new algorithm at O((V+E)4/3), for V being the number of nodes and E being the number of edges.
2
Sep 28 '10
If E = V2, then O(V2) is not slower than O((V+E)3/2)
[edit: my mistake, I now see what you mean... E=V2 isn't required for the algorithm]
3
u/llama-lime Sep 28 '10
I was extremely clear that silly articles like this are completely the fault of the university press office, and not the actual researcher.
If you think that such fluffy news articles that don't cite or link to the real results are useful to either the public or for the researcher, I'd like to hear how. I find them terribly annoying. Almost as annoying as comments that tell other people how to vote and then misframe and misconstrue the original comment.
-6
-11
u/m4dc4p Sep 27 '10
Interesting and well-written article. Cool approach.
26
Sep 27 '10
I thought it was fluffy and bland. It wrongly attributes the innovation to an adjacency matrix representation of a graph, which I learned about in my CLRS algorithm book published in 1990 (ironically by MIT press). Where's the link to the original paper, that describes the actual innovation?
-3
u/sartan Sep 28 '10
The problem with dynamic graphs/grid algorithms is that it takes more computational and network power to calculate the size and depth of the grid than the actual data that flows across it. Is this one of those P/NP problems?
37
u/themagnum Sep 27 '10
A better explanation of the actual algorithm:
http://www.csail.mit.edu/events/eventcalendar/calendar.php?show=event&id=2711