# Probability that $ax^2+bx+c$ has no real roots after rolling 3 dice.

Suppose that I roll $3$ dice and write down the outcome as the coefficients $a,b,c$ in the polynomial $ax^2+bx+c$ respectively. What is the probability that this polynomial has no real roots?

So, I have to count the number of triples $(a,b,c)$ such that $b^2 < 4ac$, where $a,b,c \in \{1,2,3,4,5,6\}$. I’m not sure how I can do that. Please give me a hint first. This problem is from a high school probability course, so I think it must have a very basic solution.

#### Solutions Collecting From Web of "Probability that $ax^2+bx+c$ has no real roots after rolling 3 dice."

If you don’t have any further idea, probably the easiest is to draw a $6\times 6$ table of values $4ac$ for all possible $a,c$ pairs. (It will be symmetric.) Then you can conclude the number of $b$’s for a given pair $(a,c)$, and sum up all these.

A three-dimensional lattice would be preferable for investigating this, but we can get by with a two-dimensional grid. Since we wish to count the ordered triples for which $\ b^2 \ < \ 4ac \$ , we can set up a lattice for $\ a \$ and $\ c \$ running from 1 to 6 (contained in the light green square), and plot level curves for $\ \frac{1}{4}b^2 \$ with $\ b \$ also running from 1 to 6 . At each integer value of $\ b \$ , we can now easily count the number of lattice points “below” or on each level curve to find the number of combinations which do produce a discriminant value $\ b^2 – 4ac \ \ge \ 0 \$ . (The red diagonal line is added to indicate the symmetry in the choices for for $\ a \$ and $\ c \$ , which can simplify the counting.) These are then to be discarded from the count of desired outcomes.

We find that the number of combinations for each value of $\ b \$ is

b = 1 : 36

b = 2 : 36 – 1 = 35

b = 3 : 36 – 3 = 33

b = 4 : 36 – 8 = 28

b = 5 : 36 – 14 = 22

b = 6 : 36 – 17 = 19

As found by the other solvers here, the total number of combinations leading to complex-valued zeroes is 173 , making the probability $\ \frac{173}{216} \ .$

You can count it out simply and arrive at the answer: $\frac{89}{108}$.

Added later: I had made an error in my counting! The answer is $\frac{43}{6^3}$

Here are the 43 possibilities:
[[1,2,1,0],[1,3,1,5],[1,4,1,12],[1,5,1,21],[1,6,1,32],[
1,3,2,1],[1,4,2,8],[1,5,2,17],[1,6,2,28],[1,4,3,4],[1,5,3,13],
[1,6,3,24],[1,4,4,0],[1,5,4,9],[1,6,4,20],[1,5,5,5],[1,6,5,16]
,[1,5,6,1],[1,6,6,12],[2,3,1,1],[2,4,1,8],[2,5,1,17],[2,6,1,28
],[2,4,2,0],[2,5,2,9],[2,6,2,20],[2,5,3,1],[2,6,3,12],[2,6,4,4
],[3,4,1,4],[3,5,1,13],[3,6,1,24],[3,5,2,1],[3,6,2,12],[3,6,3,
0],[4,4,1,0],[4,5,1,9],[4,6,1,20],[4,6,2,4],[5,5,1,5],[5,6,1,
16],[6,5,1,1],[6,6,1,12]]

Added even more later [I need sleep!] Those 43 values give real roots. So the probability of no real roots is $1-43/216 = 173/216$.

Also following up on @Berci’s answer, here is a variation that you can do on some spreadsheet. First you set up a 6×6 table with $4ac$ in each cell. For each cell you want the number of b’s that are integer, $\leq6$ and such that $b^2<4ac$. As you are working with integers you can replace that with $b^2\leq 4ac-1$, i.e. $b\leq\sqrt{4ac-1}$. That number (of b’s) turns out to be the minimum of 6 and $\lfloor \sqrt{4ac-1}\rfloor$ (largest integer $\leq \sqrt{4ac-1}$. Computing that for each cell yields:

\begin{array}{cccccc}
1 & 2 & 3 & 3 & 4 & 4 \\
2 & 3 & 4 & 5 & 6 & 6 \\
3 & 4 & 5 & 6 & 6 & 6 \\
3 & 5 & 6 & 6 & 6 & 6 \\
4 & 6 & 6 & 6 & 6 & 6 \\
4 & 6 & 6 & 6 & 6 & 6 \\
\end{array}

which then sums up to 173, thus the probability of 173/216.

To follow up on @nayrb’s question, this generalizes to $n$-face dice in a straightforward way :

\begin{align*}
p(n)=&\ \sum_{a=1}^n\sum_{b=1}^n \min(n,\lfloor \sqrt{4ac-1}\rfloor)
\end{align*}

The limit for $n\rightarrow\infty$ is the continuous case :

\begin{align*}
p(\infty)=&\ \int_{a=0}^1\int_{b=0}^1 \min(1,\sqrt{4ac})= \frac{31-6\log 2}{36}\approx0.745587
\end{align*}