Representing Sets in binary string?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
rclakmal
Messages
76
Reaction score
0

Homework Statement





X={4,8,12,16}
Y={2,6,10,12}
K=X U Y(union)

They asked to represent X and Y on K using binary String >i don't know how to do this please help .What is meant by Binary String ?


Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
I think they mean a string of numbers which are 0 or 1, and which indicate whether a number is in the set or not.
For example, you could represent S = {1, 2, 3, 6, 7} by
1100111
where the rightmost 1 indicates that 1 is in S, the 1 to the left of that indicates that 2 is in S, the third 1 from the right that 3 is in S, then two zeroes meaning 4 and 5 are not in S, etc.
 
ok thanks for the help ,,,,,,but what does it mean by "X and Y on K" .?