OK, this is not really an advanced

Java question, its more of an advanced algorithms question.

Everyone knows how to convert to and from Roman numerals from Arabic numbers. Its typically a CS101 topic.

When I was studying for my PhD, one of my commitee members mentioned that the clever way to do the conversion was to notice that Roman numerals have dual radix. While most programmers can think in binary or hex in addition to decimal, each of these has only a single radix (2, 16 or 10).

If you look a the standard converstion table, it looks like:

Notice that the I, X, C, and M are essentially decimal, but the V, L, and C are used for digits near 5. So its nearly a base 10 and base 5 system.

What I never found out was the clever way to use this to have code more elegant than the usual switch statements.

Anybody seen an implementation?