Function f from Power Set to Bit Strings in Math 2513, Assignments of Mathematics

How to determine the bit string representation of a subset of a given set using the function f. The function maps each subset to a bit string of length equal to the number of elements in the set. Examples of finding the bit string representations of specific subsets when the set has 8 elements, and describes how to determine the cardinality of a subset by examining its corresponding bit string.

Typology: Assignments

Pre 2010

Uploaded on 08/30/2009

koofers-user-r9h
koofers-user-r9h ๐Ÿ‡บ๐Ÿ‡ธ

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Class Problem
Math 2513
Wednesday, July 6
Problem. Let Abe a set with nelements which are labelled a1, a2, . . . , an. If Bis a subset of Alet
f(B) be the bit string of length nwhich has a 1 in the ith position if aiโˆˆBand has a 0 in the ith
position if ai/โˆˆB. This defines a function ffrom the power set of Ato the set Bnconsisting of all
bit strings of length n. That is f:P โ†’ Bn.
(a) In the case where n= 8, determine each of the following:
f(โˆ…), f(A), f({a5}), f({a8}) and f({a1, a3, a8}).
(b) In the case where n= 8, describe the subsets Bfor which f(B) is each of:
10101010,01010101,11110000,and 00001111.
(c) How can the cardinality of a subset Bbe determined by examining its corresponding bit string
f(B)?
ANSWERS:
(a) f(โˆ…) = 00000000, f(A) = 11111111, f({a5}) = 00001000, f({a8}) = 00000001 and f({a1, a3, a8}=
10100001.
(b) f({a1, a3, a5, a7}) = 10101010, f({a2, a4, a6, a8}= 01010101, f({a1, a2, a3, a4}= 11110000 , and
f({a5, a6, a7, a8}= 00001111.
(c) The cardinality of a subset Bof Aequals the number of 1โ€™s in the bit string f(B).

Partial preview of the text

Download Function f from Power Set to Bit Strings in Math 2513 and more Assignments Mathematics in PDF only on Docsity!

Class Problem

Math 2513

Wednesday, July 6

Problem. Let A be a set with n elements which are labelled a 1 , a 2 ,... , an. If B is a subset of A let f (B) be the bit string of length n which has a 1 in the ith position if ai โˆˆ B and has a 0 in the ith position if ai โˆˆ/ B. This defines a function f from the power set of A to the set Bn consisting of all bit strings of length n. That is f : P โ†’ Bn. (a) In the case where n = 8, determine each of the following:

f (โˆ…), f (A), f ({a 5 }), f ({a 8 }) and f ({a 1 , a 3 , a 8 }).

(b) In the case where n = 8, describe the subsets B for which f (B) is each of:

10101010 , 01010101 , 11110000 , and 00001111.

(c) How can the cardinality of a subset B be determined by examining its corresponding bit string f (B)?

ANSWERS:

(a) f (โˆ…) = 00000000, f (A) = 11111111, f ({a 5 }) = 00001000, f ({a 8 }) = 00000001 and f ({a 1 , a 3 , a 8 } =

(b) f ({a 1 , a 3 , a 5 , a 7 }) = 10101010, f ({a 2 , a 4 , a 6 , a 8 } = 01010101, f ({a 1 , a 2 , a 3 , a 4 } = 11110000 , and f ({a 5 , a 6 , a 7 , a 8 } = 00001111. (c) The cardinality of a subset B of A equals the number of 1โ€™s in the bit string f (B).