Introduction
Many communication problems involve sending information from one function to another by sending
Unable to parse markup [type=CF_MATHJAX]
(base $$$b$$$). In these problems, we often need to change the information that we want to send from one base to another.This can be particularly tricky when the information that we want to send is a sequence of numbers. A common way to do so is to send each number one by one using
Unable to parse markup [type=CF_MATHJAX]
digits where $$$b$$$ is the base we can send information in and the elements of the sequence are between $$$0$$$ and $$$k - 1$$$. The problem with this is that if we are sending $$$l$$$ numbers, we are possibly wasting some digits asUnable to parse markup [type=CF_MATHJAX]
.In this blog, I will be demonstrating a way to encode $$$n$$$ sequences $$$a_0, a_1, \ldots, a_{n - 1}$$$, each sequence $$$a_i$$$ consisting of $$$l_i$$$ non-negative integers
Unable to parse markup [type=CF_MATHJAX]
. The sequences will be encoded into a single sequence $$$x$$$ of length $$$m$$$ consisting of non-negative integersUnable to parse markup [type=CF_MATHJAX]
, whereUnable to parse markup [type=CF_MATHJAX]
. Conveniently, the inverse operation to decode sequence $$$x$$$ back into $$$n$$$ sequences $$$a_0, a_1, \ldots, a_{n - 1}$$$ follows a very similar structure which I will show below.