The question given is check Whether following is countable or not
$1).$The set of all the functions from $\mathbb{Q}$ to $\left \{0,1 \right \}$
$2).$The set of all the functions from $\mathbb{Q}$ to $\left \{0,1 \right \}$ which vanish outside a finite set
solution i tried- In $1$ option we can see that number of functions is $2^{\aleph_0}$ which is uncountable
But for $2$ option i am not getting clue how to proceed further Seems like he is asking about the cardinality of set of compact support functions .
Please help
Thank you
For each $n$, show that the set of functions from $\mathbb{Q}$ to $\{0,1\}$ that vanish outside a finite set of $n$ elements is countable. From here can you conclude that your set is countable?
For example, when $n=1$, we're looking for the functions that vanish at all but one point $x\in \mathbb{Q}$. Then we can easily see that there are two varieties of a such functions: (1) $f(y)=0$ for all $y\in\mathbb{Q}$, or (2) $f(y)=0$ for all $y\neq x$ and $f(x)=1$. Thus there are two functions for each $x\in \mathbb{Q}$, so this set is countable.