What are some efficient ways to go about a problem where you cannot exceed the other by 2?

72 Views Asked by At

I need an efficient way to go about this problem, for practice for my problem solving test. This is not a part of the actual test. This is the type of question that I am struggling with

There are two types of box, an A box and a B box. (The A box contains A's, the B box contains B's.) You have 11 boxes. If you pick every box in turn, then every 2nd box, then every 3rd box etc, how many orders are there that will make sure that the number of A's never exceeds the number of B's by 2, and Vice versa?

I know I have worded this strangely, please comment if you need clarification/

1

There are 1 best solutions below

1
On BEST ANSWER

To answer your question, as asked in the title, "What are some effective ways to go about this type of problem?":

  • Solve the problem by hand for just one box.
  • Solve the problem by hand for just two boxes.
  • Solve the problem by hand for just three boxes.
  • Solve the problem by hand for just four boxes.
  • Solve the problem by hand for just five boxes.

The first couple of versions are so trivial that you may even have difficulty thinking that they are problems at all. In that case, skip them and start with 3 boxes and work upwards.

You will quickly see some patterns, and you will see new patterns appearing each time you add a box.

At this point you can start to generalise. I can't tell you what you're going to think until you have thought it - but this is the way to approach a surprisingly large class of problems: start with toy ones, and work up.

In the early days of civilian cryptography I broke the Lu-Lee public-key cryptosystem exactly like this. The paper doesn't admit it, but starting with 1-digit or 2-digit keys was the way it all began.