Let
![p](/media/m/1/c/8/1c85c88d10b11745150467bf9935f7de.png)
be a prime and
![A = \{a_1, \ldots , a_{p-1} \}](/media/m/7/7/0/7704193f12e96e8d7c54972f7017a1c2.png)
an arbitrary subset of the set of natural numbers such that none of its elements is divisible by
![p](/media/m/1/c/8/1c85c88d10b11745150467bf9935f7de.png)
. Let us define a mapping
![f](/media/m/9/9/8/99891073047c7d6941fc8c6a39a75cf2.png)
from
![\mathcal P(A)](/media/m/c/6/4/c64ac6d05c3511d84bb35fde3b35c8b6.png)
(the set of all subsets of
![A](/media/m/5/a/e/5ae81275ee67d638485e903bdc0e9cde.png)
) to the set
![P = \{0, 1, \ldots, p - 1\}](/media/m/d/7/9/d79031eaff797b711b690a4cd5a15f8c.png)
in the following way:
![(i)](/media/m/2/b/9/2b900b6092ba26af1415020bbd427e84.png)
if
![B = \{a_{i_{1}}, \ldots , a_{i_{k}} \} \subset A](/media/m/7/2/6/7263e459f52b924614e28b2fac53ff21.png)
and
![\sum_{j=1}^k a_{i_{j}} \equiv n \pmod p](/media/m/4/3/1/43188f06260267db7a8405fea81c16bd.png)
, then
![f(\emptyset) = 0](/media/m/5/0/a/50ab9b80e784c317309dd08040723fd9.png)
,
![\emptyset](/media/m/0/5/f/05fffef8038395753fbfe57c9406dff1.png)
being the empty set.
Prove that for each
![n \in P](/media/m/c/d/9/cd9e2a5a059fbe087240ea925170c481.png)
there exists
![B \subset A](/media/m/a/0/8/a0890216c67c6715771ad52d4bcb98b2.png)
such that
%V0
Let $p$ be a prime and $A = \{a_1, \ldots , a_{p-1} \}$ an arbitrary subset of the set of natural numbers such that none of its elements is divisible by $p$. Let us define a mapping $f$ from $\mathcal P(A)$ (the set of all subsets of $A$) to the set $P = \{0, 1, \ldots, p - 1\}$ in the following way:
$(i)$ if $B = \{a_{i_{1}}, \ldots , a_{i_{k}} \} \subset A$ and $\sum_{j=1}^k a_{i_{j}} \equiv n \pmod p$, then $f(B) = n,$
$(ii)$ $f(\emptyset) = 0$, $\emptyset$ being the empty set.
Prove that for each $n \in P$ there exists $B \subset A$ such that $f(B) = n.$