In a dark room, you’re handed a deck of cards with N of the cards faceup and the rest facedown. You can’t see the cards. How would you split the cards into two piles, with the same number of faceup cards in each pile?
เฉลย (ตัวอักษรสีขาว)
โจทย์ข้อนี้ผมอ่านเจอในหนังสือ Are You Smart Enough to Work at Google? เขียนโดย William Poundstone
สมมุติมีไพ่ k ใบที่มี N ใบหงายหน้า k-N ใบคว่ำหน้า เราก็แบ่งไพ่เป็น 2 กอง กองแรก N ใบ กองที่สอง k-N ใบ ถ้าไพ่กองแรกมีหงายอยู่ x ใบ ทำให้มีไพ่ที่คว่ำอยู่ N-x และทำให้เรารู้ว่ามีไพ่ที่หงายอยู่ในกองที่สอง N-x ใบ ฉะนั้น เราก็แค่กลับหน้าไพ่กองแรกทั้งหมดทั้ง N ใบ ไพ่กองนั้นก็จะมีไพ่ที่หงายอยู่ N-x ใบเท่ากับไพ่ที่หงายที่อยู่ในกองที่สองตามที่ต้องการ