Skip to content

Commit

Permalink
Added logical proposition / algorithm theory notes
Browse files Browse the repository at this point in the history
Terms added from ECS 122A, ECS 154A, MAT 108
  • Loading branch information
jzkyu committed Oct 4, 2023
1 parent c10fe43 commit 1d87817
Show file tree
Hide file tree
Showing 61 changed files with 210 additions and 1 deletion.
Binary file added docs/Public/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/Public/Math/Axioms/cancellation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Let $m$, $n$, and $p$ be integers. If $m\cdot n=m\cdot p$ and $m\ne 0$, then:
$$
n=p
$$
4 changes: 4 additions & 0 deletions docs/Public/Math/Axioms/reflexivity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
If $m$ is an [[integer]], then:
$$
m=m
$$
1 change: 1 addition & 0 deletions docs/Public/Math/Axioms/replacement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
If $m=n$, then $n$ can be substituted for $m$ in any statement without changing the meaning of that statement.
5 changes: 5 additions & 0 deletions docs/Public/Math/Axioms/symmetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Let $m$ and $n$ be integers. If $m=n$, then:
$$
n=m
$$

4 changes: 4 additions & 0 deletions docs/Public/Math/Axioms/transivity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Let $m$, $n$, and $p$ be integers. If $m=n$ and $n=p$, then:
$$
m=p
$$
Empty file added docs/Public/Math/Logic/and.md
Empty file.
Empty file.
5 changes: 5 additions & 0 deletions docs/Public/Math/Logic/definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
A *definition* is a statement of the meaning of a term. *Definition* is represented as:
$$
:=
$$
It can be read as: "is defined as".
Empty file.
5 changes: 5 additions & 0 deletions docs/Public/Math/Logic/existential quantification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Existential quantification* states that there at is at least one value in the [[domain]] of $x$ that will make the statement true. *Existential quantification* is represented as:
$$
\exists
$$
It can be read as: "there exists".
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions docs/Public/Math/Logic/proposition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *proposition* is a statement or assertion, that is either true or false. [^1]

[^1]: https://brilliant.org/wiki/propositional-logic/
3 changes: 3 additions & 0 deletions docs/Public/Math/Logic/propositional logic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Propositional logic* is a branch of mathematics that studies the logical relationships of [[proposition]]. [^1]

[^1]: https://brilliant.org/wiki/propositional-logic/
Empty file.
Empty file.
7 changes: 7 additions & 0 deletions docs/Public/Math/Theory/limit lemma.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*See:* [[theta notation]], [[Big-O notation]], [[omega notation]]

Given $f(n)$ and $g(n)$, non-decreasing positive functions, then for $$\lim_{x \to \infty} \frac{f(x)}{g(x)}=L$$
1. If $L=0$, then $f(n)=O(g(n))$
2. If $L=c$, then $f(n)= \theta(g(n))$ for some constant $c$
3. If $L= \infty$, then $f(n)= \Omega(g(n))$

3 changes: 3 additions & 0 deletions docs/Public/Math/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The number of unique digits, including zero, used to represent numbers. [^1]

[^1]: https://en.wikipedia.org/wiki/Radix
6 changes: 6 additions & 0 deletions docs/Public/Math/binary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Binary* is a [[numeral system]] which only uses the digits $0$ and $1$. It is [[base]] 2.

Circuits and logic in computing can be purely represented in *binary*. in general, it can be used to represent two things or states.



3 changes: 3 additions & 0 deletions docs/Public/Math/boolean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*See:* [[boolean algebra]]

*Boolean* refers to variables which can only be one of two values: true or false. *Boolean* variables are usually denoted as a $1$ or $0$ as [[binary]].
5 changes: 5 additions & 0 deletions docs/Public/Math/calculus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Calculus* is a branch of mathematics that studies change.

It deals with [[continuous]] functions and using the properties of the [[derivative]] and [[integral]].

*Calculus* is a powerful tool that can be used to model real world phenomena. It can reveal new characteristics in systems and models with respect to time.
9 changes: 9 additions & 0 deletions docs/Public/Math/continuous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
In simple terms, a function or variable is continuous if its graph can be drawn in one stroke with a pencil. [^1]

A function is discontinuous if there are breaks in the graph. If you have to lift your pencil, it means you made a very small movement but the function changed significantly. [^2]

*Continuous* deals with [[real numbers]] and [[complex numbers]]. It is associated with measuring physical phenomena which *continuously* change, such as mechanical, electrical, and hydraulic. [^3]

[^1]: https://www.zhenkaiweng.com/continuity/
[^2]: https://simple.wikipedia.org/wiki/Continuous_function#:~:text=A%20mathematical%20function%20is%20called,uninterrupted%20line%20(or%20curve).
[^3]: https://www.toppr.com/guides/physics/electronics/analog-computer-definition-and-types-of-analog-computers/#:~:text=An%20Analog%20computer%20is%20a,work%20on%20an%20analog%20signal.
Empty file added docs/Public/Math/derivative.md
Empty file.
9 changes: 9 additions & 0 deletions docs/Public/Math/discrete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*Discrete* refers to mathematical structures that are countable or otherwise distinct and separate. [^1]

