Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Imagine you give someone a card with the code "5SBDO0" on it.

In some fonts, the letter "S" is difficult to visually distinguish from the number five, (as with number zero and letter "O").

Reading the code out loud, it might be difficult to distinguish "B" from "D", necessitating saying "B as in boy," "D as in dog," or using a "phonetic alphabet" instead.

What's the biggest subset of letters and numbers that will, in most cases, both look unambiguous visually and sound unambiguous when read aloud?


Background:

We want to generate a short string that can encode as many values as possible while still being easy to communicate.

Imagine you have a 6-character string, "123456". In base 10 this can encode 10^6 values.

In hex "1B23DF" you can encode 16^6 values in the same number of characters, but this can sound ambiguous when read aloud. ("B" vs. "D")

Likewise for any string of N characters, you get (size of alphabet)^N values.

The string is limited to a length of about six characters, due to wanting to fit easily within the capacity of human working memory capacity.

Thus to find the max number of values we can encode, we need to find that largest unambiguous set of letters/numbers. There's no reason we can't consider the letters G-Z, and some common punctuation, but I don't want to have to go manually pairwise compare "does G sound like A?", "does G sound like B?", "does G sound like C" myself. As we know this would be O(n^2) linguistic work to do =)...

share|improve this question
6  
Note that what letters are pronounced similar can differ a lot between languages... –  Michael Borgwardt Mar 25 '12 at 21:37
    
Besides, what exactly is the Latin alphabet? –  MSalters Mar 26 '12 at 10:55
    
See also my answer in a related StackOverflow question. –  MSalters Mar 26 '12 at 10:56
    
For the visual distinction, Base 32 is a standard encoding that limits the similarities of the symbols. –  barjak Mar 26 '12 at 13:07
    
@MSalters The "Latin script" is a linguistics idea, for our purposes I really just mean "select from the subset of the Latin script that is codified into Unicode," e.g. en.wikipedia.org/wiki/ISO/IEC_8859-1 –  elliot42 Mar 26 '12 at 20:19
show 1 more comment

4 Answers

up vote 13 down vote accepted

You should partition the set of alphanumerics into groups by visual similarity, and choose a “most iconic” representative from each group. This is somewhat subjective, though you could run user tests on it. The choices you make also depend on whether the figures will be printed or handwritten. For example:

  • { O, 0, Q, D }

  • { I, L, 1 }

  • { B, 8 }

  • { Z, 2 }

  • { S, 5 }

  • { 7, T }

  • { U, V, Y }

Similarly, partition characters by the phonetic similarity of their names’ pronunciations:

  • { A [ʔeɪ], 8 [ʔeɪ(ʔ/t)] }
    = starts with [ʔeɪ]

  • { P [pi:], B [bi:], V [vi:], D [di:], T [ti:], E [ʔi:] }
    = stop/fricative + [i:]

  • { G [ʤi:], C [si:], Z [zi:], 3 [θɹi:] }
    = fricative/affricate (cluster) + [i:]

  • { M [ɛm], N [ɛn] }
    = [ɛ] + nasal

  • { S [ɛs], F [ɛf], X [ɛks] }
    = [ɛ] + fricative/affricate

  • { I [ʔaɪ], Y [waɪ], 5 [faɪv], 9 [naɪn] }
    = consonant + [aɪ] + (consonant)

  • { Q [kjʉ:], U [jʉ:], 2 [t(j)ʉ:] }
    = consonant + [(j)ʉ:]

These are, of course, not the only possible partitions, just what come to mind at the moment. Regardless, they should be enough to get you started for further testing. Also, these aren’t backed up by any professional sources—I cite only my hobbyist backgrounds in typography and phonetics.

share|improve this answer
    
Fascinating, thank you! –  elliot42 Mar 25 '12 at 22:25
2  
For a start with Auditory similarity, have a look at radio communications such as Air traffic Control operations manuals( where verbal communications must be correctly interpreted or people die) and Ham Radio. For instance 5 and 9 are easy to mix up, hence spoken as "five" and "nine-a" –  mattnz Mar 25 '12 at 23:42
    
@mattnz: Thanks, I forgot 5 and 9. Audio quality is a big factor as well: radios, telephones, studio recordings, and in-person communications all pose their own unique problems. –  Jon Purdy Mar 26 '12 at 0:28
    
Technically that's "niner," four is "fower." –  Patrick Hughes Mar 26 '12 at 0:35
add comment

You could use Mechanical Turk to have real people rate all 26^2 pairs of letters for aural and visual similarity. The advantage is that you could even get data for various native languages this way.

share|improve this answer
add comment

For English, the soundex and Metaphone algorithms encode which sounds are ambiguous. Soundex is probably too simple, but Metaphone incorporates some good points. Do you want the sequence "OU" ? That could be pronounced in many ways, as this sentence demontrates ;)

share|improve this answer
    
Neat, useful, thank you! –  elliot42 Mar 27 '12 at 1:11
add comment

Jon Purdy's answer above seems most correct. For practical purposes, I am trying z-base-32, a non-standard base32 encoding designed with communicability in mind. It looks functional, though not ideal--e.g. they explicitly didn't focus on spoken disambiguation.

http://philzimmermann.com/docs/human-oriented-base-32-encoding.txt

http://pypi.python.org/pypi/zbase32/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.