From: Michael Fellinger Date: 2010-04-01T20:49:15+09:00 Subject: Re: Ruby solve classic math problem: make 56 from four 4s On Thu, Apr 1, 2010 at 6:11 AM, Kelly Jones wrote: > A classic math problem asks "using only four 4s and any > mathematical operation, come up with the number > 56". "4!+4!+4+4" is one of probably several answers [1]. > > I want to write a ruby program that solves the > generalization: "given X number of the digit Y and a > set of permitted mathematical operations/functions, can > you come up with the number Z?" > > Has anyone already done this? > > [1] http://mathforum.org/ruth/four4s.puzzle.html The first thing that came to mind was http://www.rubyquiz.com/quiz60.html Not exactly what you want, but still good reading :) > -- > We're just a Bunch Of Regular Guys, a collective group that's trying > to understand and assimilate technology. We feel that resistance to > new ideas and technology is unwise and ultimately futile. -- Michael Fellinger CTO, The Rubyists, LLC