Is there any math foundation for map/reduce? - MathOverflow most recent 30 from http://mathoverflow.net2013-06-19T12:28:21Zhttp://mathoverflow.net/feeds/question/83746http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/83746/is-there-any-math-foundation-for-map-reduceIs there any math foundation for map/reduce?Vlad Patryshev2011-12-17T22:56:42Z2012-01-17T05:07:07Z
<p>For a while I was thinking that you just need a map to a monoid, and then reduce would do reduction according to monoid's multiplication.</p>
<p>First, this is not exactly how monoids work, and second, this is not exactly how map/reduce works in practice.</p>
<p>Namely, take the ubiquitous "count" example. If there's nothing to count, any map/reduce engine will return an empty dataset, not a neutral element. Bummer.</p>
<p>Besides, in a monoid, an operation is defined for two elements. We can easily extend it to finite sequences, or, due to associativity, to finite ordered sets. But there's no way to extend it to arbitrary "collections" unless we actually have a sigma-algebra.</p>
<p>So, what's the theory? I tried to figure it out, but I could not; and I tried to go google it but found nothing.</p>
http://mathoverflow.net/questions/83746/is-there-any-math-foundation-for-map-reduce/83763#83763Answer by Jacques Carette for Is there any math foundation for map/reduce?Jacques Carette2011-12-18T02:19:13Z2011-12-18T02:19:13Z<p>Yes.</p>
<p>Ok, while that was fun, let's give you a real answer. As François mentionned, the key word is 'Monad'. Basically/roughly your programming language forms a category, with types as the objects, and functions as the arrows. Then 'map' is the action of a functor on arrows, and 'reduce' is an ordered fold, which is (again roughly) the 'bind' of a monad -- see <a href="http://www.haskell.org/haskellwiki/MapReduce_as_a_monad" rel="nofollow">MapReduce as a Monad</a> as a starting point. For the semantics of 'fold', I rather like <a href="http://www.cs.ox.ac.uk/richard.bird/online/BirdPaterson99Generalised.pdf" rel="nofollow">this paper</a> by Bird and Paterson on (generalized) folds.</p>
http://mathoverflow.net/questions/83746/is-there-any-math-foundation-for-map-reduce/85885#85885Answer by none for Is there any math foundation for map/reduce?none2012-01-17T05:07:07Z2012-01-17T05:07:07Z<p>You might also like this:</p>
<p><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.5859&rep=rep1&type=pdf" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.5859&rep=rep1&type=pdf</a></p>