Category Archives: Software Puzzle

Puzzles that could use a software solution.

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

Posted in Algorithm, C++, Software Puzzle | Tagged | Leave a comment

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 | Leave a comment

Master Mind Solver

Knuth [1] describes Master Mind as follows In this game one player (the “codemaker”) conceals a four-symbol 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

Posted in Algorithm, Software Puzzle | Tagged , | Leave a comment

“Water buckets” Problem

In Solving “Water buckets” Problem Using Scala  Biju Kunjummen presented a Scala program to solve this puzzle: You have a 12-gallon bucket, an 8-gallon bucket and a 5-gallon bucket. The 12-gallon bucket is full of water and the other two … Continue reading

Posted in Software Puzzle | Tagged , , | 2 Comments

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

Posted in Software Puzzle | Tagged , , | Leave a comment

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

Posted in Software Puzzle | Tagged , | 2 Comments

Linear-Search 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