# Thread:

1. ## CD random order problem

Hi,

I was listening to a CD a week ago in random playback. At one point three of the tracks played in the correct order (24 tracks on the CD).

For example:

8, 4, 17, 10, 11, 12, ...

(Can't remember the exact track numbers.)

How do I calculate the probability of this type of thing happening by chance? I tried to work it out, but got nowhere (other than I suppose model it using random numbers). Thanks.

2. 20 tracks can arranged among themselves in 20! ways.
hence n(s) = 20!

Considering the 3 tracks which played in a order as 1.
Now, total number of tracks = 18 and these can be arranged among themselves in 18! ways. n(e) = 18!.

Probability of the event is 18!/20! = 1/380.

Please correct me If I am wrong.

Thanks,
Ashish

3. Thanks Ashish,

Something that was puzzling me was how to allow for the fact it might be any three tracks that could have been played in order.

With just four tracks in total, if I take 123 as the group, I get 2! ways of arranging them, and the same if I assume 234, so a total of 4 ways out of 24. However, 1234, 2341, and 4123 are the only arrangements (I've double-counted 1234).

Any pointers? With more than 5 or 6 tracks I got totally stumped!
Steve

4. Anyone else? I still can't see how to use the hint given by Ashish to the case where any three tracks on the CD appear in the correct order.

5. Originally Posted by steve23144
I was listening to a CD a week ago in random playback. At one point three of the tracks played in the correct order (24 tracks on the CD).
For example: 8, 4, 17, 10, 11, 12, ...
How do I calculate the probability of this type of thing happening by chance?
I will assume the no track is ever repeated until the complete permutation of all twenty four tracks is complete.
There are $24!=6200448401733239439360000$ ways to play the CD is random mode.
To get a particular sequence of three say 11, 12, & 13 the probability of that happing is $\frac{22!}{24!}= 0.00181$.
The find the probability of at least one sequence of three is a bit more complicated.

6. Originally Posted by Plato
I will assume the no track is ever repeated until the complete permutation of all twenty four tracks is complete.
There are $24!=6200448401733239439360000$ ways to play the CD is random mode.
To get a particular sequence of three say 11, 12, & 13 the probability of that happing is $\frac{22!}{24!}= 0.00181$.
The find the probability of at least one sequence of three is a bit more complicated.
Thanks Plato, Does that mean the quickest way to find the answer is to do a computer simulation after all then, or can I break the problem down in some way to make it easier?

7. Originally Posted by steve23144
Thanks Plato, Does that mean the quickest way to find the answer is to do a computer simulation after all then, or can I break the problem down in some way to make it easier?
Are you asking for "The find the probability of at least one sequence of three being played in a row"?

8. Originally Posted by Plato
Are you asking for "The find the probability of at least one sequence of three being played in a row"?
Yes, that's what I'd like, or even better the probability of at least one sequence of at least three tracks on the CD play in their correct order. Thanks.

9. I would like show you the extent of the difficulty involved in your question.
Consider the sequence $1,\,2,\, 3,\cdots,\, n-1,\, n$.
How many ways can we rearrange the string so that none of the patterns $(12),\,(2,3),\, (3,4),\cdots,\, (n-1,n)$ will appear.
The answer is rather hard to understand: $\left( {n - 1} \right)!\left[ {\sum\limits_{k = 1}^{n - 1} {\left( { - 1} \right)^k \frac{{n - k}}{{k!}}} } \right]$.
Now subtracting that number from $n!$ will give the number of ways of having a string in which at least one of those patterns wii appear.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 8, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9596109390258789, "perplexity_flag": "middle"}