Sunday, October 28, 2018

Huffman trees

                                        161                                     
                    59                                      102                 
          27                  32                  51                  51        
     11        16        16        16                                           
  5    6    8    8    8    8    8    8                                          
      3 3            4 4  4 4  4 4  4 4                                         
                    2222 2222                                                   
                                                                                
                                                                                
                                                                                

This tree is asymmetric, and low resolution. I can increase the resolution 10 and get the more balanced tree:
                                        161                                     
                    64                                      97                  
          32                  32                  41                  56        
     16        16        16        16        16        25        28        28   
  8    8    8    8    8    8    8    8    8    8    11   14                     
 4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  5 6  7 7                     
2222 2222 2222 2222 2222 2222 2222 2222      2222 2333                          
1111 1111 1111 1111 1 11      1111 1111      1111  2                            
                                                   1             

More balanced, high resolution. the function I am quantizing is tanh, by the way. let us increase the resolution another ten.:
                                        161                                     
                    64                                      97                  
          32                  32                  36                  61        
     16        16        16        16        16        20        29        32   
  8    8    8    8    8    8    8    8    8    8    8    12   14   15   16   16 
 4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  6 6  7 7  7 8  8 8  8 8 
2222 2222 2222 2222 2222 2222 2222 2222      2222 2222 3333 34     44 4444 4444 
1111 1111 1111 1111 1111 1111 1111 1111      1111   11   2   2        2222 2222 
                                                         1            1111 1111 
                                                                                
Much more balanced. The path length from root to leave is the rarity of the code. When most numbers have almost the same path then there is not much compression, their index is preserved almost everywhere preserved.

Notice the total count is fixed, and this is an instability when increasing resolution, the graph will constantly requantize because the measurement more accurate than the data.

But, in an automatic S&L, the window sizes can be adjusted, causing either loans or deposits queues to differentiate from each other.  The goal is to try and keep the tree mostly stable, and and allow imbalance, with the market making function making the two graphs homomorphic..  When the two are homomorphic then those n\count numbers should be in mostly a constant ratio across trees.  Then the bot can apply interest charges by minimizing its market clear cost, bit error.

Increasing the resolution mens adding one more decimal digit of resolution, in this case.  I am not limited to decimal or binary.  I can scale the floating point numbers, fractionally, then convert to int.

Notice rank tends to increase as resolution increases.  But these patterns, and dealing with them, is essential to the marginal autobanker.

Chart analysis is simple estimating this graph via geometry on the time series, but they are looking for changes in the bottlenecks.  These tree isolate that data for them, they can see all the bottlenecks, spatially, at once; like watching a WalMart checkout. We can do it numerically.

Anything to do with join?

More than likely, yes.  This is a tree, generated by the pit boss. The bot is a search graph, with little interface, the bot can treat the structured market queues as a simple 'step and skip' directed graph.  The longer paths are the rare deals.  This is what bots do.

I have a bunch of stock market data, again. In a few days I will bring it up and we can look at market structure, directly.


No comments: