dbiom
asked on
Two list de-cypher
Hi,
I have two lists of numbers, the second list I know is generated from the first, but I don't know how.
Given I have a number of known answers (over 3000) is it possible to decode to find the original algorithm which created the second list (as the first list has 'holes' in it). If it is possible - where and how do I go about doing it?
Thanks
I have two lists of numbers, the second list I know is generated from the first, but I don't know how.
Given I have a number of known answers (over 3000) is it possible to decode to find the original algorithm which created the second list (as the first list has 'holes' in it). If it is possible - where and how do I go about doing it?
Thanks
ASKER
HI,
certainly not a home work project - nor anything illegal!
000000 8396
000001 5954
000002 3870
000003 2353
000004 8963
000005 0901
000006 0422
000007 9944
000008 2560
000009 6622
000010 5602
000011 1266
000012 8684
000013 4663
000014 8143
000015 4570
000016 3770
000017 2201
000018 6539
000019 5650
000020 5354
000021 1374
000022 1834
000023 2773
000024 8426
000025 4471
000026 0444
000027 9697
000028 4406
000029 3922
000030 2015
Thanks
certainly not a home work project - nor anything illegal!
000000 8396
000001 5954
000002 3870
000003 2353
000004 8963
000005 0901
000006 0422
000007 9944
000008 2560
000009 6622
000010 5602
000011 1266
000012 8684
000013 4663
000014 8143
000015 4570
000016 3770
000017 2201
000018 6539
000019 5650
000020 5354
000021 1374
000022 1834
000023 2773
000024 8426
000025 4471
000026 0444
000027 9697
000028 4406
000029 3922
000030 2015
Thanks
What are the max and min numbers in your second list?
It looks like a list of four digit numbers with leading zeros allowed.
You said you have 3000 data pairs with some holes. What do the holes look like?
Do you have scattered data, or are there some scattered holes?
There are 10,000 possible 4 digit numbers: 0000 to 9999. And you have 30% of the data.
But there are 10,000! possible ways to shuffle these numbers.
http://gimbo.org.uk/texts/ten_thousand_factorial.txt
One of the techniques that might have been used to generate your list is described here:
https://en.wikipedia.org/wiki/Linear_congruential_generator
Look in particular at the Recurrence Relation formula at the top of the page.
Since your second list has a value of 9944, you might want to try the following values for m:
9949 9967 9973
These are the primes between 9944 and 9999.
You can use your first digit number as X_1, but you would have to guess at the values of a and c.
This technique will let you generate lots and lots of lists like the one you have. But the odds of getting the right one vanishingly small.
It looks like a list of four digit numbers with leading zeros allowed.
You said you have 3000 data pairs with some holes. What do the holes look like?
Do you have scattered data, or are there some scattered holes?
There are 10,000 possible 4 digit numbers: 0000 to 9999. And you have 30% of the data.
But there are 10,000! possible ways to shuffle these numbers.
http://gimbo.org.uk/texts/ten_thousand_factorial.txt
One of the techniques that might have been used to generate your list is described here:
https://en.wikipedia.org/wiki/Linear_congruential_generator
Look in particular at the Recurrence Relation formula at the top of the page.
Since your second list has a value of 9944, you might want to try the following values for m:
9949 9967 9973
These are the primes between 9944 and 9999.
You can use your first digit number as X_1, but you would have to guess at the values of a and c.
This technique will let you generate lots and lots of lists like the one you have. But the odds of getting the right one vanishingly small.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you - certainly gives me something to go on - mere curiosity and frustration at my lack of knowledge.
It might help if you could post some examples of your actual data pairs.
In general, you can come up with an algorithm to map your input to your output. In fact, you can come up with an infinite number of such algorithms. That means you probably won't come up with the one that was used originally.