Concept
How do sets differ from arrays and linked lists in order and duplication?
Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk / Chapter 1
"If you’ve done some computer programming, you might see a resemblance between sets and the collections of items often used in a program: arrays, perhaps, or linked lists. To be sure, there are some similarities. But there are also some very important differences, which must not be overlooked: No order. As previously mentioned, there is no order to the members of a set. “{Dad, Mom}” is the same set as “{Mom, Dad}”. In a computer program, of course, most arrays or lists have first, second, and last elements, and an index number assigned to each. No duplicates. Suppose M is the set of all males. What would it possibly mean to say M = {Dad, Dad, T.J. }? Would that mean that “Dad is twice the man that T.J. is”? This is obviously nonsensical. The set M is based on a property: maleness. Each element of Ω is either male, or it isn’t. It can’t be “male six times.” Again, in an array or linked list, you could certainly have more than one copy of the same item in different positions."
Related Ideas
- How are sets written, and what are empty and domain sets?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Why is a set an abstract concept rather than an explicit list?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Does a set have a first element?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Are sets with Smith and Will in different orders the same?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Why are ordered pairs different from sets?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- What is a combination, and how is it different from a permutation?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- What is a set, and how does it identify its members?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- How do membership symbols and fuzzy sets change the idea of belonging?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1