Wikipedia:Reference desk/Archives/Mathematics/2006 October 28

From Wikipedia, the free encyclopedia
Mathematics desk
< October 27 << Sep | October | Nov >> October 29 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 28[edit]

Finding a formula based on known numbers[edit]

Fixed Number = 00000000000 / Outcome = 0
FN = 11111111111 / O = 3
FN = 22222222222 / O = 6
FN = 33333333333 / O = 9
FN = 44444444444 / O = 2
FN = 55555555555 / O = 9
FN = 66666666666 / O = 2
FN = 77777777777 / O = 5
FN = 99999999999 / O = 1
FN = 12345678901 / O = 5
FN = 11223344556 / O = 1
FN = 10987654321 / O = 5
FN = 22446688001 / O = 6
FN = 11335577990 / O = 2
FN = 53216854234 / O = 0
FN = 43583209432 / O = 8
FN = 12309124097 / O = 8

Is there a way to find out the formula that reaches these conclusions, or is this some known calculative formula i am missing?Avalean 16:50, 28 October 2006 (UTC)[reply]

I think it may have something to do with sum of the number's digits. Try making a table of sums and results, and see where that gets you. -- Meni Rosenfeld (talk) 16:57, 28 October 2006 (UTC)[reply]
53216854234 and 43583209432 both have 43 for the sum of digits but have different outcomes. Check digits are often formed by taking a weighted sum of the digits modulo some number, which in the beginning looks promising but breaks down at 55...5. The number of possibilities is endless, and without some inspired guess you aren't going to get anywhere. What is the source of these numbers? Would it have been possible to vary just one number at a time?  --LambiamTalk 20:05, 28 October 2006 (UTC)[reply]
The use of these numbers is similar to a bar code check number. The final digit to a bar code. I have the program that generates these codes but I'm trying to figure out the formula to it. As you said above lambiam, its not mod or the sum of some numbers. I was trying to get the formula to be able to calculate the check digit for many bar codes in one swoop.Avalean 01:50, 29 October 2006 (UTC)[reply]
If you have a large database of valid numbers with their codes, try comparing ones that differ only by one number (or as few as you can find). - Rainwarrior 04:08, 29 October 2006 (UTC)[reply]
Hello! Did you try any research for barcode check number ? this looks interesting : [1] -- DLL .. T 22:04, 29 October 2006 (UTC)[reply]
If by "barcode" you mean Universal Product Code, its check digit formula fits the pattern I gave above (weighted sum of digits modulo some number). This is ruled out by the actual outcomes: 55...5 and 33...3 both give 9, but the difference 22...2 does not give 0.  --LambiamTalk 04:58, 30 October 2006 (UTC)[reply]
But... the barcode generator servlet linked to by DLL does turn out to give the same outcomes if for "Barcode symbology" you select "MSI". Changing a few select digits one at a time shows patterns suggestive of the general weighted-sum pattern modulo 10. So when/where/why does this break down? Or we could try to cheat and find the MSI algorithm somewhere on the Internet.  --LambiamTalk 05:16, 30 October 2006 (UTC)[reply]