Yearly Archives: 2006

2 More Pickover Puzzles

Every now and then Pickover tosses out an extremely obvious puzzle. Given the following sequence of numbers:

  1, 27, 125, 343, 729, 1331, 2197, 3375, x

what is x? Now, when I say “obvious” in this context I should clarify that the solution is relatively straightforward to the math-trained mind. Typically the solutions to such numerical puzzles are along the lines of “The latitude coordinates of the original U.S. colonies multiplied by the longitude coordinates of the same, then add 3.”

Anyway, that was today’s puzzle. The puzzle for April 4 was to find the numbers, A and B, that satisfy the following equation:

  AB + BA = A7

My first impulse was there should be some way to solve for A and B, maybe involving logarithms or something, until I noticed that there were 2 variables and only 1 equation which, per my math classes of long ago, proves difficult. So, a brute force program it was. Surprisingly, there is only 1 solution.

See [more] for the answers, I mean, if you really care.

I have a stack of puzzles to work through that should be brute-force-able using a combination of permutation logic and graph techniques. Eventually, I imagine I will be able to assemble a program toolkit to rip through an entire year of these puzzles automatically.

Continue reading

Mimic Doc

Browsing through the MultimediaWiki I found a codec called Mimic that I previously had not paid too much attention to. I remember someone on the ffmpeg-devel list inquiring about some reverse engineering advice regarding the codec with the FourCC ML20, which is a.k.a. Mimic. The FourCC was apparently a bit frustrating to work with because it only occurs on the wire– it is only used for teleconferencing app and there are no apps to easily save the encoded data into a handy container format.

Anyway, someone persisted (one Ole André Vadla Ravnås according to the source headers) and eventually reverse engineered the complete codec and created an open source library called libmimic, according to the Wiki page. The link on the Wiki page for libmimic does not seem to work. However, another open source teleconferencing app called Farsight incorporates the full library, which even knows how to encode video.

It’s a very simple codec for those of us — ahem — skilled in the art. I’ve done my best to document the details based on the RE’d source code. Stop me if you’ve heard this one before: Transform 8×8 blocks of data with discrete cosine transform -> quantize DCT coefficients -> zigzag coefficients -> Huffman code the non-zero coefficients and zero-runs between the non-zero coefficients. The only major intraframe coding concepts the codec is missing are macroblocks and delta coding. Interframes feature frame differencing– if a block is unchanged from the block at the same position in the previous frame, leave it alone. Good design decision for a teleconferencing video codec.

Everyone Looks Good

Here’s yet another article about that U.S. government-funded bug scan that Coverity is performing for various prominent open source projects: Developers fast to fix open-source bugs. From the graph accompanying the article, it looks like the exercise has been an unqualified success. However, I’m privy to the results of some of those scans. I can tell you that the scanning tools are highly paranoid and report large numbers of “bugs” that are non-issues. It’s curious to note that this has dual positive effects:

  1. Coverity’s tools look good due to the sheer volume of “bugs” they detect
  2. Open source developers look awesome in light of their ability to fix hundreds of bugs in a week