You have the following false “equation”, made with six toothpicks arranged on a table in the following way: XI = I You have to re-establish the equality by changing the position of a single toothpick. Common-sense rules apply: you are not allowed to bend, break, or remove any toothpicks.

# Tag: Puzzles

## Quick Puzzle: what does this program print?

You have 30 seconds left… just kidding ðŸ™‚ using System; using System.Collections; using System.Reflection; class Hello { Type Unknown { get { return World.GetType(); } } object[] Knowledge() { return Unknown.GetProperties(); } string[] Library() { return Array.ConvertAll<object, string>( Knowledge(), delegate(object x) { return x.ToString();…

## Script puzzle: Solving Hanoi … in shell

If you like CMD programming, here is a challenge for you: write a CMD batch file that solves the Hanoi problem. You start with these folders: and you must end up with this state: You probably know the rules of the Hanoi problem. Mapped in the command shell terminology these rules are as…

## Another puzzle: Gödel, Goldbach and other “G” names…

Mr Blobby posted an excellent comment in my previous post, outlining in a few words GÃ¶del’s proof of incompleteness of arithmetics. This is a mind-boggling result, which essentially states the following: There are certain statements (I would not say “theorems”) in the body of Arithmetics, which are either true or false. But there is no way to find a…

## Puzzle: Shakespeare numbers…

Imagine that there might be a real number that contains (in an encoded form) the entire works of Shakespeare. Let’s call this number a “Shakespeare number”. Can you give an example of an algorithm to generate Shakespeare numbers? [update] The problem, as originally stated, is too vague. I added more specifics:1) No tricks… You should not hardcode…

## Another puzzle: Self-extracting EXE

The rules are the following: 1) Before starting the test, you choose the computer + OS you want, etc.2) Then, I give you a certain file.3) You need to create a self-extracting EXE for it, that is always smaller than the original file. You can use any loseless compression/decompression algorithm tailored for this specific file. The decompression code might be self-contained in this file but of…

## Little math problem

OK, probably you already had your latte this morning but here is nice puzzle: Let’s say that a rectangle is “rational” if the ratio between the width and height is a rational number. Now, proof that a rectangle is rational if and only if the rectangle can be completely covered with a finite number of…

## Ponder this

I just discovered this site. It contains all sorts of math/cs/algorithm-related problems. Some of them are beautiful, others so-and-so… But at least in my case, the effects can be already seen – red eyes ðŸ™‚ Here is an really nice challenge: Ponder This Challenge: This month’s puzzle was sent in by Joe Buhler.It came from a SIGCSE meeting…