5 ms·
> In CS, most algorithms assume an ASCII character set. They most certainly do not. E.g., a Turing machine assumes an alphabet Γ which is a set of some charact
by deathanatos 5y ago
> In CS, most algorithms assume an ASCII character set.
They most certainly do not. E.g., a Turing machine assumes an alphabet Γ which is a set of some characters and is defined no further, as any exact definition is meaningless to the theory. (I.e., the algorithm is generic over any alphabet.) The alphabet need not even be text; e.g., for a Turing machine, the set of all octets suffices.
Even for something like Levenshtein distance, the only real requirement of the algorithm is that the abstract "characters" implement equality testing. For Unicode text, I'd start with graphemes, and then look for counter examples.
- trinovantes 5y agoI guess they won't break correctness but I do remember many algorithms (e.g. tries) assume you have constant random access to characters which AFAIK is not possible in UTF-8