Talk:Information theory/Permutations and combinations

Back to Information theory/Permutations and combinations

Alternative proof (submitted to WP)
Lifted from Multinomial Theorem of 2ⁿᵈ kind by w:User:Seeker220

Theorem : The number of non-negative integral solution of the equation $$x_1+x_2+x_3+\cdot\cdot\cdot+x_k=n$$ is $${n+k-1 \choose k-1}$$ Proof : Let $$Equation-1 :=x_1+x_2+x_3+\cdot\cdot\cdot+x_k=n$$ Let $$f(y_1,y_2,y_3,\cdot\cdot\cdot,y_k)=(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$ ∴ Each term of $$f(y_1,y_2,y_3,\cdot\cdot\cdot,y_k)$$ will be of the form $$\displaystyle\sum_{x_1+x_2+x_3+\cdot\cdot\cdot+x_k=n} {\frac{n!}{x_1! x_2! x_3! \cdot\cdot\cdot x_k!}\ y_1^{x_1}} y_2^{x_2} y_3^{x_3} \cdot\cdot\cdot y_k^{x_k}=\displaystyle\sum_{Equation-1} {\frac{n!}{x_1! x_2! x_3! \cdot\cdot\cdot x_k!}\ y_1^{x_1}} y_2^{x_2} y_3^{x_3} \cdot\cdot\cdot y_k^{x_k}$$ $$Where\ x_i\geq0\ for\ all\ i\in[0,k]$$
 * 1) For each unique non-negative solution of Equation-1, there exist a unique monomial term of degree n of $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$.
 * 2) For each unique monomial term of $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$, there exists an unique non-negative solution of Equation-1
 * 3) No unique non-negative solution of Equation-1 yields two different monomial terms of $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$.
 * 4) No unique monomial term of $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$ yields two different non-negative solution of Equation-1.

