mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-22 21:52:31 +03:00
Fix set theory formatting issues
This commit is contained in:
parent
ef04802863
commit
081cf637cc
@ -29,11 +29,13 @@ These operators don't require a lot of text to describe.
|
|||||||
* `Z`, the set of all integers. `{…,-2,-1,0,1,2,…}`
|
* `Z`, the set of all integers. `{…,-2,-1,0,1,2,…}`
|
||||||
* `Q`, the set of all rational numbers.
|
* `Q`, the set of all rational numbers.
|
||||||
* `R`, the set of all real numbers.
|
* `R`, the set of all real numbers.
|
||||||
|
|
||||||
### The empty set
|
### The empty set
|
||||||
* The set containing no items is called the empty set. Representation: `∅`
|
* The set containing no items is called the empty set. Representation: `∅`
|
||||||
* The empty set can be described as `∅ = {x|x ≠ x}`
|
* The empty set can be described as `∅ = {x|x ≠ x}`
|
||||||
* The empty set is always unique.
|
* The empty set is always unique.
|
||||||
* The empty set is the subset of all sets.
|
* The empty set is the subset of all sets.
|
||||||
|
|
||||||
```
|
```
|
||||||
A = {x|x∈N,x < 0}
|
A = {x|x∈N,x < 0}
|
||||||
A = ∅
|
A = ∅
|
||||||
@ -42,6 +44,7 @@ A = ∅
|
|||||||
|∅| = 0
|
|∅| = 0
|
||||||
|{∅}| = 1
|
|{∅}| = 1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Representing sets
|
## Representing sets
|
||||||
### Enumeration
|
### Enumeration
|
||||||
* List all items of the set, e.g. `A = {a,b,c,d}`
|
* List all items of the set, e.g. `A = {a,b,c,d}`
|
||||||
@ -49,6 +52,7 @@ A = ∅
|
|||||||
|
|
||||||
### Description
|
### Description
|
||||||
* Describes the features of all items in the set. Syntax: `{body|condtion}`
|
* Describes the features of all items in the set. Syntax: `{body|condtion}`
|
||||||
|
|
||||||
```
|
```
|
||||||
A = {x|x is a vowel}
|
A = {x|x is a vowel}
|
||||||
B = {x|x ∈ N, x < 10l}
|
B = {x|x ∈ N, x < 10l}
|
||||||
@ -84,6 +88,7 @@ C = {2x|x ∈ N}
|
|||||||
* The number of items in a set is called the base number of that set. Representation: `|A|`
|
* The number of items in a set is called the base number of that set. Representation: `|A|`
|
||||||
* If the base number of the set is finite, this set is a finite set.
|
* If the base number of the set is finite, this set is a finite set.
|
||||||
* If the base number of the set is infinite, this set is an infinite set.
|
* If the base number of the set is infinite, this set is an infinite set.
|
||||||
|
|
||||||
```
|
```
|
||||||
A = {A,B,C}
|
A = {A,B,C}
|
||||||
|A| = 3
|
|A| = 3
|
||||||
@ -94,6 +99,7 @@ B = {a,{b,c}}
|
|||||||
|
|
||||||
### Powerset
|
### Powerset
|
||||||
* Let `A` be any set. The set that contains all possible subsets of `A` is called a powerset (written as `P(A)`).
|
* Let `A` be any set. The set that contains all possible subsets of `A` is called a powerset (written as `P(A)`).
|
||||||
|
|
||||||
```
|
```
|
||||||
P(A) = {x|x ⊆ A}
|
P(A) = {x|x ⊆ A}
|
||||||
|
|
||||||
@ -103,41 +109,54 @@ P(A) = {x|x ⊆ A}
|
|||||||
## Set operations among two sets
|
## Set operations among two sets
|
||||||
### Union
|
### Union
|
||||||
Given two sets `A` and `B`, the union of the two sets are the items that appear in either `A` or `B`, written as `A ∪ B`.
|
Given two sets `A` and `B`, the union of the two sets are the items that appear in either `A` or `B`, written as `A ∪ B`.
|
||||||
|
|
||||||
```
|
```
|
||||||
A ∪ B = {x|x∈A∨x∈B}
|
A ∪ B = {x|x∈A∨x∈B}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intersection
|
### Intersection
|
||||||
Given two sets `A` and `B`, the intersection of the two sets are the items that appear in both `A` and `B`, written as `A ∩ B`.
|
Given two sets `A` and `B`, the intersection of the two sets are the items that appear in both `A` and `B`, written as `A ∩ B`.
|
||||||
|
|
||||||
```
|
```
|
||||||
A ∩ B = {x|x∈A,x∈B}
|
A ∩ B = {x|x∈A,x∈B}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Difference
|
### Difference
|
||||||
Given two sets `A` and `B`, the set difference of `A` with `B` is every item in `A` that does not belong to `B`.
|
Given two sets `A` and `B`, the set difference of `A` with `B` is every item in `A` that does not belong to `B`.
|
||||||
|
|
||||||
```
|
```
|
||||||
A \ B = {x|x∈A,x∉B}
|
A \ B = {x|x∈A,x∉B}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Symmetrical difference
|
### Symmetrical difference
|
||||||
Given two sets `A` and `B`, the symmetrical difference is all items among `A` and `B` that doesn't appear in their intersections.
|
Given two sets `A` and `B`, the symmetrical difference is all items among `A` and `B` that doesn't appear in their intersections.
|
||||||
|
|
||||||
```
|
```
|
||||||
A △ B = {x|(x∈A∧x∉B)∨(x∈B∧x∉A)}
|
A △ B = {x|(x∈A∧x∉B)∨(x∈B∧x∉A)}
|
||||||
|
|
||||||
A △ B = (A \ B) ∪ (B \ A)
|
A △ B = (A \ B) ∪ (B \ A)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Cartesian product
|
### Cartesian product
|
||||||
Given two sets `A` and `B`, the cartesian product between `A` and `B` consists of a set containing all combinations of items of `A` and `B`.
|
Given two sets `A` and `B`, the cartesian product between `A` and `B` consists of a set containing all combinations of items of `A` and `B`.
|
||||||
|
|
||||||
```
|
```
|
||||||
A × B = { {x, y} | x ∈ A, y ∈ B }
|
A × B = { {x, y} | x ∈ A, y ∈ B }
|
||||||
```
|
```
|
||||||
|
|
||||||
## "Generalized" operations
|
## "Generalized" operations
|
||||||
### General union
|
### General union
|
||||||
Better known as "flattening" of a set of sets.
|
Better known as "flattening" of a set of sets.
|
||||||
|
|
||||||
```
|
```
|
||||||
∪A = {x|X∈A,x∈X}
|
∪A = {x|X∈A,x∈X}
|
||||||
∪A={a,b,c,d,e,f}
|
∪A={a,b,c,d,e,f}
|
||||||
∪B={a}
|
∪B={a}
|
||||||
∪C=a∪{c,d}
|
∪C=a∪{c,d}
|
||||||
```
|
```
|
||||||
|
|
||||||
### General intersection
|
### General intersection
|
||||||
|
|
||||||
```
|
```
|
||||||
∩ A = A1 ∩ A2 ∩ … ∩ An
|
∩ A = A1 ∩ A2 ∩ … ∩ An
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user