0
$\begingroup$

Question: Let $A = \{x \in \Bbb N \mid \exists y(x = 2y \lor x = y^2)\}$. Construct a surjective mapping $ f: \mathbb{N} \rightarrow A $. By doing this, you demonstrate that A is a countable set.

Approach: To construct a surjective mapping $ f: \mathbb{N} \rightarrow A $, we need to ensure that every element in set $ A $ is mapped to from some element in the set of natural numbers $ \mathbb{N} $.

Given the definition of set $ A = \{x \in \mathbb{N} \mid \exists y(x = 2y \lor x = y^2)\} $, we can see that any natural number can be represented either as twice another natural number or as the square of a natural number.

One way to construct a surjective mapping is as follows:

For even numbers $ x $, let $ f(x) = x/2 $.

For odd numbers $ x $, let $ f(x) = \sqrt{x} $.

This mapping ensures that every element in $ A $ is covered.

This demonstrates that $ A $ is a countable set because we can create a one-to-one correspondence between $ A $ and the set of natural numbers $ \mathbb{N} $.

Would this be enough to prove that A is a countable set?

$\endgroup$
3
  • 1
    $\begingroup$ You have gone wrong at the start. The question asks for a mapping $ f: \mathbb{N} \rightarrow A $ but your one goes $ f: A \rightarrow \mathbb{N} $. $\endgroup$ Commented Apr 7 at 18:54
  • $\begingroup$ And it is not true that " any natural number can be represented either as twice another natural number or as the square of a natural". You mean presumably "...any natural number in $A$ can be represented either as....". $\endgroup$ Commented Apr 7 at 19:01
  • $\begingroup$ $A$ is the set of even natural numbers, union with the set of square numbers, correct? So $A$ can also be written as the disjoint union of $B$ and $C,$ where $B$ is the set of odd squares and $C$ is the set of even natural numbers. $\endgroup$ Commented Apr 7 at 20:14

1 Answer 1

0
$\begingroup$

Since you don’t need $f$ to be bijective, you have a lot of “wiggle room” to work with.

If $n$ is even, define $f(n)=n$. If $n$ is an odd square, define $f(n)=n$. If $n$ is odd but not a square, define $f(n)=n+1$.

Do you see why (a) $f$ maps $\Bbb N$ to $A$ and (b) why it does so surjectively?

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .