28
$\begingroup$

Consider Pascal's triangle with $30$ rows (the top $1$ is the $0$th row). The centre number is the number in the middle of row $30\times \frac23=20$, which is $\binom{20}{10}=184756$. The proportion of the numbers in the triangle that are less than this centre number is $\frac{364}{496}\approx0.7339$.

In the following graph, the horizontal axis is $n$, the number of rows in the triangle ($n$ is a multiple of $3$). The vertical axis is $P$, the proportion of numbers that are less than the centre number.

enter image description here

It looks like $P$ is approaching some limit. The rightmost data point is $n=138$ and $P=\frac{7078}{9730}\approx0.72744$. I put $0.72744$ into Wolfram, and it suggested $e^{-1/\pi}\approx 0.72738$.

Is the following conjecture true or false:

Conjecture: In Pascal's triangle with $n$ rows, where $n$ is a multiple of $3$, the proportion of numbers less than the centre number approaches $e^{-1/\pi}$ as $n\to\infty$.

I would not be too surprised if this is in fact the limiting proportion, since $e$ is related to Pascal's triangle and so is $\pi$.

My attempt: The numbers in the top $\frac23$ of the triangle are all less than the centre number. So we just need to determine the proportion of numbers in the bottom $\frac13$ that are less than the centre number. I considered the row that is $m$ rows below the centre number: I tried to work out the proportion of numbers in this row that are less than the centre number, to obtain an asympototic boundary curve, but I didn't succeed.

Context: I was trying to approximate the median of the numbers in the first $n$ rows of Pascal's triangle, and in my investigation I stumbled upon this possible result.

$\endgroup$
10
  • 7
    $\begingroup$ I would not be surprised if there were a limit. I would be very surprised to find that the limit is $\exp(-1/\pi)$. $\endgroup$ Commented Nov 27, 2023 at 15:57
  • 1
    $\begingroup$ I don't quite understand the definition of centre number. Why the 2/3? $\endgroup$
    – Randall
    Commented Nov 27, 2023 at 15:58
  • 2
    $\begingroup$ If you color the partss smaller/larger than the center number can we see the shape we are forming as the triangle gets larger? $\endgroup$ Commented Nov 27, 2023 at 16:00
  • 2
    $\begingroup$ 1-sum(outer(0:999,0:999,"choose")>=choose(666,333))/choose(1001,2) using R gives $0.72689$ for $n=999$, in the same way as 1-sum(outer(0:30,0:30,"choose")>=choose(20,10))/choose(32,2) gives $0.73387$ for $n=30$ $\endgroup$
    – Henry
    Commented Nov 27, 2023 at 16:14
  • 2
    $\begingroup$ I played with stirling's approximations, and got the constant 0.726775931 numerically. It might be equivalent to mjqxxxx's answer that he just now posted. $\endgroup$ Commented Nov 27, 2023 at 23:55

4 Answers 4

15
$\begingroup$

We can approximate this by an integral. Fix $N$ (and let it be large). Let $(\alpha, \beta) \in \mathbb{R}^2$, such that $0 \le \beta \le \alpha \le 1$; you're interested in the fraction of this area for which $$ {{\alpha N}\choose{\beta N}} =\frac{(\alpha N)!}{(\beta N)!((\alpha - \beta)N)!} \le \frac{(2N/3)!}{(N/3)!(N/3)!} = {{2N/3}\choose{N/3}}, $$ or $$ (\alpha N)!(N/3)!^2 \le (2N/3)!(\beta N)!((\alpha - \beta)N)!, $$ or (taking the log of both sides), $$ \log(\alpha N)!+2\log(N/3)! \le \log(2N/3)!+\log(\beta N)! + \log((\alpha-\beta)N)!. $$ We can use Stirling's approximation, $\log n! \approx n\log n - n$. For instance, $$ \log(\alpha N)! \approx\alpha N\log(\alpha N)-\alpha N = \alpha N \log\alpha + [(\log N-1)(\alpha N)]. $$ All the second terms (in square brackets) will cancel out entirely, leaving $$ \alpha N \log \alpha + (2N/3)\log(1/3) \le (2N/3)\log(2/3)+\beta N \log \beta + (\alpha-\beta)N\log(\alpha-\beta), $$ or $$ \alpha \log \alpha - \beta \log \beta - (\alpha - \beta)\log (\alpha - \beta) \le (2/3)\log 2 $$ or $$ -\mu \log \mu - (1-\mu)\log (1-\mu)\le\frac{2\log 2}{3\alpha}, $$ where $\mu=\beta / \alpha \in (0,1)$. Note that the left-hand side never exceeds $\log 2$, so when $\alpha \le 2/3$, all values of $\beta$ work (as we already knew). So we want $$ \begin{eqnarray} 2\int_{0}^{1}d\alpha \int_{0}^{\alpha} d\beta \; f(\alpha, \beta/\alpha) &=& 2\int_{0}^{1}\alpha d\alpha \int_{0}^{1} d\mu\; f(\alpha, \mu) \\ &=&2\int_{0}^{2/3}\alpha d\alpha + 2\int_{2/3}^{1}\alpha d\alpha \int_{0}^{1}d\mu\;f(\alpha, \mu) \\ &=& \frac{4}{9} + 2\int_{2/3}^{1}\alpha d\alpha \int_{0}^{1}d\mu\; f(\alpha, \mu), \end{eqnarray} $$ where $f(\alpha, \mu)=0$ if $g(\mu)\equiv-\mu\log \mu - (1-\mu)\log(1-\mu) \le (2\log 2)/(3\alpha)$ and $=1$ otherwise. Finally, noting that $g(\mu)=g(1-\mu)$, we can restrict our attention to $\mu\in(0,1/2)$, where the result further simplifies to $$ \frac{4}{9} + 4 \int_{2/3}^{1} g^{-1}\left(\frac{2\log 2}{3\alpha}\right) \alpha d\alpha. $$ The change of variable $\alpha = (2/3)/v$ gives $$ \frac{4}{9} + \frac{16}{9}\int_{2/3}^{1} \frac{g^{-1}(v \log 2)}{v^3}dv, $$ which may or may not be easier to evaluate.


