1

If I choose three positive integers A, B, and C, what is the probability that C can be expressed as an integer conical combination and A and B? That is the probability that

$$ \exists m,n \in \mathbb{Z}_{\ge 0} : mA + nB = C $$

Initially I believed the answer was $\zeta(3)/\zeta(2)$, however this fails a basic sanity check. What I've tried so far is to get

Probabilities from the Coin problem

From the Coin problem I know that there are only finitely many C which cannot be expressed as various sums of A and B given gcd(A,B) = 1. Similarly if gcd(A,B) = k then the only sums which can be expressed are those C which are multiples of k, along with the same finite number of exceptions. In the limit I believe that this would mean that the probability that C is expressible, $P_C(A,B)$ would then be

$$ P_C(A,B|gcd(A,B) = k) = 1/k $$

Summing over all possible values for their greatest common denominator, and using a calculation for the probability that random A and B have gcd k this should be

$$ P_C(A,B) = \sum_{k=1}^\infty \frac{6}{k^2 \pi^2} \frac{1}{k} = \frac{6}{\pi^2} \sum_{k=1}^\infty \frac{1}{k^3} = \frac{\zeta(3)}{\zeta(2)} \approx 0.73 $$

However this fails a basic sanity test

Because the question is dealing with a 'uniform distribution' over all natural numbers, what I'm really calculating is the limit as N goes to infinity of choosing A, B, and C uniformly between 1 and N. However one simple case where C will never be expressible is if $ C < A $ and $ C < B $. And since this will happen a third of the time with random numbers [1,N] then the total probability for $P_C(A,B)$ should never exceed 2/3.

So, what should the probability be? And how have these two lines of reasoning come into conflict?

Speculations

  • perhaps choosing A,B in [1,N] and sampling C from [1,M] in the limit of M going to infinity is more reflective of the initial analysis
  • maybe the $\frac{1}{2} (A-1)(B-1) $ exceptional values of C are more relevant than I think, since although they are finite for any given value of N, they will increase as O(N^2) in number in the limit?

Original Motivation

The original motivation was considering the types of simple word problems which are used to introduce algebra.

If apples cost 5 dollars and oranges cost 8 dollars, and Sam spends 43 dollars on fruit, how many has he bought?

However coming up with a problem instance like this at random has a chance of not allowing any valid solutions, so what is the chance this happens?

NotAGenie
  • 111
  • 1
    There is no uniform probability on the natural numbers, so you'd have to express what probability distribution you are using. Alternatively, you can restrict to selecting from $1,\dots,N$ uniformly, and then find the limit as $N\to\infty.$ This would not be a probability, but a kind of limit probability. – Thomas Andrews Apr 07 '23 at 17:41
  • @ThomasAndrews yes, that is what I'm considering. But doing so I'm not sure what the answer would be. – NotAGenie Apr 07 '23 at 17:45
  • "that is what I'm considering." What is "that?" I gave two possibilities. – Thomas Andrews Apr 07 '23 at 17:59
  • Fundamentally I am asking this question because I don't personally have the expertise to provide a satisfactory answer on my own, and its very possible that an inexactitude in phrasing may be where the conflict lies. What I'd be interested in is the sort of limit probability that best captures the original question. I'd think this would be selecting [1,N] uniformly and then a limit as $ N \to \infty$, however I'm also not sure if this would be different from selecting A and B from [1,N] and C from [1,M] and taking the limit as both N and M approach infinity. – NotAGenie Apr 07 '23 at 18:05
  • 1
    It seems likely that the $M,N$ would be very different, depending on which one goes to infinity first. If $N=M^2,$ it is highly likely that $C$ would be less than both if $A,B,$ and thus there would be no solution. If $M=N^2,$ then you'd be more likely that $C>A,B.$ – Thomas Andrews Apr 07 '23 at 18:21
  • 1
    But I wouldn't be surprised if the $M=N$ case results in a limit of $0,$ just because you will get $A,B$ "too large" in most cases. – Thomas Andrews Apr 07 '23 at 18:24
  • So if $A \in [1,N], B \in [1,L], C \in [1,M]$ taking the limits of the L,M,N in different orders can get different results? So might need to handle these cases separately? I think N = L would capture the intent, but maybe should consider M = f(N) or something.

    What are you thinking about 'too large' in the M=N case?

    – NotAGenie Apr 07 '23 at 18:43
  • You are starting to get very fudgy about the probabilities when you don't want $N=M.$ It certainly is not a standard density argument. Even if you pick, say $M=N^2,$ or $M=N^3,$ you don't really have a logical justification for that. When $M=N^3,$ I bet you will get limit probability of $1.$ – Thomas Andrews Apr 07 '23 at 18:57
  • You might be able to argument that $M=N^k$ is the "sweet spot" since the limit when $k=1$ is zero and the limit when $k=3$ is $1.$ So if the limit when $M=N^k$ is not zero or $1,$ for some $1<k<3,$ you might argue that that $k$ is a "sweet spot" for this question. But I'm still not sure what that means in terms of density. – Thomas Andrews Apr 07 '23 at 19:06
  • 1
    If $M$ goes to infinity much faster than $N$, you should expect the limit of $\zeta(3)/\zeta(2)$. I believe this will happen if $N^2 = o(M)$. I suspect something interesting happens when $M\sim tN^2$ for $t\in(0,\infty)$ but I don't have the time/energy to figure out what. – Dark Malthorp Apr 07 '23 at 20:06
  • Bezout tells us that $C$ can be expressed as a linear combination of $A,B$ if and only if $C$ is a multiple of $\gcd(A,B)$. If $\gcd(A,B)=1$ as in your five dollar and eight dollar example, then it is certain that any $C$ can be expressed as a linear combination of those values, although for certain choices of $C$ one of $the chosen coefficients might have to be negative. – Keith Backman Apr 08 '23 at 14:33

1 Answers1

1

Given positive integers $a,b$ the number of pairs of positive integers $(m,n)$ such that $am+bn\leq N$ can be written as:

$$\sum_{m=1}^{\lfloor N/a\rfloor}\lfloor(N-am)/b\rfloor$$

This has an upper bound:

$$\sum_m\left(\frac Nb -m\frac ab\right)\leq \frac Na\frac Nb-\frac{N(N-a)}{2ab}=\frac{N(N+a)}{2ab}$$

So, given uniform random integers $A,B,C\leq N$ let $X_N$ be the number of solutions $Am+Bn=C.$

Then the expected number of solutions will be bounded above by:

$$\begin{align}E(X_N)&\leq \frac1{N^3}\sum_{a=1}^{N}\sum_{b=1}^{N}\frac{N(N+\min(a,b))}{2ab}\\&\leq \sum_{a,b=1}^{N}\frac1{N^3}\frac{2N^2}{2ab}\\&=\frac{H_N^2}{N} \end{align}$$

where $H_N$ is the $N$th harmonic number, and $H_N\sim \log N.$

So $E(X_N)\to 0,$ and $E(X_N)\geq P(X_N>0),$ and thus your probability goes to zero.

Thomas Andrews
  • 186,215