4

$k_1$, $k_0$ are random integer numbers between $1$ and $100$ (including $1$ and $100$, and uniformly distributed). What is the probability that the equation $x^2 + k_1 x + k_0 = 0$ has real solutions?

This is a subproblem of another problem, and I do not know how to approach it without brute force, hope some of you will propose a fresh idea.

The answer should be devised without using computer, if possible.

VividD
  • 15,966

4 Answers4

4

As has been noted in comments, saying that $x^2+k_1x+k_0$ has real roots is equivalent to the statement $k_1^2\geq 4k_0$. Thus, we can split into two cases:

  • If $k_1> 20$ then $k_1^2>400 \geq 4k_0$ regardless of choice of $k_0$. This gives us $80\times 100=8000$ tuples $(k_1,k_0)$ in the range that have a root.

  • If $1\leq k_1\leq 20$ then we need $1\leq 4k_0\leq k_1^2$. The number of $k_0$ satisfying this is $\left\lfloor\frac{k_1^2}4\right\rfloor$ which may be expanded as: $$\left\lfloor\frac{k_1^2}4\right\rfloor=\begin{cases}\frac{k_1^2}4&&\text{if }k_1 \text{ is even}\\\frac{k_1^2-1}4&&\text{if }k_1\text{ is odd}\end{cases}.$$ From here, we simply have two sums over polynomials - that is, the number of tuples with even $k_0$ is (summing over $k_0=2i$): $$\sum_{i=1}^{10}i^2=385$$ and the number of tuples with odd $k_0$ is (summing over $k_0=2i-1$): $$\sum_{i=1}^{10}i^2-i=330$$ All told, we find that there are $715$ tuples with roots and $1\leq k_1\leq 20$.

Summing everything up, there are $8715$ tuples yielding roots, so the probability is $\frac{8715}{10000}=\frac{1743}{2000}$. Notice that the sums over polynomials may be computed in closed form, as the sum of a polynomial of degree $d$ is a polynomial of degree $d+1$, which allows us to perform all of this by hand.

Milo Brandt
  • 60,888
3

I know you asked for a noncomputational solution, but here's one just so we know what the answer is:

import itertools
L = len([t for t in itertools.product(range(1,101),range(1,101)) \
    if t[1]**2 >= 4 * t[0]])
print(L)

The answer is $8715$ combinations that satisfy the requirement (i.e. $P=0.8715$).

parsiad
  • 25,154
1

It has real solutions iff $\Delta=k_1^2-4k_0\ge 0$.

$$P=\frac{\sum_{i=1}^{20}\lfloor\frac{i^2}{4}\rfloor+80\cdot 100}{10000}$$

$(2k+1)^2\equiv 1\pmod{4},\, (2k)^2\equiv 0\pmod{4}$. Therefore (see here and here):

$$P=\frac{\frac{1^2+3^2+5^2+\cdots+19^2-10}{4}+\frac{2^2+4^2+6^2+\cdots+20^2}{4}+8000}{10000}$$

$$=\frac{\frac{10(19)(21)}{3}-10+4\cdot \frac{10(11)(21)}{6}+32000}{40000}=0.8715$$

Glorfindel
  • 3,955
user236182
  • 13,324
1

The possible values can be as follows $$ \eqalign{ k_1:1 & k_0:\_ \cr k_1:2 & k_0:1 \cr k_1:3 & k_0:1,2 \cr k_1:4 & k_0:1,2,3,4 \cr k_1:5 & k_0:1,2,3,4,5,6 \cr k_1:6 & k_0:1,2,3,4,5,6,7,8,9 \cr & \cdots \cr k_1:20 & k_0:1,2,3,4,5,6,7,8,9,10,11,\cdots 100 \cr k_1:21 & k_0:1,2,3,4,5,6,7,8,9,10,11,\cdots 100 \cr & \cdots \cr k_1:100 & k_0:1,2,3,4,5,6,7,8,9,10,11,\cdots 100 \cr } $$ This is a total of $$ \sum_{i=2}^{20}{\lfloor{i^2 \over 4}\rfloor} + 80 \cdot 100 = 8715 $$

nickchalkida
  • 1,495