Difference between revisions of "W1525 Containment"

From Coder Merlin
Line 88: Line 88:
|}
|}
<br clear='all' />
<br clear='all' />
=== Sets in Swift ===


== Experiment ==
== Experiment ==

Revision as of 18:17, 24 January 2021

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Nuclear containment

Prerequisites[edit]

Research[edit]

Background[edit]

Set Basics[edit]

By the 1930's, through the work of Godel, Church, Turing and others, it was realized that Set Theory relied on an even more basic concept, that of computability. Computer Science continues to be inspired by Set Theory and understanding Set Theory should facilitate your ability to think abstractly. It is, by its nature, independent of yet critical for programming.

A set is an unordered collection of objects. The objects are referred to as elements or members of the set.

Symbols Definition
The empty set
Another way of symbolizing the empty set
The set containing the elements
is a member of the set
is NOT a member of the set
The set of natural numbers
0 The set of natural numbers with zero
The set of integers (negative, zero, and positive)
The set of real numbers
The set X is a subset of the set Y
The set X is NOT a subset of the set Y

A set is termed a subset of set iff every element of is an element of . Formally:

Two sets and are equal iff every element of is an element of and vice versa. Formally:

Boolean Algebra of Sets[edit]

Assume set . The following operations are defined:

Symbols Name Definition
Union
Intersection
Complement


Set Union[edit]

The union of two sets and , both subsets of the set , i.e.


Set Intersection[edit]

The intersection of sets and , both subsets of the set , i.e.


Set Complement[edit]

Consider the set , a subset of the set
Then is the compliment of


Sets in Swift[edit]

Experiment[edit]

Getting Started[edit]

Continue from the previous project; we'll be editing all of our files there. Enter into the Sources directory of the project.

john-williams@codermerlin: cd ~/Experiences/W1521/Sources/ScenesShell/

Key Concepts[edit]

Exercises[edit]

References[edit]