what does it mean to find a subset of a set. for example the subsets of the set {1,2,...,n}.
I am not asking for a solution but rather what a subset would be.
Thanks
what does it mean to find a subset of a set. for example the subsets of the set {1,2,...,n}.
I am not asking for a solution but rather what a subset would be.
Thanks
C++ can hurt.
Assume the set {1,2,3,4,5}
A subset of a set is a new set, with items that only exists in that set (and no multiples of them, if I remember correctly).
Example:
{1,2,3} - Valid, 1,2 & 3 is in the set.
{5,3} - Valid, same reason
{3,4,5,6} - Not valid, 6 is not part of the set.
{1,2,3,4,5} - Valid, however it is not a true subset since it is the exact same as the set.
{} - Valid? I believe the empty set is considered a subset, not sure though...
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
A subset is just a set, whose elements are also members of the superset.
ggCode:A is a subset of B, if all members of A are also in B
thanks a lot
C++ can hurt.
True subset? What is this you speak of? Is 'true subset' a common mathematically defined term? From what I remember, a set A is a subset of B iff A Union B = B, or every element in A is an element of B. From that, it's pretty easy to see that the empty set is a subset of every set.Originally posted by Magos
<snip>
{1,2,3,4,5} - Valid, however it is not a true subset since it is the exact same as the set.
{} - Valid? I believe the empty set is considered a subset, not sure though...
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
I don't know if 'true subset' is the correct mathematical term (I'm not english u know ). However, a subset is a 'true subset' if it really is a subset and not the same as the set. In any case, it is a subset, not neccessarily a true subset.Originally posted by pianorain
True subset? What is this you speak of? Is 'true subset' a common mathematically defined term? From what I remember, a set A is a subset of B iff A Union B = B, or every element in A is an element of B. From that, it's pretty easy to see that the empty set is a subset of every set.
(If some swede is out here, what is the correct translation of äkta delmängd?)
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
The terminology I grew up with is proper subset.
For example A = {1,2} B = {1,2}If A is a subset of B, and B contains any elements that are not in A, then A is a proper subset.
A is a subset of B, A is not a proper subset of B (or vica-versa).
gg
Exactly what I meant. Proper subset, thanks!Originally posted by Codeplug
The terminology I grew up with is proper subset.
For example A = {1,2} B = {1,2}
A is a subset of B, A is not a proper subset of B (or vica-versa).
gg
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.