Original Post
While recently doing some programming with random numbers, I was wondering about the specifics of the random_shuffle algorithm, particularly what happens when it is repeated in a program and how it relates to seeding the random number generator. srand(time(0)); random_shuffle(vec1.begin(), vec1.end()); random_shuffle(vec2.begin(), vec2.end()); Why exactly does the algorithm not produce exactly the same shuffle (for the elements) of each vector even if the number generator is not seeded.