In other words, *discrete* structures can only take certain values. For example, the number of students in class; you can't have half a student. [^2]

Examples include integers, graphs, and statements in logic. [^3]

[^1]: https://brilliant.org/wiki/discrete-mathematics/#:~:text=Discrete%20mathematics%20is%20the%20study,can%20be%20finite%20or%20infinite.
[^2]: https://www.mathsisfun.com/definitions/discrete-data.html
[^3]: https://en.wikipedia.org/wiki/Discrete_mathematics
3 changes: 3 additions & 0 deletions docs/Public/Math/equal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The symbol $=$ means *equal*. To say $m=n$ means that $m$ and $n$ are the same number. [^1]

[^1]: https://matthbeck.github.io/papers/aop.noprint.pdf
1 change: 1 addition & 0 deletions docs/Public/Math/hexadecimal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*Hexadecimal* is a [[numeral system]] that is [[base]] 16; it uses the following set of symbols for
2 changes: 1 addition & 1 deletion docs/Public/Math/integer.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
An *integer* is a whole number, including 0 and negative whole numbers.
An *integer* is a whole number, including 0 and negative whole numbers. The [[set]] of *integers* is denoted by $\mathbb{Z}$.
Empty file added docs/Public/Math/integral.md
Empty file.
1 change: 1 addition & 0 deletions docs/Public/Math/natural.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The *natural* numbers refers to the positive countable ([[discrete]]) numbers, sometimes including $0$. The [[set]] of *natural* numbers is denoted by $\mathbb{N}$.
12 changes: 12 additions & 0 deletions docs/Public/Math/numeral system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
A *numeral system* is a writing system for expressing numbers. Given a [[set]], a *numerical system* sets the rules for how it will be represented as numbers. [^1]

Common *numeral systems* are:
- [[binary]]
- The basis for all computing systems and operations; turning on and off circuits.
- [[octal]]
- [[decimal]]
-
- [[hexadecimal]]
- Used in assembly / machine code, often to represent memory addresses

[^1]: https://byjus.com/maths/number-system/#:~:text=What%20is%20Number%20System%20and,system%2C%20and%20hexadecimal%20number%20system.
1 change: 1 addition & 0 deletions docs/Public/Math/operand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
An *operand* is an element that can be manipulated in an [[operation]].
3 changes: 3 additions & 0 deletions docs/Public/Math/operation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
An *operation* refers to a process, usually in math. An *operation* calculates a value using an [[operand]] and [[operator]]. [^1]

[^1]: https://www.splashlearn.com/math-vocabulary/addition/operation
3 changes: 3 additions & 0 deletions docs/Public/Math/operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
An *operator* is the symbol used to carry out an [[operation]] between [[operand]]. [^1]

[^1]: https://math.stackexchange.com/questions/920699/operator-vs-operation-vs-function-vs-procedure-vs-algorithm#:~:text=One%20can%20even%20see%20books,S%2CS)%2D%3ES.
Empty file added docs/Public/Math/series.md
Empty file.
Empty file added docs/Public/Math/unary.md
Empty file.
Binary file added docs/Public/Media/big_o.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Public/Media/omega.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Public/Media/theta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Public/Media/transistor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Public/Media/transistor_connection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Public/Media/tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
3 changes: 3 additions & 0 deletions docs/Public/Software/Computer Architecture/digital.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Digital* refers to electronic technology that use [[discrete]] values, generally zero and one, to generate, store, and process [[data]]. [^1]

[^1]: https://www.techopedia.com/definition/604/digital-definition
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *short circuit* happens when both power and ground are connected.
11 changes: 11 additions & 0 deletions docs/Public/Software/Computer Architecture/transistor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
A *transistor* is an electrical switch in circuits. There are no moving parts.

MOS = Metal Oxide [[semiconductor]]
There are two types of transistors: *nMOS* and *pMOS*

![[transistor.png]]

How they work:
Current flows when there is an electrical difference i.e. positive to negative. When a positive voltage is applied to the gate, it attracts electrons from the substrate, making the top part of the substrate behave like it is negatively charged. Now that there is an electrical difference, the source and drain are connected, and current flows.

![[transistor_connection.png]]
9 changes: 9 additions & 0 deletions docs/Public/Software/Theory/Big-O notation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*Big-O notation* represents the upper bound of the running time of an [[algorithm]]. It gives the worst case complexity of an algorithm. [^1]

```
O(g(n)) = { f(n): there exist positive constants c and n0
such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0 }
```
![[big_o.png]]

[^1]: https://www.programiz.com/dsa/asymptotic-notations
5 changes: 5 additions & 0 deletions docs/Public/Software/Theory/abstraction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Abstraction* is the principle of simplifying a complex system into a basic model. By *abstracting* the details, the new model makes it easier to work with the complex system. [^1]

A car has many systems: Brakes, transmission, suspension system, battery, etc. But we don't need to understand how each of those systems work to be able to drive a car; we just need to use the interface, i.e. the steering wheel, accelerator, and brake pedal, to use the car. We are not concerned with the inner details of the car when driving. [^1]

