Given the set $A = \{0, 1\}^8$, how can I find the set of all elements in A with exactly 4 zero entries?
Finding specific elements in a finite set
1
$\begingroup$
elementary-set-theory
relations
-
2What do you mean by *find*? – 2012-10-31
-
0Sorry about the ambiguity. I am trying to obtain every element in A with four zero entries. For example, $(0,1,0,0,1,0,1,1)$. – 2012-10-31
-
0I understand which of the elements of $A$ you want; I just don’t know in what sense you want to *find* them. Do you want notation for describing that subset of $A$? Do you want an algorithm for going through $A$ and picking them out? Or what? – 2012-10-31
-
0I am looking for some notation to describe that subset. Apologies! – 2012-10-31
2 Answers
2
There are many ways to describe the set in question. One that hews very closely to the language in which you described it is
$$\left\{\varphi\in A:\left|\varphi^{-1}\big[\{1\}\big]\right|=4\right\}\;.$$
Here I use the fact that elements of $\{0,1\}^8$ are functions from some $8$-element set to $\{0,1\}$. If you prefer to think of them as $8$-tuples, you may prefer other descriptions, e.g.,
$$\left\{\langle a_1,\dots,a_8\rangle\in\{0,1\}^8:\left|\big\{k\in\{1,\dots,8\}:a_k=1\big\}\right|=4\right\}$$
or, with a shorter but less direct translation,
$$\left\{\langle a_1,\dots,a_8\rangle\in\{0,1\}^8:\sum_{k=1}^8a_k=4\right\}\;.$$
1
A suitable notation would be
$$\{(x_{1},...,x_{8})\in A\ | \ \sum_{i=1}^{8}{x_{i}}=4\}$$