Example toy program: n of k marbles problem, how many combinations?
NOTE: I think this was the problem under discussion...there was some ambiguity as to exactly what the problem was :) I thought this should be solved by the standard formula for the binomial coefficient, but maybe I misunderstood the problem?
Other links of interest to me relevant to Clojure (and more generally functional programming languages and parallel programming:
- Definition of the problem (as I heard it): http://en.wikipedia.org/wiki/Combination
- Naieve C++ solution for comparison: http://www.brpreiss.com/books/opus4/programs/pgm14_13.cpp
- Discussion of recursion and dynamic programming: http://www.csc.liv.ac.uk/~ped/teachadmin/algor/dyprog.html
- This is just too funny, my favorite part being that there are 4 responses, with totally different approaches, and 3 different answers! http://javajeff.blogspot.com/2009/07/grails-springsource-and-clojure.html
- Discussed memoization for speed-up : http://en.wikipedia.org/wiki/Memoize
- Lots of confusion/discussion/attempts at clarification of atoms vs. agents vs. dosync vs. refs: http://clojure.org/refs, http://clojure.org/concurrent_programming, http://stackoverflow.com/questions/1028318/clojure-mutable-storage-types
- Discussions about TCO and trampolining: http://en.wikipedia.org/wiki/Tail_call, http://lambda-the-ultimate.org/node/3106
- One of the audience had some good fun with beer and Clojure: http://github.com/wrightmikea/wright-clojure-examples/tree/master
The above are not specific posts mentioned in the meetup...just my list of pertinent articles for your amusement and further reading.
Some toy problems to practice with:
- http://en.wikipedia.org/wiki/Selection_algorithm (toy problem)
- http://mark.reid.name/sap/online-learning-in-clojure.html (looking more real-world if you like learning algorithms, SVM, empirical risk minimization...who doesn't??)
- http://news.ycombinator.com/item?id=772808 and http://www.infoq.com/articles/flightcaster-clojure-rails - aaahhh, now this is more like the real world clojure I was looking for :) If you haven't guessed my interests yet, well...come back again some time for more clues. Also, as a student pilot, I'm wondering if I can apply their idea to calculating the probability that I will pass my FAA check ride before 2010 :)