If your idea fails for 8 then it fails if there are numbers that provide a strategy for the second player. Neither of you sound very intelligent.
That's because you wouldn't recognise it if it bit you on the leg.
If your idea fails for 8 then it fails if there are numbers that provide a strategy for the second player. Neither of you sound very intelligent.
That's because you wouldn't recognise it if it bit you on the leg.
"All I had to do was follow the rules as given and choose a trivial example."
where was that in the problem? where did I say that you got to choose the example?
you still havent answered this opti. it explicitly says "given n", so you dont get to choose the n. n is chosen for you.
h player (the player going first or second) has a strategy to guarantee a victory.
what's the answer opti?
If the question is correct then the first player has that strategy for obvious reasons considering trivial examples. BUT the question may not be correct.
a random number "n" is chosen. two players take turns subtracting positive palindromic numbers from "n" until one player reaches 0, of which then that player wins. (you cant go negative, and palindromic numbers are numbers that are the same backwards and forwards, so 11, 929, 89398, single digit numbers, etc).
given 'n', show which player (the player going first or second) has a strategy to guarantee a victory>>>>>
I know thatRatmar isn't very bright but neither are you, Mega. Where does it say that n is no-random and has to be 240?
If it's random that it should work for any number equally, so I chose 8, giving an instant win for the first player. You've obviously given the problem wrongly, which means that you are not very bright, Mega.
Try again.
"a random number "n" is chosen. two players take turns subtracting positive palindromic numbers from "n" until one player reaches 0, of which then that player wins. (you cant go negative, and palindromic numbers are numbers that are the same backwards and forwards, so 11, 929, 89398, single digit numbers, etc).
given 'n', show which player (the player going first or second) has a strategy to guarantee a victory"
If neither of you can do very simple syllogistic logic, what are either of you doing arguing on this thread? It means that neither of you can follow the very simplest, deductive arguments.
I suppose I have to treat you both as really thick. The point is that if it doesn't work for 8, it doesn't work.
My first idea was that if I chose 12, then the first player can choose 1, giving the second player the win, 2, giving the first player the win, any other number, giving the second player the win. But that any random number under 10 is an immediate win for the first player. Any number which can be reduced to ten by any player is a win for that player.
It was pretty obvious that Mega gave the question wrongly because for instance, the random number ten is a loss for the first player. So there's no consistency and the question implies consistency. Your problem is that you don't know what a random numbr is. You don't get to choose it. Lack of basic IQ.
it's a simple fact that the first player wins for some numbers and the second for others. So the question is not well-specified as it relies on the meaning of a random natural number. There is no obvious probability distribution on natural numbers that can be assumed, and the answer as to who is better off on average depends on the probability distribution of the "random" numbers being used as the initial state.
It seems likely that there are more winning numbers than losing ones up to a certain bound. This is based on overgeneralizing results for small bounds (see below).
I have failed to see a general reasoning to identify all the winning and losing numbers, but found all numbers that will end in up to 4 moves with optimal play. Here is my less than fully successful exploration.
========================================================================
Groundwork: Palindromic numbers with 1, 2, 3... digits are:
1:9; 1:9 * 11; 101 * 1:9 + 0:9 * 10; ...
Here is the start of the construction of a "tablebase" for the game. ![]()
Number that is won in 0 moves:
S_0= {0}
Numbers that are lost in 1 move:
S_1 = {1}
Numbers that are won in 2 moves are any palindromic number + 1. eg 2:10, 1 + 11 * 1:9, 1 + 101 * 1:9 + 10 * 1:9.
S_2 = {P+1 | P is palindromic}
Numbers that are lost in 3 moves: any number that has the property that if you subtract a palindromic number from it, the remainder is one more than some non-zero palindromic number OR zero. The first example is 11. Subtracting 1 to 9 from this allows the opponent to return 1. Subtracting 11 gives him 0. 12 and 14:21 are not examples (subtract 1) but 13 is. Nor 23 and 25:32 are not examples, but nor is 24 - subtract 3. From there no numbers are since the palindromic numbers are at least 11 apart, so always subtracting some single digit palindromic number will do.
Summary: S_3 = {11, 13}
S_4 is the numbers that you can get to S3 from. S_4 = {11 + P, 13 +P | P palindromic}
S_5 is the numbers such that all moves lead to S_4. I suspect that S_5 is finite and small and consists of a few 3 digit numbers.
This is getting complicated, and we need to use general deduction instead of playing with examples!
it's a simple fact that the first player wins for some numbers and the second for others. So the question is not clear as it relies on the meaning of a random natural number. There is no obvious probability distribution on natural numbers that can be assumed, and the answer depends on the probability distribution of the "random" numbers being used as the initial state.
I have failed to see a general reasoning to identify all the winning and losing numbers, but played a bit with easier examples. Here is my less than successful rambling.
I would say that it seems possible that there are more winning numbers than losing ones up to a certain bound. This is based on overgeneralizing results for small bounds (see below).
Groundwork: Palindromic numbers with 1, 2, ... digits are:
{1:9, 1:9 * 11, 101 * 1:9 + 0:9 * 10
Number that is won in 0 moves:
S_0= {0}
Numbers that are lost in 1 move:
S_1 = {1}
Numbers that are won in 2 moves are any palindromic number + 1. eg 2:10, 1 + 11 * 1:9, 1 + 101 * 1:9 + 10 * 1:9.
S_2 = {P+1 | P is palindromic}
Numbers that are lost in 3 moves: any number that has the property that if you subtract a palindromic number from it, the remainder is one more than some non-zero palindromic number OR zero. The first example is 11. Subtracting 1 to 9 from this allows the opponent to return 1. Subtracting 11 gives him 0. 12 and 14:21 are not examples (subtract 1) but 13 is. Nor 23 and 25:32 are not examples, but nor is 24 - subtract 3. From there no numbers are since the palindromic numbers are at least 11 apart, so always subtracting some single digit palindromic number will do.
Summary: S3 = {11, 13}
S_4 is the numbers that you can get to S3 from. S_4 = {11 + P, 13 +P | P palindromic}
S_5 is the numbers such that all moves lead to S_4. I suspect that S_5 is finite and small and consists of a few 3 digit numbers.
This is getting complicated, and we need to use general deduction instead of playing with examples!
Thanks.
I think my solution (when leading zeros aren't allowed) works. The rationale being that no palindrome ends in zero, therefore if I give you a number that ends in zero, you can't do the same back to me... so as long as I hand you a multiple of 10 I win (I think).
Yeah, that's what I thought too. Always subract a number so that you give the other guy a multiple of 10 - which is always possible since you can subract any single digit number.
it's a simple fact that the first player wins for some numbers and the second for others. So the question is not well-specified as it relies on the meaning of a random natural number.
...
The question was, "given 'n', show which player (the player going first or second) has a strategy to guarantee a victory".
What's not well specified about that?
E.g. if I'm given 346 it's me, if I'm given 240 it's my opponent.
This is getting complicated, and we need to use general deduction instead of playing with examples!
I think my solution (when leading zeros aren't allowed) works. The rationale being that no palindrome ends in zero, therefore if I give you a number that ends in zero, you can't do the same back to me... so as long as I hand you a multiple of 10 I win (I think).
For example n=903,421 I might subtract 111,111 to make it end in a zero, and I'm not sure how you can avoid that strategy.
There is a hole in that logic. He can't return a number to you ending in a zero, but there could be other winning numbers. Eg you give him 20, he gives you 11 or 13 (loss in 3 as discovered in my analysis).
Eg you give him 20, he gives you 11 or 13 (loss in 3 as discovered in my analysis).
He gives 13 (or 11), then you give him 10, which loses. What am I missing?
This is getting complicated, and we need to use general deduction instead of playing with examples!
I think my solution (when leading zeros aren't allowed) works. The rationale being that no palindrome ends in zero, therefore if I give you a number that ends in zero, you can't do the same back to me... so as long as I hand you a multiple of 10 I win (I think).
For example n=903,421 I might subtract 111,111 to make it end in a zero, and I'm not sure how you can avoid that strategy.
There is a hole in that logic. He can't return a number to you ending in a zero, but there could be other winning numbers. Eg you give him 20, he gives you 11 or 13 (loss in 3 as discovered in my analysis).
He gives you 11, you give him 11-1=10. He gives you 13, you give him 11-3=10. Either way he's stuffed.
If you get a number not ending in 0 you can leave a smaller number ending in 0 and you'll always get back another number not ending in 0 because no palindromes without leading 0s end in 0. So by descent you're going to leave him with 0. But if you get a number that ends in 0 he's going to do the same to you instead.
It's the first time I heard of a random number which has to be 240.
it was never claimed to always be 240. 240 was just given as an example. the problem you are to solve is to determine the answer for ANY n given, as denoted by basic grammar.
So I chose 8. You seem not to like 8 very much. The firstplayer wins. Perhaps you gave the puzzle wrongly. Rattigan isn't very intelligent. It's a known thing.
i didnt give the puzzle wrongly you just dont have reading comprehension lol.
you still havent answered why YOU get to choose the number, instead of you providing a solution that could successfully analyze any number chosen for you.