February 26, 2013

I recently discovered a cute little front-end to nmap called zenmap.


Zenmap is installed by default in distributions such as Backtrack Linux, but is also found in Ubuntu’s repositories.

Read the rest of this entry »

On rectangles

February 19, 2013

While reading Cryptography: The Science of Secret Writing [1], the author makes a remark (p. 36) (without substantiating it further) that the number of possible distinct rectangles composed of n squares (a regular grid) is quite limited.


Unsubstantiated (or, more exactly, undemonstrated) claims usually bug me if the demonstration is not immediate. In this case, I determined fairly rapidly the solution, but I guess I would have liked something less vague than “increased in size does not necessarily provide greater possibilities for combination.” Let’s have a look at that problem.

Read the rest of this entry »

Suggested Reading: Cryptography: The science of secret writing

February 16, 2013

Laurence Dwight Smith —Cryptography: The science of secret writing — Dover, 1943, 164 pp. ISBN 0-486-20247-X

(Buy at Amazon.com)

(Buy at Amazon.com)

Read the rest of this entry »


February 12, 2013

The possible strategies for data compression fall into two main categories: lossless and lossy compression. Lossless compression means that you retrieve exactly what went in after compression, while lossy means that some information was destroyed to get better compression, meaning that you do not retrieve the original data, but only a reasonable reconstruction (for various definitions of “reasonable”).

Destroying information is usually performed using transforms and quantization. Transforms map the original data onto a space were the unimportant variations are easily identified, and on which quantization can be applied without affecting the original signal too much. For quantization, the first approach is to simply reduce precision, somehow “rounding” the values onto a smaller set of admissible values. For decimal numbers, this operation is rounding (or truncating) to the nth digit (with n smaller than the original precision). A much better approach is to minimize an explicit error function, choosing the smaller set of values in a way that minimizes the expected error (or maximum error, depending on how you formulate your problem).

Read the rest of this entry »

Crates of Bottles

February 5, 2013

The other day I was looking at a crate of 12 water bottles, and looked at the wasted space between them. Why not use a honeycomb? or even other bottle shapes?

Well, let us have a mathematical look at bottle packing. A round bottle occupies a surface (at the bottom of the box) of S=\pi r^2 (for some radius r) in a square of 4r^2. The occupancy is therefore

Read the rest of this entry »