Pair of Socks Puzzle

Puzzle on Pair of Socks 

Premise – In a drawer, you have an equal number of pairs of socks that are identical and are of red and blue. 

Rule – You can only pull out one sock at a time. But you cannot look at the sock before pulling it out. 

Objective – What is the maximum number of tries it will take before you have a perfect pair of socks?

pair of socks

Solution

The maximum number of tries it will take before obtaining a perfect pair is 3.

1st Try:-

  • On the first try, we will pick either a red or a blue sock.
  • Say we pick a red sock.

2nd Try:-

  • Now on the second try, we will again pick either a red or blue.
  • if we pick a red, then this red and the earlier form a pair and we got the perfect pair.
  • else we pick a blue and go for the third try.

3rd Try:-

  • Now on the third try, we will pick red or blue.
  • But now since we have a color for each pair already
  • if we pick red, we have a pair of red socks.
  • if we pick blue we have a pair of blue socks.
In a drawer you have an equal number of pair of socks

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription