Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Depends on if it actually randomly selects them, and also how many songs are left at that point in time.
When all songs are there, the probability is 10%, but if it's the only one, the probability is 100%. -
curlyDev4698ySo the playlist is m, v, c and what are the chances of c being played then third?
Depending on how many songs left and if it passed its position?
I think they are independent events so:
TotalSongs - 1/(totalSongs) * 1/(position) so for the first one is always the highest since you only need to extract the song without the position -
ymas4718yLet's simplify this problem a little, say there are three tracks in the playlist then there are only 6 permutations: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1). Of those 6 possible permutations only one will play 2 tracks in the same order they are in the playlist (1,2,3). 3 of the permutations will play 2 tracks in order. In your shuffle scenario, a playlist with 10 tracks has 3628800 possibilities. See if you figure out any ways to see how many of those possibilities will fit your playback criteria.
I was listening to my playlist for a while and then this question popped out of nowhere.
There is a playlist consisting of 10 different songs.
We press the shuffle button.
In the each step, a single random song is picked and played. Once the song is finished, it will be tagged out until each song has been played at least once.
Once each song has been played at least once, the playlist would reset and start the shuffling mechanism again.
Now my question is:
What is the probability of two songs (In shuffle mode) being played in the same order they are in the playlist?
undefined