Understanding function representation

49 Views Asked by At

I have a boolean function $f : \{0,1\}^n \rightarrow \{0,1\}^n$. So my question is what is this $n$ denotes? Does it mean i have $n$ propositional variables in my function in the input and a single string of length $n$ in the output, which contains either $0$ or $1$? Or am i wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

This notation means $f$ has an input of $n$ values, each being either a $1$ or a $0$, and its output is also a binary string of length $n$.

More precisely, this notation specifies that the domain (and codomain) of $f$ is the set of all ordered $n$-tuples whose entries are the elements $1$ and $0$.

For example, perhaps $$ f(\underbrace{1,0,\ldots,0}_{\text{$n$ entries}}) = (\underbrace{0,0,\ldots,1}_{\text{$n$ entries}}). $$