[^1]: https://www.freecodecamp.org/news/what-is-abstraction-in-programming/
14 changes: 14 additions & 0 deletions docs/Public/Software/Theory/algorithm analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*See:* [[theta notation]], [[Big-O notation]], [[omega notation]]

*Algorithm analysis* generally refers to the "complexity analysis" of an algorithm: how the characteristics of the [[algorithm]] changes with respect to changes in parameters.

In other words, how does the input size of an algorithm affect: [^1]
- [[runtime]] (instructional steps)
- space (in memory)
- N / W (data transferred / network consumption)
- power consumption (for battery life)
- CPU registers (physical space used on the processor)

*Algorithm analysis* is useful to measure the efficiency of an algorithm, since it is machine-independent.

[^1]: https://www.youtube.com/watch?v=xGYsEqe9Vl0
5 changes: 5 additions & 0 deletions docs/Public/Software/Theory/algorithm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*See:* [[algorithm analysis]]

An *algorithm* is a procedure that takes an input and produces an output. [^1]

[^1]: https://dahlan.unimal.ac.id/files/ebooks/2009%20Introduction%20to%20Algorithms%20Third%20Ed.pdf
3 changes: 3 additions & 0 deletions docs/Public/Software/Theory/data structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *data structure* is a way to store and organize [[data]]. You can access and modify the data in a *data structure*. [^1]

[^1]: https://dahlan.unimal.ac.id/files/ebooks/2009%20Introduction%20to%20Algorithms%20Third%20Ed.pdf
6 changes: 6 additions & 0 deletions docs/Public/Software/Theory/data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Data* is distinct pieces of information, quantified or qualified by some identifier which gives it meaning. [^1] [^2]

Raw *data* is information in a pure form like characters and numbers. We process raw *data* through many methods to then produce useful *data* that gives us key insights.

[^1]: https://en.wikipedia.org/wiki/Data_(computer_science)
[^2]: https://www.geeksforgeeks.org/what-is-data/
7 changes: 7 additions & 0 deletions docs/Public/Software/Theory/graph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A *graph* is a data structure consisting of vertices and edges. [^1]

A vertex is often referred to as a [[node]].[^1]

More formally, a *graph* is composed of a [[set]] of $vertices(V)$ and a set of $edges(E)$. The graph is denoted by $G(E, V)$.[^1]

[^1]: https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/
1 change: 1 addition & 0 deletions docs/Public/Software/Theory/heap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *heap* is a
3 changes: 3 additions & 0 deletions docs/Public/Software/Theory/node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A *node* is a basic unit of a [[data structure]]. A *Node* contains data and also may link to other *nodes*.[^1]

[^1]: https://www.wikiwand.com/en/Node_(computer_science)
10 changes: 10 additions & 0 deletions docs/Public/Software/Theory/omega notation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*Omega notation* represents the lower bound of the running time of an [[algorithm]]. It is the base case complexity of an algorithm. [^1]

```
Ω(g(n)) = { f(n): there exist positive constants c and n0
such that 0 ≤ cg(n) ≤ f(n) for all n ≥ n0 }
```

![[omega.png]]

[^1]: https://www.programiz.com/dsa/asymptotic-notations
1 change: 1 addition & 0 deletions docs/Public/Software/Theory/root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A *root* is the first node in a [[tree]] [[data structure]].
11 changes: 11 additions & 0 deletions docs/Public/Software/Theory/runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*Runtime* is the period of time while a program is running on a computer.

Common algorithmic runtimes from fastest to slowest are: [^1]
- Constant: $O(1)$
- Logarithmic: $O(log n)$
- Linear: $O(n)$
- Polynomial: $O(n^2)$
- Exponential: $O(2^n)$
- Factorial: $O(n!)$

[^1]: https://www.codecademy.com/learn/cspath-asymptotic-notation/modules/cspath-asymptotic-notation/cheatsheet
10 changes: 10 additions & 0 deletions docs/Public/Software/Theory/theta notation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*Theta notation* encloses the function from above and below. Since it represents the upper and the lower bound of the running time of an [[algorithm]], it is used for analyzing the average case complexity of an algorithm. [^1]

```
Θ(g(n)) = { f(n): there exist positive constants c1, c2 and n0
such that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0 }
```

![[theta.png]]

[^1]: https://www.programiz.com/dsa/asymptotic-notations
9 changes: 9 additions & 0 deletions docs/Public/Software/Theory/tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
A *tree* is a type of [[graph]] [[data structure]] that has a hierarchical "tree" structure. A [[root]] [[node]] "branches" off to its connected children nodes, and those nodes act as a parent node to other children nodes. You can traverse through the *tree* from the root to any node in a unique path in one direction.

*Trees* can be used to store data that has an inherent hierarchical structure i.e. directories, files, and folders in file management systems. [^1]

*Trees* are easy to sort and search through using algorithms.

![[tree.png]]

[^1]: https://computersciencewiki.org/index.php/Tree

0 comments on commit 1d87817

Please sign in to comment.