3 ms·
Looks like code is at [0]. Didn't read in detail, but how difficult is it to find these 3 palindromes for something like a 100 digit number? Or, asked another w
by kodablah 8y ago
Looks like code is at [0]. Didn't read in detail, but how difficult is it to find these 3 palindromes for something like a 100 digit number? Or, asked another way, how hard will it be to crack my new 3-palindrome-sum-factor based encryption scheme (assuming I have rules about not having easy factors)?
0 - https://github.com/christianp/sum-of-palindromes https://github.com/christianp/sum-of-palindromes
- CalChris 8y agoUniqueness would be a problem. The sum isn't guaranteed to have unique terms. 2 is (2,0,0) and (1,1,0).
- gilleain 8y agoHuh, so its related to the problem of finding the restricted weak compositions of a number. A composition is an ordered partition. A partition is the set of numbers that sum to a particular number. The 'weak' part allows zeros.
- princekolt 8y agoAsymmetric key encryption then! Just replace Modulus(x,y) with this instead.
- exikyut 8y agoI guess the next question might be then, can the upper limit for the number of potential matches be found, if no restrictions are placed on the input sequence? Without thinking the problem through (about to sleep) I wouldn't be surprised if the answer is easily proven to be exponential (aka a firm "nope") but math can be unintuitive at times so I thought I'd ask anyway. I ask because, if the maximum number of potential matches isn't exponential (or is at least <= 3 digits long), it might be plausible to read through the number of matches to find "interesting" (elegant-looking) ones.