0

maybe I miss something and I like to know where is my mistake:
Lets suppose we play Nim with $n$ piles, and lets say we we limit each pile to be between $0$ to $k$.
Now, according to this question: How to prove that subset at odd size is equal to subset at even size? the amount of the winning situations should be equal to the loosing situations, why?

Because we can translate the piles to binary numbers, like: $$\begin{array}{ccccc} 1 & 0 & 0 & 1 & 0\\ 1 & 1 & 1 & 0 & 0\\ 0 & 0 & 0 & 1 & 0\\ 0 & 1 & 0 & 0 & 1\\ 1 & 0 & 0 & 0 & 1 \end{array}$$

And we are loosing iff the sum of each column is $0$.
In other words - we are loosing if each column have even times of $1$'s (like: 0,2,4,...).

Now, what I'm not understating is this:
The amount of even times of 1's is equals the the odd times of 1's, so why the we have more winning situation the loosing situations? (I run a program to check it and this was the result).

I assume it's because the AND, i.e. that each column must be with even amount of 1's.
But I'm stack here....

I'd like to understnad what I miss here.

Thank you!

bof
  • 78,265
CS1
  • 2,047
  • 1
    Yes, it’s because of the AND. Intuitively, there are more winning than losing positions in many impartial games because there only needs to be one good move to make a position winning; whereas all moves must be bad to make a position losing. – mjqxxxx Aug 20 '21 at 21:16

2 Answers2

1

In your example, there are five columns. There are $2^5=32$ ways to fill each column with ones and zeroes, while there are $2^{5-1}=16$ ways to fill each column with an even number of ones. It is true that $16$ is one half of $32$. However, the number of ways to make all of the columns have an even number of ones is $16^5$, while the total number of ways to fill the matrix is $32^5$. Note that $16^5$ is not equal to one half of $32^5$. Instead, the proportion of losing positions is $(1/2)^5$.

It helps to think of it probabilistically. If you fill out the first column randomly, the probability there is an even number of ones in the first column is $1/2$. If you fill all columns randomly, then the probability they all have an even number of ones is $(1/2)^5$, since the columns are all independent.

In general, if you have $n$ piles, where each pile size is less than $2^r$ for some $r\in \mathbb N$, then the proportion of losing positions $(1/2)^n$.

Mike Earnest
  • 75,930
0

Here is my solution:
Lets say that: $p$ is the number of the piles, and $n$ is the maximum size of each pile, and for make much easier lets assume that: $n=2^k-1$ (for $k\in \mathbb{N}_+$) and $q = \left\lceil \log_{2}\left(n\right)\right\rceil $.

For loosing positions:
Each column must have even 1's, and because we now that we have $2^p$ subsets overall and the amount of even 1's subsets is equal to the the amount of odd 1's subsets, the amount of even 1's is $2^{p-1}$ (and this is the the amount of the odd 1's).
We have $q$ columns and it should be at each column, so:
$$\overbrace{2^{p-1}\cdot2^{p-1}\cdots2^{p-1}}^{q} = (2^{p-1})^q$$

The winning positions is all the possible positions ($2^{pq})$ minus the loosing positions:
$$2^{pq}-(2^{p-1})^q$$

And if we will mark: $2^{p}=\varDelta$, we will get:
$$\varDelta^q-\left(\frac{\varDelta}{2}\right)^q$$

So as $n$ is bigger $q$ is bigger, hence the the difference between the loosing and winning positions is bigger.
For example: If $n=1$ the $q=0$ and then the winning postion = loosing positions,
but if $n=2$ - the amount of winning potsitons is bigger $3$ times then the amount of loosing positions.

CS1
  • 2,047