I'm reading the book Discrete Mathematics and its Applications 4th Edition by Susanne Epp. One of the questions is:

Indicate the elements in the following sets:

$$\{n \in \mathbb{Z} \mid n = (-1)^k, \text{ for some integer } k \}$$

the answer given is the set $\{-1, 1\}$

Could someone explain to me how this works? I don't understand how you can find this set without knowing what k is. If it's even then n will have to equal 1, if it's uneven it will have to equal -1.

-
An element cannot be contained in a set more than once (a structure that allows it is called multiset), that means $\{1,-1,1,1,-1,-1,-1\} = \{-1,1\}$. – dtldarek Apr 22 '12 at 18:21
Ok I understand that, but if you plug in -1 as n and then plug in 1 as n they can't both equal -1 for the same value of k – Mekswoll Apr 22 '12 at 18:23
The usual interpretation of the "for some integer $k$" part would be "such that there exists an integer $k$." But there is some ambiguity, in ordinary language "some" could refer to a specific integer. – André Nicolas Apr 22 '12 at 18:24
Similar problem: think of even integers. It's the set of all $n,$ such that $n$ can be written as $n = 2k$ for some integer $k$ ("some" = "any unspecified" integer $k$). – user2468 Apr 22 '12 at 18:27
Ok, my problem was that I thought k had to be one and the same integer to satisfy both conditions, which is why I couldn't understand the solution. I now see why {-1, 1} is the answer seeing as any value for k can only give either -1 or 1. Many thanks. – Mekswoll Apr 22 '12 at 18:29

It is important to remember some fundamental properties of sets:

• A set is considered equal to another set if it has the same distinct elements as the other set. As a consequence the repetition of distinct elements within a set doesn't matter, nor does the order (e.g $\{1,2,3,4\} = \{1,1,2,3,4\}$).
• The elements of the set are defined by a "defining property", which all elements must meet

So, now let us consider your set:

$\left\{n \in \mathbb{Z} \mid n = (-1)^k, \text{ for some integer } k \right\}$

The defining property of your set is $n = (-1)^k, \text{ for some integer } k$. Like said in the comments, there is some ambiguity in the language here. This could be taken to mean "there exist a $K \in \mathbb Z$ such that $n = (-1)^k$" (or in logic notation: $\exists k \left( (k \in \mathbb Z ) \wedge (n = (-1)^k)\right)$ ), or it could be taken to mean "for every $k \in \mathbb Z$: $n$, is defined as $n = (-1)^k$" (in logic notation: $\forall k \in \mathbb Z \left (n = (-1)^k \right )$). Given your answer of $\{1,-1\}$, it is reasonable the proper interpretation is "for every $k \in \mathbb Z$, $n$ is defined as $n = (-1)^k$" (note that most natural language proofs I have seen use "for some $k$" as "there exist a $k$ such that").

Now that we understand what our defining property is let us try to write the set using roster notation. There are three cases to consider: $(k \in \mathbb Z) < 0$, $(k \in \mathbb Z) > 0$, and $(k \in \mathbb Z) = 0$.

• When $k$ is < 0 then we get: $n_{-1} = (-1)^{-1} = \frac {1} {-1} = -1$, $n_{-2} = (-1)^{-2} = \frac {1} {{-1}^2} = 1$, et cetera. The value of $n$ when $k$ is less than $0$ oscillates between $1$ and $-1$
• When $k$ is > 0 then we get: $n_{1} = (-1)^1 = -1$, $n_{2} = (-1)^2 = 1$, et cetera. This also oscillates between $1$ and $-1$
• There is also the trivial case $(-1)^0 = 1$

So now that we have considered all the possible values of $k$ we can write our set using roster notation:

• For $k$ is < 0 then we have $\{-1, 1, -1, ...\}$
• Concatenating the values when $k$ is > 0 we have $\{-1, 1, -1, ..., 1, -1, 1...\}$
• and lastly adding the trivial case: $\{-1, 1, -1, ..., 1, -1, 1,..., 1\}$

Lastly, because of the first property of sets that we recalled above, we must simplify this set to contain only distinct elements, and since the set $\{-1, 1, -1, ..., 1, -1, 1,..., 1\}$ is made of nothing but $-1$ and $1$ it can be written $\{-1,1\}$.

-