document.write( "Question 1183400: Suppose you have n different pairs of socks (n left socks and n right socks, for 2n individual socks total) in your dresser. You take the socks out of the dresser one by one without looking and lay them out in a row on the floor. What is the probability that no two matching socks are next to each other? \n" ); document.write( "
Algebra.Com's Answer #813700 by robertb(5830)\"\" \"About 
You can put this solution on YOUR website!
UPDATE #2!\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "To tutor @ikleyn:\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "You totally didn't understand the strategy I laid out. The scenario I envisioned was, fixing all left socks on one row, such as in the case of 3 pairs,
\n" ); document.write( "one will have the initial row\r
\n" ); document.write( "\n" ); document.write( "\"L%5B1%5D\" \"L%5B2%5D\" \"L%5B3%5D\"\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "and then inserting R1, R2, and R3, one after the other, in ANY of the \"highlight+%28FOUR%29\" slots available for insertion, and nowhere else!
\n" ); document.write( "This is for the purpose of producing arrangements such that an R sock will not be either to the left or right of its L match.
\n" ); document.write( "
\n" ); document.write( "The arrangement you laid out is not my interpretation, it is YOURS, and yours alone,
\n" ); document.write( "hence you have found contradiction only in your approach, but not mine. SO you destroyed your own logical construction.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "------------------------------------------------------------------------
\n" ); document.write( "------------------------------------------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "UPDATE! \r
\n" ); document.write( "\n" ); document.write( "Tutor @ikleyn claims that the problem is NOT about derangement. But if you looked at and even understood what is presented at
\n" ); document.write( "the wikipedia page she cited (just like I did), then you will realize that IT IS a problem on derangement.
\n" ); document.write( "The strategy is to lay out one from each pair of the 12 pairs of socks on a row and then to insert each of the other 12 socks next to the others laid out.
\n" ); document.write( "We have to count the number of ways that an insertion doesn't produce a \"match\", i.e., a sock doesn't lie beside its match.
\n" ); document.write( "It then becomes a problem similar to 12 men each of which not getting his correct hat back from the hatstand containing 12 hats.
\n" ); document.write( "Of course, one may argue that the sock might be inserted either to the left or to the right of a fixed sock, but this only doubles the permutations overall.
\n" ); document.write( "Incidentally, this will also double the number of drangements that are possible, so the factor 2 just cancels out.\r
\n" ); document.write( "\n" ); document.write( "And to tutor @ikleyn, if you wanted to help a student sincerely, don't just say another tutor is wrong -- give the correct answer and solution!
\n" ); document.write( "Otherwise all your effort is useless and has no value pedagogically.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "I think it is safe to say that tutor @ikleyn DOES NOT KNOW the answer, nor has any idea on how to solve the problem.\r
\n" ); document.write( "\n" ); document.write( "-----------------------------------------------------------------------
\n" ); document.write( "-----------------------------------------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "This is a problem on the derangements of n = 12 objects, with no sock lying next to its match.\r
\n" ); document.write( "\n" ); document.write( "The answer is (!12)/12! = 176,214,841/12! = 0.367879, to 6 d.p. This is almost equal to \"1%2Fe\".\r
\n" ); document.write( "\n" ); document.write( "***!n is called the number of drangements of n objects, where none of the n objects are paired correctly with its right match.
\n" ); document.write( "You are referred to https://en.wikipedia.org/wiki/Derangement.
\n" ); document.write( "
\n" );