/bitstrings-subsets

Given a set and bitstring, the program will find the subset specified by the bitstring

Primary LanguagePython

bitstring-sets

This Repository is focused on bitstrings and sets

Finding subset from bitstring (Bitstring-Subset.py):

Given a set and bitstring, the program will find the subset specified by the bitstring

Example: Consider the set U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

Using the set U as above, find the subset specified by each of the following bit strings:

  1. 1111001111 = Subset = {1, 2, 3, 4, 7, 8, 9, 10}
  2. 0101111000 = Subset = {2, 4, 5, 6, 7}
  3. 1000000001 = Subset = {1, 10}

NOTE: There is no exception handling in the program.

Find difference between two bitstrings (Bitstring-Difference.py)

Write an algorithm that, given a finite set S = {s1, . . . , sn}, calculates bX\Y where X ⊆ S and Y ⊆ S. Assume that bX and bY are given.