Thursday 31 January 2019

combinatorics - What is that curve that appears when I use $ln$ on Pascal's triangle?



I made a little program that generates Pascal triangles as images :



I first tried it associating to each pixel a color whose intensity was proportional to the number in the Pascal triangle



The colors being 0-255, i used the following function to convert value to colors: $$f(x)=\frac{x-m}{M-m}255$$
where $x$ is the value in the Pascal triangle, $M$ is the max value in the triangle, and $m$ in the min value in the triangle.
:




size 50*50 : enter image description here



The axis are like in this picture :



enter image description here



However, as you can see, most of the picture is black due to the numbers being really distant (great distance between highs and lows)



Therefore, i thought it would be good to use a logarithmic scale :




$$f(x)=\frac{\ln(1+x-m)}{\ln(1+M-m)}255$$



Which gives me :
size 50*50 : enter image description here



That's way better.



Yet, something was bugging me : as I increased the number of rows, I noticed that some curve was being drawn :



size 50*50 : enter image description here




size 100*100 : enter image description here



size 150*150 : enter image description here



I can't try really high numbers, as my computer isn't good enough, nor is the software I use.



Is there something behind that 'curve' ? If so, what curve would it be ?



Could someone provide explanation why I get such results ?




Thank you.






Progress



We're looking at the level curves of $\ln\binom{N-y}{x},N\in\mathbb{N}^*$



By Stirling, as @TedShifrin remarked, $\ln(n!)\sim n\ln(n)$ therefore $\ln\binom{N-y}{x}\sim y\ln(N-y)-x\ln(x)-(N-y-x)\ln(N-y-x)$ and seem to give us nice curves (cf his answer).




Is there an equation y=f(x) for those curves ?


Answer



OK, at long last: For any $N\in\Bbb N$, consider $\binom{N-y}x$, $0\le x,y\le N$. This indicates the intensity at the point $(x,y)$ in the graph, and we are, in fact, as @JackM suggested, looking at its level curves.



Using Stirling's approximation, $\log(n!)\sim n\log n-n$, we consider the plot of level curves of $(N-y)\log(N-y)-x\log x-(N-y-x)\log(N-y-x)$ — note that the linear terms cancel. Here is a Mathematica plot for $N=100$:



Pascal's image


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...