Size of a set. Countable or uncountable? I have 2 sets:
$$A=\{f\in \Bbb Q^{\Bbb N}:\exists k \in \Bbb N \;\forall\ n \ge k \;(f(n+1)-f(n)=2)\}$$
$$B=\{f \in \Bbb N^{\Bbb N} : \exists k \in \Bbb N\; \forall n\ge k \;(|f(n+1)-f(n)|=2)\}$$
I know that $\Bbb N^{\Bbb N}=\Bbb Q^{\Bbb N}=\mathfrak c$ and I thought that both $A$ and $B$ are uncountable. But it turned out that $A$ is countable and $B$ is uncountable.
Why? 
 A: The main difference is the absolute value in the definition of set $B$.
Regarding set $A$, at some point the relation $f(n+1)-f(n)=2$ becomes true. That means that given $f(n)$ the value of $f(n+1)$ is completely determined: namely, $f(n)+2$.
Regarding set $B$, at some point the relation $|f(n+1)-f(n)|=2$ becomes true, which is equivalent to $f(n+1)-f(n)=\pm 2$. That means that given $f(n)$ there are two possible values of $f(n+1)$: namely, $f(n)+2$ and $f(n)-2$.
For set $A$, you basically get to choose any values of the function for finitely many values of $n$, then the function is set. So this is equivalent to the number of finite sequences of integers, which is countable.
For set $B$, you basically get to choose any values of the function for finitely many values of $n$, then you get to choose two values for the rest of the $n$'s. So this is equivalent to the number of infinite sequences of two values (such as $0$'s and $1$'s), which is uncountable (equinumerous to the number of binary expansions of real numbers between zero and one).
Just to clarify: the difference between $\mathbb Q$ and $\mathbb N$ in the definitions is irrelevant here.
A: $f \in A$ is a rational sequence satisfying $f(n+1)=f(n)+2$ for $n\geq k$ where $k\in \mathbb{N}$. So to determine an f, it is enough to fix $k \in \mathbb{N}$ and rationals $f(1),f(2),...f(k)$. Thus we only need to choose finite set of rationals to determine f. (Countable union of countable choices is countable) Hence A is countable.
For $f \in B$, we also need to fix a $k \in \mathbb{N}$ and $f(1),f(2),...f(k)$. But $|f(n+1)-f(n)|=2$ implies $f(n+1)=f(n) \pm 2$, thus giving 2 choices for $f(n)$ for each $n>k$. This implies B is bijective to $\{0,1\}^\mathbb{N}$ which is uncountable.
Hoping I was able to explain my reasoning clearly.
A: Note that if $f\in A$, and $k$ is as promised from the condition, then $f$ is fully determined by $f(0),\ldots,f(k)$. Since there are only a countable number of finite sequences of rationals, there can be at most countably many elements of $A$.
On the other hand, if you take any $X\subseteq\Bbb N$, you can encode it into a function in $B$ by defining recursively, $f_X(n+1)=(-1)^{\chi_X(n+1)}2+f_X(n)$, and $f(0)=0$.
Namely, start with $0$ and at each step you add $+2$ if $n+1$ is in $X$, or add $-2$ if $n+1$ is not in $X$. Now show that $X\mapsto f_X$ is a bijection, and conclude the ordeal.
