Re: Number relationships

From: Gary Shannon (gary_at_fiziwig.com)
Date: 03/16/04


Date: Tue, 16 Mar 2004 03:19:17 GMT


"Martin" <googlegroups@m-j-h.co.uk> wrote in message
news:6533d41c.0403151544.395837f8@posting.google.com...
> Hi,
>
> I have been asked to come up with a solution to a problem, I hope
> someone can point me in the right direction.
>
> I have about 130 of these 'pairs' of numbers/digits..
>
> Z6Z0A3769297 8890
> Z6Z0A3987667 1241
> Z7Z0A3688494 3535
> Z7Z0A3689284 5163
> Z7Z0A3689940 4864
> Z7Z0A3701738 1378
> Z7Z0A3725800 8891
> Z7Z0A3739301 5422
> Z7Z0A3745084 2314
> Z7Z0A3794858 8804
> Z7Z0A3808153 1850
> Z7Z0A3870255 3662
> Z7Z0A3903300 7047
>
> My task is to find out an algorithm that can create the 4 digits from
> the first set of numbers/digits.
>
> Im guessing that it could be some form of shift/rotate and xor
> function.
>
> Im really hoping somebody can help me with some ideas.
>
> Many thanks
>
> Martin...

Do any exist which do not start with "Z7Z0A3"? If they all begin that way
then that part of the string can be ignored by the algorithm.

Is this meant to be a "secret" code, or is it some kind of utilitarian hash
or checksum function not designed to be "hard" to crack?

Here's something you might play with and see what happens. Take only the
part that is not shared by all and sort them by original values. Then divide
them into groups according to the first digit:

6's group

688494 3535
689284 5163
689940 4864

7's group

701738 1378
725800 8891
739301 5422
745084 2314
769297 8890
794858 8804

8's group

808153 1850
870255 3662

9's group
903300 7047
987667 1241

Next, hack off the leftmost digit (the group number) and look for 4 seperate
algorithms, one for each group.

6's
88494 3535
89284 5163
89940 4864

7's
01738 1378 <- hmmm
25800 8891
39301 5422
45084 2314
69297 8890
94858 8804

8's
08153 1850
70255 3662

9's
03300 7047
87667 1241

With enough samples it might be possible to recursively decompose the
algorithm into a bunch of separate algorithms and then synthesize them back
into a single algorithm. Fo example, do you have more than one input value
that starts with "Z7Z0A370xxxx" since when xxxx=1738 then the code is 1378.
Some more examples of "Z7Z0A370xxxx" might provide more clues to decomposing
the algorithm.

The rationale is that for the 7's group, for example, any contribution made
by the '7' to all the codes in that group will be a constant in the
algorithm that works only for the 7's group, but will be a different
constant in the algorithm for the 6's group. (I'm not explaining this very
well, but I hope I'm getting the picture across). To re-systhesize the
common algorithm for the 6's group and the 7's group requires replacing the
constant with another function that returns that constant when given "6" or
'7', and so on.

This won't work for some alogrithms, but if the algorithm is simple enough
it might give you a finger hold you can use to pry it open with.

--gary



Relevant Pages

  • Re: No Set Contains Every Computable Natural (was Church-Turing compared to Zuse-Fredkin thesis)
    ... Russell is right about Turing saying this, ... You might not want to call this an algorithm which has ... decimal representation of x digit by digit. ...
    (comp.theory)
  • Re: Powers and logic
    ... quasi wrote: ... It is easy to give an algorithm which could be calculated ... one can always find the leading digit by inspection. ... The space requirement would exceed the capacity of ...
    (sci.math)
  • Re: Large-numbers division way too slow -- what to do?
    ... > algorithm is now responsible for most of the slowness. ... I want to return the quotient or the remainder). ... In the division function, at the very bottom, I placed: ... processing the last digit becomes the remainder. ...
    (sci.crypt)
  • Why are reals uncountable yet algorithms countable (long)?
    ... If you are going to say: construct a number from one digit ... you cannot enumerate the infinite digits.I have read that, unlike reals, ... one of these algorithms would also be an algorithm ... enumeration of algorithms cannot produce all reals? ...
    (sci.math)
  • Re: Displaying large numbers
    ... The routine is meant to be used from BASIC, as it returns the address of the first ASCII digit after conversion. ... because the algorithm I've written extracts digits from least significant to most significant, the number is stored in memory that way. ... Remainder is a little number that can be held in a 8-bit register, and it's the least significant digit in decimal. ... Aseembler source code ...
    (comp.sys.sinclair)