Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

67% Positive

Analyzed from 399 words in the discussion.

Trending Topics

#math#trades#problem#class#number#trade#okasaki#result#old#still

Discussion (17 Comments)Read Original on HackerNews

vintermann1 day ago
Many years ago, on Boardgamegeek, there was a game trading system called "Math Trades", where participants would list a number of trades they were willing to make, and they ran some complicated calculations to figure out how to let as many as possible trade.

CS professor Chris Okasaki, known for his book on purely functional data structures, also played board games and he came across this phenomenon. He realized that it could be modelled as a bipartite matching problem, and wrote a MUCH faster program to manage math trades.

https://okasaki.blogspot.com/2008/03/what-heck-is-math-trade...

I guess it can be made even faster now in theory.

throwaway81523about 13 hours ago
I don't think this new result is supposed to be a speedup. It might even be slower than the existing method. Rather, it's a way to get rid of the random number generator that the old algorithm relied on, so it's deterministic unlike the old way. I'm not even sure that it's guaranteed to find the answer, as opposed to finding it with high probability.

It's mostly of theoretical interest except for some possible niche applications, I'd say. For a math trade type of problem, you'd just go ahead and use the old algorithm with an RNG.

Another famous result of this type was AKS primality testing. Randomized algorithms like Miller-Rabin were known for a long time, very reliable, and quite simple to implement, but AKS was an important theoretical advance because it didn't use random inputs. I think everyone still uses Miller-Rabin in practice.

emil-lpabout 22 hours ago
The kidney exchange problem isn't bipartite matching but a cycle packing problem (or disjoint cycle cover).
mirashiiabout 18 hours ago
The math trades still happen regularly at cons, e.g. Origins had one just last week.
sigbottleabout 18 hours ago
Chris okasaki! Was into functional data structures in college, great book and great dude
amirhirsch1 day ago
This is an awesome result.

For those unfamiliar: NC is the class of problems which can be solved in polylogarthmic depth with polynomial number of logic gates. It is unproven if NC != P similar to P != NP.

gignico1 day ago
Yes, but logic gates with constant fan-in, crucially, otherwise that's called AC.
amluto1 day ago
I never studied these specific classes, but my immediate intuition is that an n-input fan-in AND or OR gate can be reduced to a tree of 2-input gates with depth O(log(n)), which preserves polylog complexity, so surely AC = NC.

Wikipedia agrees :)

If you specify the exponent of the log, you get a different answer.

amirhirsch1 day ago
Yes.

There is a beautiful proof of the disjunction between AC0 and NC showing parity cannot be done in AC0 using harmonic analysis of Boolean functions

ZeroCool2uabout 24 hours ago
ostiabout 24 hours ago
So is it a class of problems that can be parallelized well?
adgjlsfhk1about 24 hours ago
no (in both directions). lots of np/exp problems paralize well and you can be in NC and parallelize really inefficiently (e.g. you can get a 10x speedup, but you need 1000000x the hardware). the better framing is that NC is the class of efficient algorithms that can be sped up near arbitrarily by parallelization
ostiabout 23 hours ago
Hmm your last sentence seems to exactly agree that it's a class of algos that parallelize well? What does sped up arbitrarily mean? It's still polynomial speed up right?