Thus, by [https://en.wikipedia.org/wiki/Bijection#:~:text=For%20a%20pairing,one%20element%20of%20X. bijection ], $$\#terms\ of\ g(x)=\#non-negative\ integral\ solutions\ of\ Equation-1$$

Thus, to prove the theorem, it is sufficient to prove that number of terms of $$f(x)$$ is $${n+k-1 \choose k-1}$$

Now, we shall proceed by [https://en.wikipedia.org/wiki/Mathematical_induction#Description#:~:text=The%20simplest,use%20that%20value. Mathematical Induction].

Also, for k=2, $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$ is $$(x_1+x_2)^n=\displaystyle\sum_{i=0}^n {{n \choose i}x^i y^{n-i}}$$, which has $$\displaystyle\sum_{i=0}^n 1\ terms\ of\ the\ form\ {n \choose i}x^iy^{n-i}$$. $$\displaystyle\sum_{i=0} ^n 1=(n+1)={n+2-1 \choose 2-1}$$ $$(x_1+x_2+x_3+\cdot\cdot\cdot+x_{r+1})^{n}=\left[(x_1+x_2+x_3+\cdot\cdot\cdot+x_r)+(x_{r+1})\right]^n=\displaystyle\sum_{i=0}^n {{n \choose i}(x_1+x_2+x_3+\cdot\cdot\cdot+x_r)^iy^{n-i}}$$ $$For\ each\ unique\ i,\ {n \choose i}(x_1+x_2+x_3+\cdot\cdot\cdot+x_r)^ix^{n-1}\ has\ {i+r-1 \choose r-1}\ unique\ terms.\left[ From\ Induction\ Hypothesis\right]$$ Thus, $$Number\ of\ terms\ of\ (x_1+x_2+x_3+\cdot\cdot\cdot+x_{r+1})^{n}=\displaystyle\sum_{i=0}^n {{n \choose i}(x_1+x_2+x_3+\cdot\cdot\cdot+x_r)^iy^{n-i}} \ is\ \displaystyle\sum_{i=0}^n{i+r-1 \choose r-1}\ terms.$$ $$ \begin{align} \displaystyle\sum_{i=0}^n{i+r-1 \choose r-1}={r-1 \choose r-1}+{r \choose r-1}+{r+1 \choose r-1}+{r+2 \choose r-1}+\cdot\cdot\cdot \\ +{n+r-2 \choose r-1}+{n+r-1 \choose r-1}=\left[{r \choose r}+{r \choose r-1}\right]+{r+1 \choose r-1}+{r+2 \choose r-1}+\cdot\cdot\cdot \\ +{n+r-2 \choose r-1}+{n+r-1 \choose r-1}=\left[{r+1 \choose r}+{r+1 \choose r-1}\right]+{r+2 \choose r-1}+\cdot\cdot\cdot \\ +{n+r-2 \choose r-1}+{n+r-1 \choose r-1}=\cdot\cdot\cdot \\ =\left[{n+r-2 \choose r}+{n+r-2 \choose r-1}\right]+{n+r-1 \choose r-1}={n+r-1 \choose r}+{n+r-1 \choose r-1}={n+r \choose r}\ \left[ Thus,\ proved \right] \end{align} $$
 * Base Case: $$(y_1+y_2+y_3+\cdot\cdot\cdot+y_k)^n$$ for k=1 is $$(y_1)^n=y_1^n$$, which has $$1={n+1-1 \choose 1-1}\ terms$$ terms.
 * Induction Hypothesis: Let for some $$k=r$$, $$(x_1+x_2+x_3+\cdot\cdot\cdot+x_r)^n\ \ has\ {n+r-1 \choose r-1}\ terms$$
 * Inductive Step: We have to prove that for $$k=r+1$$ too, $$(x_1+x_2+x_3+\cdot\cdot\cdot+x_{r+1})^{n}\ \ has\ {n+(r+1)-1 \choose (r+1)-1}\ terms,\ i.e.\ {n+r \choose r}\ terms$$

Labeling every proton in the universe
Suppose we adopt a labeling system by which This problem is inspired by the ASCII code (see $$), as well as the fact that there are an estimated $10^{80}$ protons in the visible universe.

To illustrate how much information even a modest number of characters can transmit, consider strings made from permutations of the 94 ASCII characters that are both printable and visible. One benefit of performing this calculation is that it highlights the superior accuracy of the second order approximation,
 * $$\ln n! \sim n\ln n - n$$,

to the first order approximation favored by those who are only comfortable with base-10 logarigthms:


 * $$\log_{10} n!\sim n\log_{10}n.$$

A calculation like this should be left as an exercise for students, who are encouraged to post their calculations on Wikiversity. What follows is this Wikiversarian's work resulting from performing the calculation using two different tools available to anybody with internet access: First, Google Search was used as an online calculator. Second, Google Documents was used to generate a spreadsheet. Both calculations give the same result.

Google Search as a Calculator
$$94! = 1.087366\times 10^{146}$$

$$\log_{10}(94!)=146.036375812$$

$$94\times\log_{10}(94)=185.474018238 \sim \log_{10}(94!)$$

By hand (without calculato)r
$$\log_{10}(94) = 1.9731278536\approx 2$$ $$\log_{10}(94)\approx 2$$

$$\Rarr 94\times\log_{10}\approx 94\times 2 = 188\sim\log_{10}(94!)$$

Both require Sterling's approximation
use $$\log_{10}X=\frac{\ln X}{\ln{10}}$$

$$\ln(94!)\sim 94\times\ln(94)-94 = 94 \times (4.54329478227 - 1) = 333.069709533$$

$$\log_{10}(94!)=\frac{\ln(94!)}{\ln 10}$$ and since, $$\ln 10 = 2.30258509299$$, we have $$log_{10}(94!)=144.65033694$$

Spreadsheet
https://tableconvert.com/csv-to-mediawiki

Back to Information theory/Permutations and combinations