write all sub sets of a set (234)
Answers
Step-by-step explanation:
Example: the set {1, 2, 3, 4, 5}
A subset of this is {1, 2, 3}. Another subset is {3, 4} or even another is {1}, etc. But {1, 6} is not a subset, since it has an element (6) which is not in the parent set.
Step-by-step explanation:
These subsets can contain 0, 1, 2, 3, or 4 elements each.
For 0 elements, you have all combinations of 4 elements taken 0 at a time. This is just the empty set.
{}
For 1-element subsets, you have all combinations of 4 elements taken 0 at a time.
{1},{2}.{3},{4}
For 2-element subsets, you have all combinations of 4 elements taken 2 at a time.
{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}
For 3-element subsets, you have all combinations of 4 elements taken 3 at a time.
{1,2,3},{1,2,4},{1,3,4},{2,3,4}
For 4-element subsets, you have all combinations of 4 elements taken 4 at a time.
{1,2,3,4}
This gives you a total of 16 subsets in a set of 4 elements.
Perhaps you noticed a pattern? Lets say your set is size N (in your example, N=4 ). For each k-element subset, you have (Nk) number of subsets. To get all subsets, you sum them from k=0toN . So the number of subsets is:
Nsubsets=∑k=0k=N(Nk)=2N