Send to a Friend

LostInParadise's avatar

Can you figure out how to do this renumbering?

Asked by LostInParadise (31914points) June 25th, 2010

This problem gets its inspiration from something that came up at work.

A company creates batch and sequence numbers for each product. To keep things simple, suppose that the batch number is four digits and the sequence number is one digit. The obvious way to get from one batch number/sequence number is to treat the pair as a single five digit number and add one. For example to get from 0743/9 is to form 7439+1= 7440, giving 0744/0. This is what the programmer in fact did, but there is one small hitch. The sequence numbers go from 1 to 9, no zeroes. So in the above example, the next assignment would be 0744/1.

The programming change is not hard, just add another 1 if you get a zero, but what about the numbers that have already been assigned? Can you think of a way of converting 0072/1 under the original numbering to what it should be?

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.