3 ms·
Uniqueness would be a problem. The sum isn't guaranteed to have unique terms. 2 is (2,0,0) and (1,1,0).
by CalChris 8y ago
Uniqueness 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.