Skip to content

Commit

Permalink
Sets, FSM
Browse files Browse the repository at this point in the history
- Sets, set relation terms
- State machines, computer architecture terms
  • Loading branch information
jzkyu committed Nov 14, 2023
1 parent 42b1b7e commit c08c4a5
Show file tree
Hide file tree
Showing 24 changed files with 98 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/Public/Math/Sets/cartesian product.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Let $A$ and $B$ be some [[set]]. The set of all ordered pairs $(a, b)$ such that $a\in A$ and $b \in B$ is called the *cartesian product*.
$$
A\times B = \{(a, b)| a\in A, b\in B\}
$$
Example:
Let $A = \{m, p\}$, $B = \{5, 7, 9\}$. Then,
$$
A\times B = \{(m, 5), (m, 7), (m, 9), (p, 5), (p, 7), (p, 9)\}
$$
1 change: 1 addition & 0 deletions docs/Public/Math/Sets/empty set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The *empty set* is the [[set]] with no elements. There is no such $x\in \emptyset$.
6 changes: 6 additions & 0 deletions docs/Public/Math/Sets/intersection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The *intersection* of two sets contains only the elements contained in both [[set]].

The *intersection* of $A$ and $B$ is:
$$
A \cup B = \{ x | x\in A \land x\in B\}
$$
6 changes: 6 additions & 0 deletions docs/Public/Math/Sets/power set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
If $A$ is a set, then the *power set* of $A$ is the set whose elements are the [[subset]] of A, and it is denoted by $P(A)$.
$$
P(A) = \{ B | B \in A \}
$$


4 changes: 4 additions & 0 deletions docs/Public/Math/Sets/rational.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
A *rational* is a number that can be expressed as the fraction of two [[integer]], as in
$$
\frac{p}{q}
$$
3 changes: 3 additions & 0 deletions docs/Public/Math/Sets/relation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *relation* $\mathbb{R}$ from $A$ to $B$ is a [[subset]] of $A\times B$.

A *relation* $\mathbb{R}$ from $A$ to $A$ is also called a *relation* on $A$.
4 changes: 4 additions & 0 deletions docs/Public/Math/Sets/set difference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The *set difference* of $A$ and $B$ is:
$$
A - B = \{ x | x\in A \land x\not \in B \}
$$
4 changes: 4 additions & 0 deletions docs/Public/Math/Sets/set equality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$A$ and $B$ have *set equality*, $A=B$ if:
$$
A\subseteq B \text{ and } B\subseteq A
$$
10 changes: 10 additions & 0 deletions docs/Public/Math/Sets/subset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
A *subset* is a [[set]] which all the elements are contained in another set.

$A$ is a *subset* of $B$ means:
$$
\text{If }x\in A, \text{ then } x\in B
$$
We write:
$$
a\subseteq B
$$
1 change: 1 addition & 0 deletions docs/Public/Math/Sets/tuple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *tuple* is an ordered [[set]] with $n$ elements.
6 changes: 6 additions & 0 deletions docs/Public/Math/Sets/union.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The *union* of two sets contains all the elements contained in either [[set]].

The *union* of $A$ and $B$ is:
$$
A \cup B = \{ x | x\in A \lor x\in B\}
$$
3 changes: 3 additions & 0 deletions docs/Public/Software/Computer Architecture/D latch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *D latch* is type of [[latch]] that has one input: Data ($D$). The output of the *D latch* is the same as the $D$ input as long as the [[clock]] signal is high. [^1]

[^1]: https://www.geeksforgeeks.org/latches-in-digital-logic/#
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
A *Mealy state machine* is a [[finite state machine]] whose current outputs are dependent on the current and previous state. [^1]

In other words, the output is built on the edges.
[^1]: https://www.geeksforgeeks.org/mealy-and-moore-machines-in-toc/#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
A *Moore state machine* is a [[finite state machine]] whose current outputs are dependent only on the current state. [^1]

In other words, the output will be 'inside' the state.

[^1]: https://www.geeksforgeeks.org/mealy-and-moore-machines-in-toc/#
3 changes: 3 additions & 0 deletions docs/Public/Software/Computer Architecture/SR latch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *SR latch* is a type of [[latch]] which has two inputs: set ($S$) and reset ($R$). The $S$ input sets the output to $1$, while the $R$ input sets the output to $0$. [^1]

[^1]: https://www.geeksforgeeks.org/latches-in-digital-logic/#
Empty file.
1 change: 1 addition & 0 deletions docs/Public/Software/Computer Architecture/cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *cache* is a temporary [[data]] store that holds data so future requests for that data can be serve faster.
3 changes: 3 additions & 0 deletions docs/Public/Software/Computer Architecture/clock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The system *clock* is used as an input to the [[sequential circuit]], alternating between $1$ and $0$ at regular intervals (in a *clock* cycle), to control when the state of a circuit changes. [^1]

[^1]: https://courses.cs.vt.edu/~cs1104/SystemsOrg/COrgn_9.htm#:~:text=All%20the%20circuits%20in%20the,state%20of%20a%20circuit%20changes.
1 change: 1 addition & 0 deletions docs/Public/Software/Computer Architecture/comparator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *comparator* takes in two binary inputs, and checks to see if the bits of each input are the same value at each position.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A *finite state machine* is a model that describes systems with a finite number of states and transitions to represent their behavior and logic. [^1]

There are different kinds of *finite state machines*:
- [[Moore state machine]]
- [[Mealy state machine]]

[^1]: https://www.spiceworks.com/tech/tech-general/articles/what-is-fsm/
1 change: 1 addition & 0 deletions docs/Public/Software/Computer Architecture/flip flop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *flip flop* is a [[latch]] that is controlled by a [[clock]].
8 changes: 8 additions & 0 deletions docs/Public/Software/Computer Architecture/latch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
A *latch* is a digital circuit that stores a single bit of information and holds its value until it is update by new input signals. [^1]

There are several types of latches, including:
- [[SR latch]]
- [[D latch]]
-

[^1]: https://www.geeksforgeeks.org/latches-in-digital-logic/#
5 changes: 5 additions & 0 deletions docs/Public/Software/Theory/dynamic programming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Dynamic programming* is optimization over [[recursion]]. Whenever we see a recursive solution that has repeated calls for the same inputs, we can optimize it using *dynamic programming*. [^1]

The idea is to store the results of the sub-problems, so we don't have to recompute them.

[^1]: https://www.geeksforgeeks.org/dynamic-programming/#
3 changes: 3 additions & 0 deletions docs/Public/Software/Theory/memoization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Memoization* is an optimization technique that stores computation results in [[cache]], and retrieving that information from the cache the next time it's needed instead of computing it again. [^1]

[^1]: https://www.freecodecamp.org/news/memoization-in-javascript-and-react/

0 comments on commit c08c4a5

Please sign in to comment.