Talk:Mixed radix

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Here are some subtopics that might help the exposition along once the proper references are dug up …

Why each radix must be an integer[edit]

For example Dollars/Quarters/Nickels/Pennies makes a perfectly good MRN system, but Dollars/Quarters/Dimes/Nickels/Pennies doesn't because the radix Dimes -> Quarters is 2.5, and 0100422.50245 (2-dimes,4-pennies) doesn't know whether to roll over to 0100422.51205 (2-dimes,1-nickel) or 0101402.50205 (1-quarter).

There is a perfectly legitimate 'base by' notation, which does support fractional integers. Binary-coded decimal is an example. In the case of us money, one would consider the quarter (1s 3d) to be 2 dimes (6d) + 1 nickel (3d), You could have a dime and a nickel, or two dimes, but no other combination. (I put money equivalents in so to follow what is going on.) The quarter is then 5 nickels, counted by intermediate dimes.
In the usual form, one might count in decimal to say, 71, and then roll over to 1,00. This would be 'base 71 by 10s'. Computers are quite at ease handling BCD, and one can express any base in a decimal, or other form, encoding, even when this does not divide. Bases like 2.61803398875 etc work by having a broken carry, and you can have complex bases by having a double column negative carry.
--Wendy.krieger (talk) 07:33, 17 November 2011 (UTC)
A radix doesn't necessarily have to be an integer. You just have to make sure that the number that you use to count by divides your radix evenly. One divides every integer, so that's why bases are typically integers. But if you count by fourths you can have a radix of 1/2. I've been using the term "step" to define what number you count by. For instance, counting with base 3/2 step 1/2 gives the following sequence, where each number is separated by a comma, and certain digits within a number are separated by parenthesis:
0, 1/2, 1, (1/2)0, (1/2)(1/2), (1/2)1, 10, 1(1/2), 11, (1/2)00, (1/2)0(1/2), (1/2)01, (1/2)(1/2)0, (1/2)(1/2)(1/2), (1/2)(1/2)1, (1/2)10, (1/2)1(1/2), (1/2)11, 100...
This sequence translates to the more familiar quantities:
0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9....
So the number two in the familiar base ten step one system is written in the base 3/2 step 1/2 system as (1/2)(1/2). And the number four would translate to 11. Four and a half (4.5) would be represented as (1/2)00, and nine would be 100.
So you can have a non-integer radix, but only if you are counting by a number less than one. It's interesting how having a non-integer radix creates fractional digits though.
Theboombody (talk) 17:44, 8 May 2013 (UTC)
A practical example of a non-integer radix is a system based on poles/rods/perches and yards - there are 5 12 yards in a pole/perch/yard. An example using irrational numbers is radians and revolutions - 2π radians in a revolution.Martinvl (talk) 18:03, 8 May 2013 (UTC)

1 is a perfectly good radix[edit]

Radix 1 digits can act as place holders, but don't otherwise affect the MRN system.

Proper and improper MRNs[edit]

"Improper" MRNs have digits equal to or greater than their radices. They still specify integers, but these may not be limited to the product of the radices minus 1.

I don't know. A base of 3, with digits 3, 1, -1, works quite nicely. Wendy.krieger (talk) 08:32, 30 October 2011 (UTC)


Procedure to generate the proper MRN from an improper one if the integer represented is within range. Uses truncating division and the modulo operator. Overflow results if the integer is not in range.

Addition and scalar multiplication[edit]

Addition defined in the obvious way on two MRNs with the same base produces in general an improper MRN, which is rendered into a proper one using carry (with the possibility of overflow). Scalar multiplication on an MRN is just multiplying all the digits by a (non-negative) integer. Again carry is applied and overflow is a possibility.

long division, long multiplication are both implemented by scalar multiplication (or division), and addition. The method of practice allows one to multiply lengths in chains, yards and feet to get a result in acres, roods, and perches, with no reduction of unit. You can do things like find 3 3/8% of £21 10 6 with no reduction
   100%  costs  £ 21 10 6       0@    =   0
    10%  costs  £  2  3   .5    0     =   0
     1%  costs        4  3.65   3     =   1s   10.95d
   1/8%  costs           0.65   3     =         1.95d
                                          2s    0.90d  =   2s 3/4d  or 2s 1d
One sees in this example, a multiplication of mixed radicals, with little confusion. This is what i call 'invoice arithmetic' but i seen a reference in an old 'shilling arithmetic' as the method of practice. Wendy.krieger (talk) 08:42, 30 October 2011 (UTC)

Conversion between MRN systems[edit]

Obvious algorithms for doing this using the above tools are well known (so says I, research to be done :-) Doing these conversions efficiently seems to be a serious issue in Computer Science.

--J. W. McLeod 19:04, 27 Mar 2005 (UTC)

Factorial radix system[edit]

the table shows 0! as 0 whereas it should be 1. There is probably a good reason for this, but it's not obvious. Would s/o care to elaborate ? — Preceding unsigned comment added by (talk) 23:36, 28 September 2011 (UTC)

The product of zero numbers leaves the original undisturbed, and is so 1. Even something like a × x0 = a, for all values of x, including x=0. Elsewise, one can argue that any number is equal to any other, by virtue that
  a = a.00,    by virtue that the LHS has zero values = 0
    = 0                   by placing 0^0 = 0
It's pretty much simple to demonstrate that whatever you set 0^0, like all x^0, equals 1, as is the product of an empty list.
So it's
  0! =    product()     = 1
  1! =    product(1)    = 1
  2! =    product(1,2)  = 2
  3! =    product(1,2,3)= 6
Wendy.krieger (talk) 08:30, 30 October 2011 (UTC)
Huh? The table shows 0! as 1. Double sharp (talk) 10:18, 23 June 2014 (UTC)