2

I've already done some research on this topic, but it still isn't quite clear to me.

According to this post patricia trees are radix trees with $r = 2$. Every patricia tree I've seen so far is used to store alphanumeric symbols. Assuming that there are used 8 bits to represent one symbol, $r$ is the number of bits compared and the radix of a radix tree is $2^r$ shouldn't the radix of a patricia tree be $2^8 = 256$?

If you have a look at a PATRICIA Tree with the following inputs (in this order):

  • smile
  • smiled
  • smiles

According to the linked post a Patricia tree should then look like this:


smile - - - smiled - - - smiles

But intuitively (by the alphanumeric representation) it should look like this

       d
      /
smile 
      \
       s
Ian Fako
  • 123
  • 3

1 Answers1

1

Quoting Wikipedia:

PATRICIA trees are radix trees with radix equals 2, which means that each bit of the key is compared individually and each node is a two-way (i.e., left versus right) branch.

According to Wikipedia, Patricia is just a "brand name" coined by Donald R. Morrison, standing for Practical Algorithm To Retrieve Information Coded In Alphanumeric.

Patricia trees thus accept their input in the form of binary strings. If the input is a word, then it is first encoded in binary.

As for the smile/smiled/smiles example, it is explained in the linked post – each of these words is encoded as a binary string, and this is what the Patricia tree sees. It is completely unaware of the semantic interpretation of the bitstring as an alphanumeric word.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514