Executive Summary:

This is an explanation of what I discovered as chronicled in User_blog:Enojado271/Imp_2_Map_Gen_Keys:_Over-Explained.

Every map key has two parts, a value and a length. Every key with the same value and length produces the same map.

The length is simply the number of characters in the key.

To calculate the value:

- Convert all the characters to their ASCII decimal values, which you can find here under the column "Dec": ASCII#ASCII_printable_characters
- Multiply each character's value by 2^(n-1) where n is the position of the character, counting from right to left. (In other words: do nothing to the rightmost character. Double the next one to the left. Multiply the next one left by 4, then 8, 16, 32, etc.) (In binary, you just add zero(es) at the end! -- Robin Patterson (Talk) 03:42, October 18, 2014 (UTC))
- Sum all these products for the map key's value.

See the example below.

Unicode creates negative values, though map keys with negative and zero value still seem to work fine. (For the Latin-1 Supplement block, subtract 256 from its decimal value. For the Latin Extended-A block, your guess is as good as mine.) There's probably some wraparound effect where map -1 or map 0 equals the highest number possible, but keys can have 32 characters, so the highest number possible is 126*(2^31) + 126*(2^30) + ... and I'm not chasing that bad boy down.

Example:

- Caun/Dath is a pair.
- C,a,u,n have ASCII values 67,97,117,110.
- 110 is rightmost, so take it as is. Multiply the next one to the left by 2, so 117*2=234. Next step left is times 4, so 97*4=388. Then times 8, so 67*8=536.
- Caun=536+388+234+110=1268.

So Caun has a value of 1268, and any key with a character length of four that sums to 1268 will be a pair with Caun.

Dath is a pair with Caun, so we expect Dath to equal 1268.

D,a,t,h have ASCII values 68,97,116,104.

68*8=544. 97*4=388. 116*2=232. 104*1=104.

544+388+232+104=1268, just like it should.