2,411 views
0 votes
0 votes
Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, and the ordering of elements of U has the elements in
increasing order; that is, ai = i. What bit strings represent the subset of all odd integers in U,
the subset of all even integers in U, and the subset of integers not exceeding 5 in U?

2 Answers

1 votes
1 votes

Any subset S of U is represented by the bit string of length n, where n is the number of elements in U and -
The ith bit in the string is 1 $\rightarrow$ a∈ S
The ith bit in the string is 0 $\rightarrow$ a∉S

1) The subset of all odd integers in U - 1010101010

2) The subset of all even integers in U - 0101010101

3)The subset of integers not exceeding 5 in U - 1111100000

0 votes
0 votes
odd integers in U  $\rightarrow$ ${\{1,3,5,7,9}\}$   

bit $1$ in $1^{st}$ , $3^{rd}$ , $5^{th}$ , $7^{th}$ and $9^{th}$ positions

bit $0$, elsewhere

$1\rightarrow1$

$2\rightarrow0$

$3\rightarrow1$

$4\rightarrow0$

$5\rightarrow1$

$6\rightarrow0$

$7\rightarrow1$

$8\rightarrow0$

$9\rightarrow1$

$10\rightarrow0$

bit string $\rightarrow$  $1010101010$

 

 even integers in U  $\rightarrow$ ${\{2,4,6,8,10}\}$   

bit $1$ in $2^{nd}$ , $4^{th}$ , $5^{th}$ , $8^{th}$ and $10^{th}$ positions

bit $0$, elsewhere

$1\rightarrow0$

$2\rightarrow1$

$3\rightarrow0$

$4\rightarrow1$

$5\rightarrow0$

$6\rightarrow1$

$7\rightarrow0$

$8\rightarrow1$

$9\rightarrow0$

$10\rightarrow1$

bit string $\rightarrow$  $0101010101$

 

set of all integers in U that do not exceed 5 $\rightarrow$ ${\{1,2,3,4,5}\}$   

$1\rightarrow1$

$2\rightarrow1$

$3\rightarrow1$

$4\rightarrow1$

$5\rightarrow1$

$6\rightarrow0$

$7\rightarrow0$

$8\rightarrow0$

$9\rightarrow0$

$10\rightarrow0$

bit string $\rightarrow$  $1111100000$

Related questions

0 votes
0 votes
0 answers
1
Reshu $ingh asked Feb 8, 2019
330 views
$\sum_{k=0}^{\propto }\left ( \sum_{j=0}^{k}1 \right )x^{k} = \sum_{k=0}^{\propto}(k+1)x^{k}$ How LHS=RHS here?
0 votes
0 votes
2 answers
2
Reshu $ingh asked Feb 7, 2019
551 views
“For every person x, if person x is a student in this class then x has studied Calculus.”S(x):Person x in the classC(x):x has studied Calculus.1.$\vartheta _{x} (S(x)...