• Advertisement

Archived

This topic is now archived and is closed to further replies.

Help with set definition question please.

This topic is 5849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am a little confused over a question my tutor gave me: c = {z^2:z e Z and -4<=z<=4} I have to list all the members of the set c and this is what I get: c = {16,9,4,1,0,1,4,9,16} but in my other maths class I was specifically told that numbers can not be repeated in the set (so c={0,1,4,9,16} but in this course I can find no mention this. So does anyone know which it would be, does it actually matter. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
If you generating function produces duplicates, just ignore them as they are identifiable (i.e. "made one" ) with their brothers who are already in the set.

This is what the "no duplicates" means for a set.

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...

Share this post


Link to post
Share on other sites
A set can contains n>=0 elements. An element can belong only once to a set (as Fruny said ). You can define a set by conditions or values.

Thus :
c={z^2:z e Z and -4<=z<=4}
c={0,1,4,9,16} -> set of values that satisfy conditions

Share this post


Link to post
Share on other sites

  • Advertisement