# Four distinct numbers are chosen from $\{1, \dots, 14\}$. What is the probability that there exists some pair of the numbers that are consecutive?

Four distinct numbers are chosen from $$\{1, \dots, 14\}$$. What is the probability that there exists some pair of the numbers that are consecutive?

We can choose $$4$$ numbers from the set in $$14 \choose 4$$ ways. Now the probability would be $$\frac{\# \text{ ways to pick 4 numbers such that at least 2 are consecutive.}}{14 \choose 4}$$

Since the numerator contains the word "at least" I'm motivated to use complementary counting which is to first count the ways I can choose $$4$$ elements such that none of the numbers are consecutive and then subtracting this from $$14 \choose 4$$ I would get the number of ways of choosing $$4$$ elements from the set such that at least $$2$$ are consecutive.

This should be possible with the stars and bars method, but I don't know how to formulate the problem in that way. Could I have some hints on how to transform this into a problem where I could use the stars and bars method?

Let $$x_1$$ be the number of numbers smaller than the first number that is selected; let $$x_2$$ be the number of numbers between the first and second number selected; let $$x_3$$ be the number of numbers between the second and third numbers selected; let $$x_4$$ be the number of numbers between the third and fourth numbers selected; let $$x_5$$ be the number of numbers after the fourth number selected. Since $$10$$ numbers are not selected, $$x_1 + x_2 + x_3 + x_4 + x_5 = 10 \tag{1}$$ Since you wish to count the number of selections in which no two of the four selected numbers are consecutive, $$x_1 \geq 0$$, $$x_2 \geq 1$$, $$x_3 \geq 1$$, $$x_4 \geq 1$$, and $$x_5 \geq 0$$. By using a change of variable, you can convert equation $$1$$ into an equation in the nonnegative integers or an equation in the positive integers.

• Yes, this is what I got also. Remind me how you solve it at the end. Like, what equation do you get and how do you solve it? Commented Dec 18, 2022 at 23:20
• @AdamRubinson If you wish to solve it in the nonnegative integers, let $x_2' = x_2 - 1$, let $x_3' = x_3 - 1$, and let $x_4' = x_4 - 1$. Then $x_2', x_3', x_4'$ are nonnegative integers. Substituting $x_2' + 1$ for $x_2$, $x_3' + 1$ for $x_3$, and $x_4' + 1$ for $x_4$ in equation $1$ and simplifying yields $x_1 + x_2' + x_3' + x_4' + x_5 = 7$, which is an equation in the nonnegative integers. The number of solutions of that equation is the number of ways $5 - 1 = 4$ sticks can be placed among $7$ stones. See Theorem 2. Commented Dec 18, 2022 at 23:54
• Oh yeah, of course, it's just stars and bars again. I missed that. Thanks Commented Dec 19, 2022 at 12:31

Stars and bars is best for when you’re choosing sizes of groups. Here, you’re choosing starting positions for sequences from a range of possible starting positions. My two hints would be firstly to think about what sequences of chosen vs not chosen numbers you have to have to avoid two consecutive chosen numbers, and secondly to treat separately the cases where 14 is or isn’t chosen.

We can approach this question such that all - the number of selections that do not contain any consecutive numbers. Namely , we use complementary rule.

• All: $$\frac{\binom{14}{4}}{\binom{14}{4}}=1$$

• Selecting $$4$$ numbers not consecutive:

To handle this process , assume that we labeled unselected balls with $$\color{red}{U}$$ , and the selected balls with $$\color{blue}{S}$$.Now , lets line up these $$10$$ unselected balls such that $$-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}-$$

When we line up these $$10$$ unselected balls , we obtained $$11$$ suitable places to put our selected balls , we can do it $$\binom{11}{4}$$ ways. For example ,

$$\color{blue}{S}\color{red}{U}-\color{red}{U}-\color{red}{U}\color{blue}{S}\color{red}{U}-\color{red}{U}-\color{red}{U}-\color{red}{U}\color{blue}{S}\color{red}{U}-\color{red}{U}-\color{red}{U}\color{blue}{S}$$

represents that ball $$1$$ ,ball $$5$$ ,ball $$10$$ ,ball $$12$$ are selected ,because these marks represents numbers $$[1,2,3,4....,11,12]$$ from left to right.In our examples blue marks ,i.e selected numbers, matched with $$[1,5,10,12]$$.

Then , our answer is $$1 - \frac{\binom{11}{4}}{\binom{14}{4}}=1 -\frac{330}{1001}=\frac{671}{1001}=0,67032..$$