Update:

If an explicit integral form in terms of $g$ (as opposed to $g^{-1}$) is wanted, then the change of variable $v = g(\mu) / \log2$ achieves that (except that one of the bounds of the integral must still be expressed in terms of $g^{-1}$). Specifically, this yields $$ \frac{4}{9}+\frac{16 \log^2 2}{9}\int_{\mu_0}^{1/2} \frac{\mu g'(\mu) d\mu}{g(\mu)^3}, $$ where $\mu_0 = g^{-1}((2/3)\log 2) \approx 0.17395$. Integrating by parts lets us simplify this even further, to this fairly elegant final expression: $$ 2 \left[\mu_0 + \left(\frac{2 \log 2}{3}\right)^2 \int_{\mu_0}^{1/2} \frac{d\mu}{g(\mu)^2} \right]. $$

$\endgroup$
6
  • 3
    $\begingroup$ A naive numerical integration gives the result as $\approx 0.7267760$, which certainly agrees with the results for small $n$ from other answers, and is also safely below $e^{-1/\pi}$. $\endgroup$
    – mjqxxxx
    Commented Nov 27, 2023 at 23:56
  • 2
    $\begingroup$ If you superimpose implicit $-\mu\log \mu - (1-\mu)\log(1-\mu) \le (2\log 2)/(3\alpha)$ on my pictures, it matches very well. $\endgroup$
    – GEdgar
    Commented Nov 28, 2023 at 18:51
  • $\begingroup$ $\approx .1739523$ is the exact ratio of $n \choose k$ that's less than the center value in the final row of the triangle. $\endgroup$ Commented Dec 1, 2023 at 0:44
  • $\begingroup$ @OlderAmateur: I would think it would be twice that. Or are you just considering $k < n/2$? $\endgroup$
    – mjqxxxx
    Commented Dec 1, 2023 at 1:17
  • $\begingroup$ "I would think it would be twice that" Per wofram it's just under $3000000 \choose 521857$. Did you account for $n \choose n-k$ on the other side of the triangle? $\endgroup$ Commented Dec 1, 2023 at 1:23
7
$\begingroup$

While I can't say for certain that this conjecture is incorrect, the numerical evidence do not support it (sadly).

I ran a straight forward python code that calculates the ratio for every $n$ between $1$ and $2998$. The results are given in the following figure, which numerically shows that the limit is smaller than ~$0.72685$, which is smaller than the conjecture's constant $e^{-\pi} = 0.72738$.

enter image description here

The code is as follows:

import matplotlib.pyplot as plt

def calc_pascal_up_to(n_rows):
    rows = [[1]]
    d = {}
    while len(rows) < n_rows:
        cur_row = [1] + [rows[-1][j] + rows[-1][j + 1] for j in range(len(rows[-1]) - 1)] + [1]
        rows.append(cur_row)
        if len(rows) % 3 == 1:
            center_val = rows[(2 * (len(rows) - 1)) // 3][(len(rows) - 1) // 3]
            n_entries = len(rows) * (len(rows) + 1) / 2
            n_small_entries = sum([len([v for v in row if v < center_val]) for row in rows])
            d[len(rows) - 1] = n_small_entries / n_entries
    return d

d = calc_pascal_up_to(3000)

x = sorted(d.keys())
y = [d[i] for i in x]
plt.scatter(x[200:], y[200:])
plt.show()

Edit: Changed the comparison with the centre number to a strict inequality, so it will be consistent with the proportions calculated by Dan. That does not change the asymptotic value or the graph at all.

$\endgroup$
3
  • $\begingroup$ Quote: "for every $n$ between $1$ and $2998$." Is your $n$ the number of rows in the triangle, or is it the centre number's row number? If it's the former, then when $n$ is not a multiple of $3$, how did you find the centre number? $\endgroup$
    – Dan
    Commented Nov 27, 2023 at 22:48
  • 1
    $\begingroup$ In my code, $n$ is the number of rows. I always assume that the number of rows $n$ is of the form $3k + 1$ for some $k$. Then, the centre row number is $2k$, where the first row is $0$. I hope that makes sense. $\endgroup$ Commented Nov 27, 2023 at 23:08
  • 1
    $\begingroup$ Hopefully the code is readable enough.. When I checked it, I added a print right after the calculation of center_val, n_entries, and n_small_entries, and for row $30$ I got you results: $184756$, $364$, and $496$. $\endgroup$ Commented Nov 27, 2023 at 23:10
6
$\begingroup$

Here are some pictures.

$n=30$

A30

(row numbering begins with $1$)

$n=150$

A150

$n=600$

A600

It looks like it approaches a curve. But what curve? A hyperbola?

Here I repeated $n=600$, but included extra rows.

A600x

Do you think it is a hyperbola? Something that approaches the asymptotes more slowly?

$\endgroup$
10
  • 2
    $\begingroup$ The curve is described in my answer.... it's defined implicitly by $g(\mu) \equiv -\mu \log \mu - (1-\mu)\log(1-\mu) = (2\log 2)/(3 \alpha)$, where $\mu = x/y$ and $\alpha = y/N$. Equivalently, $x = y \cdot g^{-1}((2 N \log 2)/(3 y))$ (noting that $g^{-1}$ is two-valued). $\endgroup$
    – mjqxxxx
    Commented Nov 28, 2023 at 17:20
  • 1
    $\begingroup$ @ReiHenigman True, I guess in my mind an implicit formula was good enough to be called an exact form. $\endgroup$
    – Polygon
    Commented Nov 28, 2023 at 18:29
  • 2
    $\begingroup$ @ReiHenigman You can express $x$ and $y$ as explicit functions of $x/y$: e.g., $y = 2N\log 2 / (3 g(x/y))$. So you don't really need to take the inverse. In fact, this must allow an explicit integral representation of the area in terms of $g$ as well. $\endgroup$
    – mjqxxxx
    Commented Nov 28, 2023 at 19:38
  • 3
    $\begingroup$ Great job with Graph pics. Is it possible to generate it as a true equilateral triangle? That would likely give us a more symetrical curve. $\endgroup$ Commented Nov 28, 2023 at 21:20
  • 1
    $\begingroup$ @Dan I added it to the end of my answer. $\endgroup$
    – mjqxxxx
    Commented Dec 1, 2023 at 0:05
1
$\begingroup$

I tried to solve for what element in the $n^{th}$ row is more or less equal to the center element. That is what is $k$ such that $\binom{n}{k} = \binom{2n/3}{n/3}$.

By plotting, I got a rough approximation of $k = n/6$.

If we are to draw a triangle between points on last row $n/6, 5n/6$ and $2n/3$ center, we get the area of triangle = $\frac{1}{2}\frac{4n}{6}\frac{n}{3} = \frac{n^2}{9}$.

If we divide this by total we get:

$\frac{\frac{n^2}{9}}{\frac{n(n+1)}{2}}= \frac{2}{9}$ in the limit.

So it does converge to some value around $\frac{7}{9}$. It is not a perfect triangle. So this is likely overestimating it.

$\endgroup$
2
  • $\begingroup$ Plotting idea might work but we will need accurate values. $n/6$ is way off, the actual value is about .1739523 . Well also need to plot many points to get a picture of the curve which (as you mentioned in passing) is nothing like a triangle. If we had some sort of gamma function to solve for $k$ in $n \choose K$ that allowed non integer values for $k$ this would work perfectly, but I don't know enough to construct one. $\endgroup$ Commented Nov 30, 2023 at 16:27
  • $\begingroup$ I got the .1739523 $3000000 \choose 521857$ value using wolfram. Technically you can get good estimates on the rows between $2n/3$ and $n$ the same way to plot the curve. $\endgroup$ Commented Nov 30, 2023 at 16:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .