mscroggs.co.uk
mscroggs.co.uk

subscribe

# Puzzles

## Odd and even outputs

Let $$g:\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}$$ be a function.
This means that $$g$$ takes two natural number inputs and gives one natural number output. For example if $$g$$ is defined by $$g(n,m)=n+m$$ then $$g(3,4)=7$$ and $$g(10,2)=12$$.
The function $$g(n,m)=n+m$$ will give an even output if $$n$$ and $$m$$ are both odd or both even and an odd output if one is odd and the other is even. This could be summarised in the following table:
 $$n$$ odd even $$m$$ odd even odd e odd even
Using only $$+$$ and $$\times$$, can you construct functions $$g(n,m)$$ which give the following output tables:
 $$n$$ odd even $$m$$ odd odd odd e odd odd
 $$n$$ odd even $$m$$ odd odd odd e odd even
 $$n$$ odd even $$m$$ odd odd odd e even odd
 $$n$$ odd even $$m$$ odd odd odd e even even
 $$n$$ odd even $$m$$ odd odd even e odd odd
 $$n$$ odd even $$m$$ odd odd even e odd even
 $$n$$ odd even $$m$$ odd odd even e even odd
 $$n$$ odd even $$m$$ odd odd even e even even
 $$n$$ odd even $$m$$ odd even odd e odd odd
 $$n$$ odd even $$m$$ odd even odd e odd even
 $$n$$ odd even $$m$$ odd even odd e even odd
 $$n$$ odd even $$m$$ odd even odd e even even
 $$n$$ odd even $$m$$ odd even even e odd odd
 $$n$$ odd even $$m$$ odd even even e odd even
 $$n$$ odd even $$m$$ odd even even e even odd
 $$n$$ odd even $$m$$ odd even even e even even
Tags: functions
If you enjoyed this puzzle, check out Sunday Afternoon Maths XXVI,
puzzles about functions, or a random puzzle.

## Archive

Show me a random puzzle
▼ show ▼