Archives for Clojure

Discrete convolution of finite vectors

Isaac Hodes posted a request to both StackOverflow and the Clojure mailing list, asking for some help implementing a discrete convolution function in Clojure. I am trying to create a lazy/functional/efficient/Clojuresque function to carry out convolution on two lists/vectors of (ideally BigDecimals but that may be inefficient) doubles. … Right now, it seems as though […]

British Lottery Puzzle

Have I mentioned that I’m a sucker for probability puzzles? I found this one at ibbly.com: Two teams from opposite ends of the country have been drawn to play each other in a competition. They need to determine which team plays at home and do so fairly at a distance. They decide to try to […]

The Matchbook Problem

I have been reading a lovely book by Paul Nahin, Digital Dice. The book is subtitled Computational Solutions to Practical Probability Problems. I don’t know how practical the problems are, but they are a lot of fun. Probability theory is rife with seemingly simple problems which turn out to be less simple than first appears. […]

Cartesian product

I was browsing the 6-24 Clojure-log archive and ran across an invitation from Craig Andera: I’ve knocked out a quick definition of something that computes the Cartesian cross product of multiple sequences. But as always when I write Clojure, I have to assume someone else can do it in less code. Anyone care to take […]