25

It might be possible to do a little better, but I think I can get Explanation:


12

A complementary result of tehtmi's answer: Using the same strategy, is the maximum number of coins you can get, and +1 is impossible. Proof:


11

You can solve the problem via integer linear programming as follows. Let $n$ be the number of coins, so we need at most $n$ bags. For $b \in \{1,\dots,n\}$, let nonnegative integer decision variable $x_b$ be the number of coins in bag $b$, with $x_b$ nonincreasing. Let $z$ represent $\max_b \{b\cdot x_b\}$, which is the number of coins the king will take. ...


10

Can't you just do ?


9

Their best strategy is Their chances with this strategy are Optimality


7

The poor robot might get slightly less dizzy with


4

A slightly different approach as the other answers


3

Here is my edited improved answer, not sure optimal, there is a methodology but not sure about its optimality anyway: For this, I will put the coins in the bags as below: As a result, There are 4 possibilities for your knight to choose, or or or


3

I found a solution using This works as follows: The reason why the enemy cannot intercept 10 different messages: Furthermore, this number of days is optimal because of the following argument:


3

Edit: I'm sure @tehtmi's answer is correct. Kind of irrelevant to my answer, but here is a code for you to experiment with different bag combinations. Simply fill in the bags list and run the program: For bags I used: And @tehtmi used: bags = [] # Put in this list all the numbers you want, with each number representing a bag of that amount of coins keeps =...


3

Alternative solution:


3

The following program should work:


3

I randomly encountered this problem and I think I have a simpler solution (for the special kudos version) than Gareth's:


2

I now wonder how many solutions there are. Just in case the purpose is to take as long as possible: "the tourist".


1

It gets a bit messy, but in the end it comes down to algebra.


1

One sequence is: First, it seems clear that we need at least: This would give something along the lines of: We obviously need something else, though, because: However, we just need a bit of additional logic: Notice, however, there is no one answer:


Only top voted, non community-wiki answers of a minimum length are eligible