
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 1
This page cannot be seen from the preview
Don't miss anything!

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)?
(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).