
Recent Posts
Recent Comments
Archives
 January 2018
 May 2017
 February 2017
 January 2017
 October 2016
 June 2016
 May 2016
 April 2016
 February 2016
 January 2016
 November 2015
 September 2015
 August 2015
 July 2015
 June 2015
 May 2015
 April 2015
 March 2015
 February 2015
 January 2015
 December 2014
 January 2014
 July 2013
 June 2013
 January 2013
 December 2012
 November 2012
 August 2012
 March 2011
 February 2011
 January 2011
Categories
Meta
Category Archives: Software Puzzle
Breadth First Search
Many programming problems can be modeled as search problems. Given an initial state find the set of intermediate states that have to be traversed before reaching a goal state. We could formulate the Water Buckets problem, the BrainVita problem or … Continue reading
Why Functional Programming works for the Eight Queens Problem.
At a recent Boost Conference, Bartosz Milewski [1] presented a solution to the Eight Queens problem from a functional programming perspective. The main argument is that in Functional Programming we do not modify state. We create new states by extending … Continue reading
Posted in Algorithm, Software Engineering, Software Puzzle
Tagged functional programming
Leave a comment
Master Mind Solver
Knuth [1] describes Master Mind as follows In this game one player (the “codemaker”) conceals a foursymbol code, and the other player (the “codebreaker”) tries to identify all four symbols by trying appropriate test patterns. There are six symbols, represented … Continue reading
“Water buckets” Problem
In Solving “Water buckets” Problem Using Scala Biju Kunjummen presented a Scala program to solve this puzzle: You have a 12gallon bucket, an 8gallon bucket and a 5gallon bucket. The 12gallon bucket is full of water and the other two … Continue reading
TARGET Solver
What does a geek do during holidays? Write useless interesting applications of course. Today I was looking at the Target puzzle in the Sydney Morning Herald. The game is as follows. Consider the set of characters shown below: E A … Continue reading
Sudoku Solver
There are many ways of solving Sudoku programmatically. The first attempt would be to replicate what people do. In any empty cell list all possible candidates. If there is only one candidate then fill the cell with that candidate. The … Continue reading
LinearSearch based algorithm for Mth Lexicographic ordering of Mathematical Permutation and Combination
(The pdf version is here) Following the discussion in “Generating the mth Lexicographical Element of a Mathematical Combination” , I present here another algorithm for the Mth lexicographic ordering based on a linear search procedure. The method is based on … Continue reading
Posted in Software Puzzle
1 Comment