Caves and A Thief Puzzle

Puzzle on A Thief and Caves

The puzzle is based on a situation where we have caves and a thief puzzle. Let us look at the premise, rule, and objective to find out more.

Premise – There are 13 caves arranged in a circle. In one of the caves, there is a thief. Each day the thief has an option to move to any of the nearby caves or stay in the cave where he existed the day before.

Rules – Cops are also permitted to enter any two caves they want each day.

Objective – What is the minimum number of days required to ensure that the thief is apprehended by the cops?

Note – The thief may or may not move to a nearby cave. Cops can inspect any two caverns, which do not have to be contiguous.

There are 13 caves arranged in a circle.

Solution

Solution to Find Minimum Number of Days

Let us assume the burglar is in cave C1 and is working his way clockwise.
  • The cops begin their hunt from caves C13 and C12 on the first day.
  • On the second day, visit Cave C13 and C11, then C13 and C10 on the third day, and so on until they reach Cave C13 and C1 on the 12th day.
  • So the goal is to check C13 every day so that if a thief tries to move anti-clockwise, you can catch him right away, and if he goes clockwise, cops can capture him in no more than 12 days (this includes the case where he remains in Cave C1).
  • Therefore the correct answer is 12.
puzzle on Caves and a thief

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