International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 41 - Number 15 |
Year of Publication: 2012 |
Authors: Jyotika Doshi, Savita Gandhi |
10.5120/5618-7910 |
Jyotika Doshi, Savita Gandhi . Implementing a Novel Data Structure for Maintaining Cumulative Frequency of Symbols. International Journal of Computer Applications. 41, 15 ( March 2012), 34-40. DOI=10.5120/5618-7910
A new data structure, namely "cumulative frequency matrix (CFM)", is proposed here for maintaining cumulative frequencies. For an order-0 model having 256 symbols, CFM is a 2-D array of 16 rows and 16 columns. Two nibbles, say L for left and R for right, of a byte symbol represents row and column dimensions respectively. Matrix element (L, R) represents cumulative frequency of symbol with right nibble as R among symbols with left nibble as L. Within row, it stores cumulative frequency of symbols with right nibble varying from 0 to 15. Adaptive arithmetic coding is a lossless data compression method. It needs to update cumulative frequencies at runtime. Various algorithms for maintaining cumulative frequencies, computing cumulative frequency interval etc. are discussed here. Practical implementation shows that proposed data structure is simpler as well as efficient as compared to other data structures in use.