Using most frequent letters used as root in TST

https://www.math.cornell.edu/~mec/2003-2004/cryptography/subs/frequencies.html
Still haven't worked on getting these links working. I really don't want to touch the blog html until I understand what I'm doing and to what
#the most frequent letters used in english in order: ETAOINSR
#average word length = 7.6
#using ETAOINSR as root, should result in a more balanced TST tree
#make that 'ointesra' so that E and T are in the middle.

Ok, I think if your making a search tree for strings, the best thing to do would be use these letters as a root in some way.

I have to test it, but I'll update when I get some data.
For the TSTree were using in class, It only compares the first letter of the root to decide equal, high and low.
So basically, if I'm just analyzing english text, I'd want my root to be 'E', as most frequently used english letter, I'd think that would distribute the highs and lows most evenly.

If its a whole string it's comparing to in set method, I'd think we'd want the etaoinsr more evenly spread, like maybe 'otsaerns':
Then again maybe I need to look what is most frequent 'first' letters of words.  What do most english words start with?

Anyhoo, I'll update when I fiddle with it. 
Earned myself some T.V. time today.  Woot woot!

Comments

Popular posts from this blog

playing with color in powershell python

JavaScript Ascii animation with while loops and console.log

playing with trigonometry sin in pygame