Skip to content

Commit

Permalink
functions
Browse files Browse the repository at this point in the history
  • Loading branch information
avipars authored Mar 20, 2024
1 parent 123ca7a commit 1899011
Showing 1 changed file with 49 additions and 12 deletions.
61 changes: 49 additions & 12 deletions math/discrete/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: page
title: Discrete Math
permalink: /math/discrete/
description: Discrete Math course and tips
date: '2024-3-19'
date: '2024-3-20'
categories: Discrete
tags:
- Discrete
Expand Down Expand Up @@ -41,7 +41,6 @@ tags:

* A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)


- Subsets:

* A ⊆ A ∪ B = B ∪ A
Expand Down Expand Up @@ -78,7 +77,7 @@ tags:

* A ∈ P(A), ∅ ∈ P(A)

* `If |A| = n, then |P(A)|` = <sup>n</sup>
* `If |A| = n, then |P(A)|` = 2<sup>n</sup>

* `|P(A)|` = 2<sup>|A|</sup>

Expand Down Expand Up @@ -143,25 +142,63 @@ tags:
- Important relations:

1. **Reflexive:**
- Shorthand: \( R \subseteq \{(a, a) \mid a \in A\} \)
- Shorthand: \( R \{(a, a) \| a A\} \)
- Meaning: Every element is related to itself. Ia ⊆ R
- for all a ∈ A, aRa holds

2. **Transitive:**
- Shorthand: \( R \circ R \subseteq R \)
- Meaning: If \( (a, b) \in R \) and \( (b, c) \in R \), then \( (a, c) \in R \).
- Shorthand: \( R ∘ R ⊆ R \)
- Meaning: If \( (a, b) ∈ R \) and \( (b, c) ∈ R \), then \( (a, c) ∈ R \).
- (aRb and bRc) -> aRc

3. **Symmetric:**
- Shorthand: \( R = R^{-1} \)
- Meaning: If \( (a, b) \in R \), then \( (b, a) \in R \).
- Shorthand: \( R = R⁻¹ \)
- Meaning: If \( (a, b) ∈ R \), then \( (b, a) ∈ R \).
- When aRb <=> bRa

4. **Antisymmetric:**
- Shorthand: \( R \cap R^{-1} \subseteq \{(a, a) \mid a \in A\} \)
- Meaning: If \( (a, b) \in R \) and \( (b, a) \in R \), then \( a = b \).
- Shorthand: \( R ∩ R⁻¹ ⊆ \{(a, a) \| a ∈ A\} \)
- Meaning: If \( (a, b) ∈ R \) and \( (b, a) ∈ R \), then \( a = b \).
- (aRb and bRa) -> (a = b)
- This does not mean not-symmetric

- Equivalence relation is one where 1,2,3 all hold
- Equivalence relation

- is one where 1,2,3 all hold

- Order relation

- Partial order IFF 1,2,4 all hold
* clear hasse diagram can be drawn
- items for which the relation doesn't hold will be drawn but not connected to the others in the diagram

- Total/Linear order:
* Partial order holds
* Totality: For any \( a, b ∈ A \), either \( (a, b) ∈ R \) or \( (b, a) ∈ R \).
- In other words: For any two distinct elements a and b, either a is related to b (a ≤ b), or b is related to a (b ≤ a).
* hasse diagram would be a straight line (all elements relate to one another in this set)

- Terms:
* Minimal: An element a is minimal if there is no b such that b precedes a.
- Elements with nothing less than them (no predacessors)
* Minimum: An element a is a minimum if for all b, a precedes b.
- Element that is less than everything else (either a set has 1 minimum or no minimum element)
* Maximal: An element a is maximal if there is no b such that a precedes b.
- follows from minimal
* Maximum: An element a is a maximum if for all b, b precedes a.
- follows from minimum

#### Functions

| Let f,g be two functions, (f:A -> B) , (g:B -> A) | | | | | | |
| ------------------------------------------------- | ----------------------- | ------------- | ---------------- | ---------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| Function f | Horizontal line test | Clasification | Invertibility | G is \ \_ inverse of f | Definition | |
| Onto | Hits at least 1 point | Surjective | Right invertible | f ∘ g = Ib | {f(a) | a ∈ A} = B every element in range (B) has a source | A function that maps one or more elements of A to the same element of B |
| One to One | Hits at most 1 point | Injective | Left Invertible | g ∘ f = Ia | if a1 != a2 then f(a1) != f(a2) or contrapositive if f(a1) = f(a2) then a1 = a2 | A function that always maps the distinct element of its domain to the distinct element of its codomain |
| Onto and One to One | Hits exactly at 1 point | Bijective | Invertible | g ∘ f = Ia, f ∘ g = Ib | f⁻¹ = g | A function that is both injective and surjective |
| Identity Ia | Hits exactly at 1 point | Bijective | Invertible | f ∘ Ia = f = Ib ∘ f | f(a) = a |


- Order relation is one where 1,2,4 all hold

#### Links

Expand Down

0 comments on commit 1899011

Please sign in to comment.