From: Gennady Bystritsky Date: 2009-11-12T00:51:07+09:00 Subject: Re: Roman Numerals (Arrgh!) On Nov 11, 2009, at 5:35 AM, Rob Biedenharn wrote: >>> >>> And with an appropriately formed $numerals array, the "subtraction >>> rule" is already covered. ;-) >> >> Would you please elaborate? You mean same algorithm and "better" >> $numerals would cover mapping of 4 => "IV", 9 => "IX", etc.? >> >>> >>> -Rob > > > Yes, that's it exactly. Testing/using 9 before 5, you find IX (and > stop) before you go to VIIII. You can't repeat one of the "subtraction > groups" the way that you can repeat the individual numerals: 8 is > always VIII and never IVIV or IIX Now you intrigued me ;-). So I am asking directly -- given the following $numerals: $numerals = [[1000, "M"], [500, "D"], [100, "C"], [50, "L"], [10, "X"], [5, "V"], [1, "I"]] ...how one can transform it so that the original algorithm would produced shortened roman numbers? Please present the exact value of $numerals satisfying the above condition. Gennady.