# A game involving Even and Odd functions

I was doodling around today and thought of this fun game. Two players take alternate turns playing this game. A function from now on refers to real valued functions with domain $\mathbb R$, and Odd and Even functions have the usual meaning.

A function $F$ is said to be complimentary to a function $H$, if one of the following is true:-

1. $F$ is Odd when $H$ is Even.
2. $F$ is Even when $H$ is Odd.

The first player starts with a function $h_n$, which is either Odd or Even. The second player is said to make a move when he/she provides another function $g$ along with an operation $*$, (where $*$ is one of $+,-,\times,\circ$), so as to create a function $h_{n+1} = h_n*g$ or $h_{n+1}=g*h_n$ such that $g$ is complimentary to $h_n$ and in accordance with the rules (stated below). Moves are made alternately between the two players, and the player who is unable to make a move loses.

Rules

1. $h_n$ is added to a set $V$ for each $n$.

2. $\forall g_1,g_2,.... \in V$ and $\forall a_1,a_2,.... \in \mathbb R$, $(a_1g_1^n+a_2g_2^n+....)$ is added to $V$, where $n \in \mathbb N$ and $g_k^n = {g_k} \times {g_k} \times \cdots g_k$ $n$ times.

3. If $g \in V,$ $g$ cannot be used in a move.

4. At the end of each move, the function used by the player is added to $V$.

5. The $*$ provided by the player cannot be used in consecutive moves.

Example

Player 1: $h_1(x)=x$, which is Odd.

Player 2: $g(x)=|x|$ and $* = \circ$ so that $h_2(x) = (h_1 \circ g)(x) = |x|$, which is Even.

Player 1: $g(x)=sin(x)$ and $*=\times$ so that $h_3(x)=h_2(x)\times g(x) = |x|sin(x),$ which is Odd.

Player 2: $g(x) = cos(x)$ and $* = \circ$ so that $h_4(x) = (g \circ h_3)(x) = cos(|x|sin(x))$, which is Even.

And it goes on...

I don't know much of higher mathematics to analyze this game, so I would appreciate it if someone could answer the following questions which I had in mind:-

1. Are the rules well defined? I don't think my statement of Rule #2 is correctly written, since $V$ turns out to be an infinite set.

2. Are the rules strong enough to ensure that both players don't have a "trick" to play for an indefinitely long time? If not, how do I make them stronger?

3. Does the game terminate, in theory?

4. What is $V$ eventually? Can it ever contain all Even and Odd functions?

• I'm having conceptual issues with your rule #2. In your example, at the start of turn 2, $$V = \left\{ h_1\right\} = \left\{ x\right\}$$ but if we choose $a_1 = 2, a_{k > 1} = 0$, the function $2x$ clearly isn't in $V$ and thus condition 2 fails to hold. Also, you would need to define whether $g_k^n$ is ${g_k} \circ {g_k} \circ \cdots$ or ${g_k} \times {g_k} \times \cdots$. – COTO Sep 3 '14 at 15:21
• Edited, thanks. I meant to say that whenever a function is added to $V$, all possible linear combinations of it with other functions in $V$ are also added to $V$. And $g_k^n$ is ${g_k} \times {g_k} \times \cdots g_k$, $n$ times. – Train Heartnet Sep 3 '14 at 15:43
• In that case, adding the function $x$ in the first turn also adds all polynomials with zero constant term to $V$. Any function expressible by a Taylor series with an infinite radius of convergence ($sin$ and $cos - 1$ being two examples) would then necessarily be ruled out unless you imposed finiteness on the number of terms in the polynomial. As a secondary note, notwithstanding the above issue, a game could go on forever with each player alternating $cos$-wrapping or $sin$-multiplying $h_n$ and adding symmetric or antisymmetric delta functions at unique locations for each $n$. – COTO Sep 3 '14 at 16:51

## 1 Answer

I think Player 2 can at least avoid losing by always playing a subtraction: Let $x_n$ be some more or less random sequence of (nonzero) real numbers and then let, $g=h_{2n-1}-h_{2n}$, where

$$h_{2n}(x)= \begin{cases} 0\quad\text{if }|x|\not= x_n\\ 1\quad\text{if }x=x_n\\ \pm1\quad\text{if }x=-x_n \end{cases}$$

with the $\pm1$ sign chosen according to whether Player 1 started the game Odd or Even. Rule 5 (no consecutive *'s) means that Player 1 cannot play the same strategy. (The OP's example shows that it's OK for Player 2 to use the same operation twice in a row.) Since there are an uncountable number of choices for each new $x_n$, you should be able to guarantee that each new $g$ is independent of all the functions that preceed it.

• I'm sorry, but I'm unable to understand your argument. If $x_n$ is a sequence, what is meant by $|x| \neq x_n$? Could you explain with an example? – Train Heartnet Sep 3 '14 at 16:05
• @JobinIdiculla, the displayed equation defines a function that is identically $0$ except at two symmetrically positioned points, $x_n$ and $-x_n$, where it takes either equal or opposite values (according to whether Player 1 started the game with an odd or even function). The basic idea is that there are uncountably many such functions and they are all linearly independent. The vector space $V$, on the other hand, is always finite-dimensional (it's built up one basis function at a time), so no matter how large it gets, there will always be an $x_n$ that gives a $g$ not in $V$. – Barry Cipra Sep 3 '14 at 16:35
• Oh, I should have said that the dimension of $V$ is always countable (not finite). I didn't notice that you were including all (positive integer) powers of each new $g$. But the uncountability of the basis functions of the type I described still trumps whatever dimension $V$ has. – Barry Cipra Sep 3 '14 at 16:49