{"version":9,"randomSeed":"3dc12d1d3cb14addbc3d8db538b8ea34","graph":{"viewport":{"xmin":-2.6650153236508105,"ymin":-7.335986754485994,"xmax":18.584984676349226,"ymax":17.72300711374129}},"expressions":{"list":[{"type":"text","id":"11","text":"inspired by \"Huffman Codes: An Information Theory Perspective\" by Reducible (2021) https://www.youtube.com/watch?v=B3y0RsVCyrw"},{"type":"text","id":"2","text":"text: \"permission is hereby granted, free of charge\" (from the MIT licence)"},{"type":"text","id":"7","text":"symbols: space, comma, A, B, C, D, E, F, G, H, I, M, N, O, P, R, S, T, Y"},{"type":"text","id":"4","text":"probability distribution, indexed by symbol (1 to N)"},{"type":"expression","id":"5","color":"#388c46","latex":"P_{r}=\\left[6,1,2,1,1,1,7,2,2,2,3,1,2,2,1,5,3,1,1\\right]"},{"type":"expression","id":"8","color":"#000000","latex":"P_{n}=\\frac{P_{r}}{\\operatorname{total}\\left(P_{r}\\right)}"},{"type":"text","id":"13","text":"encoding for each symbol (in little-endian ternary)"},{"type":"expression","id":"14","color":"#6042a6","latex":"T_{I}\\left(n\\right)=\\left[\\operatorname{mod}\\left(\\operatorname{floor}\\left(\\frac{n}{3^{k}}\\right),3\\right)\\operatorname{for}k=\\left[0...20\\right]\\right]","hidden":true},{"type":"expression","id":"15","color":"#000000","latex":"I_{T}\\left(v\\right)=\\operatorname{total}\\left(v\\cdot\\left[3^{k}\\operatorname{for}k=\\left[0...20\\right]\\right]\\right)","hidden":true},{"type":"expression","id":"20","color":"#000000","latex":"E=\\left[I_{T}\\left(\\left[1,1,1\\right]\\right),I_{T}\\left(\\left[1,1,2\\right]\\right)\\right]"}]}}