0
$\begingroup$

How many ways are there to pick an ordered tuple of 5 elements from the set of positive integers between 1 and 50 inclusive, provided that there must be at least one consecutive sequence of 4 consecutive elements?

So what I think is somehow we need to use inclusion exclusion principle ; So I proceed by calculating sequence with 5 consecutive element but then I have no idea how to proceed with this?

$\endgroup$
  • $\begingroup$ You have ruined your own question with that edit. It is now completely unintelligible! $\endgroup$ – TonyK Oct 17 '19 at 11:46
  • $\begingroup$ @TonyK Oh sorry for that. $\endgroup$ – maths student Oct 17 '19 at 11:51
1
$\begingroup$

There are 47 sets of 4 consecutive elements, from $\{1,2,3,4\}$ to $\{47,48,49,50\}.$ For each of these, we can choose a fifth element for our 5-tuple in 46 ways, and this fifth element can be placed in the first or last position in the 5-tuple. So far our count is

$$47 \cdot 46 \cdot 2$$

Notice this count would include the 5-tuples with five consecutive elements as well; however each of these 5-tuples with 5 consecutive elements would have been counted twice, either by choosing as our fifth element the first or the last of the five consecutive numbers. [e.g the 5-tuple $(23,24,25,26,27)$ could be created by placing $23$ in front of the 4-tuple $(24,25,26,27)$ or by placing $27$ at the end of the 4-tuple $(23,24,25,26)$.]

Thus we need to subtract the number of 5-tuples with 5 consecutive elements, of which there are clearly 46. So our final count will be

$$47 \cdot 46 \cdot 2 - 46 = \boxed{4278}$$

N.B. I've assumed in the above that the 5-tuples are to be made from five different elements; if repetition were allowed, then in the first part of the computation, when choosing the fifth element there would be 50 choices rather than 46, so then the count would be

$$47 \cdot 50 \cdot 2 - 46 = \boxed{4654}$$

$\endgroup$
1
$\begingroup$

If I understand you well, you have

i) 1 group $[1 \ 2\ 3\ 4]$, with 45 other possible non consecutive elements, located at 2 possible positions (beggining or end),

ii) 1 group $[47 \ 48\ 49\ 50]$, with 45 other possible non consecutive elements, located at 2 possible positions,

iii) 45 other groups of 4 consecutive elements, with 44 other possible non consecutive elements, located at 2 possible positions,

iv) the 1 group in i) of 4 consecutive elements, with 1 next possible consecutive elements $[5]$, located at the beginning,

iv) the 1 group in ii) of 4 consecutive elements, with 1 next possible consecutive elements $[46]$, located at the end,

iv) the 45 groups in iii) of 4 consecutive elements, with 2 possible consecutive elements, located at the non consecutive position (begginning or end accordingly),

v) 46 groups of 5 consecutive elements.

In total, $1\cdot45\cdot2+1\cdot45\cdot2+1+1+45\cdot2+45\cdot44\cdot2+46=4278$ possible 5 tuples.

$\endgroup$
  • $\begingroup$ You are missing the 46 groups with 5 consecutive elements: $[1,2,3,4,5],\ldots,[46,47,48,49,50]$. At least by my understanding of the problem, they should be valid solutions. $\endgroup$ – Ingix Oct 17 '19 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.