Last Sync: 2022-08-21 11:00:04
This commit is contained in:
parent
73948429aa
commit
f9d9c6aee6
77 changed files with 103 additions and 100 deletions
|
@ -1,5 +1,8 @@
|
|||
---
|
||||
tags: [data-structures]
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
- data-structures
|
||||
---
|
||||
|
||||
# Arrays
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
- Data Structures
|
||||
- patterns
|
||||
- oop
|
||||
- OOP
|
||||
---
|
||||
|
||||
# Factory pattern
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
categories:
|
||||
- DSA
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Frequency counters
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
- oop
|
||||
categories:
|
||||
- DSA
|
||||
tags: [OOP]
|
||||
---
|
||||
|
||||
# Module pattern
|
||||
|
||||
> Come back and compare this with learning from Node.js
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
categories:
|
||||
- DSA
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Multiple pointers
|
||||
|
||||
The multiple pointers pattern can be useful for moving through an array and comparing elements against each other in a time-efficient manner and without costly multiple loops.
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
- oop
|
||||
categories:
|
||||
- DSA
|
||||
tags: [OOP]
|
||||
---
|
||||
|
||||
# Observer pattern
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
- oop
|
||||
categories:
|
||||
- DSA
|
||||
tags: [OOP]
|
||||
---
|
||||
|
||||
# Singleton pattern
|
||||
|
||||
As the name suggests, the Singleton pattern is best used in scenarios where you only want to use a single, unique instance of a class. This is for functionality that should only be executed once in the lifecycle of an application. The canonical case would be some kind of bootstrapping process required at initialisation, or initial configuration for an app.
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
---
|
||||
tags:
|
||||
- Data_Structures
|
||||
- patterns
|
||||
categories:
|
||||
- DSA
|
||||
tags: []
|
||||
---
|
||||
|
||||
# Sliding window
|
||||
|
||||
Whereas the [multiple pointer](Multiple_pointers.md) pattern works by keeping two array indices running at once and comparing their values on each iteration, the sliding window
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
tags: [data-structures]
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
- data-structures
|
||||
---
|
||||
|
||||
# Queues
|
||||
|
||||
_Visualization of the queue data structure_
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
---
|
||||
tags: [algorithms, recursion]
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
- algorithms
|
||||
- recursion
|
||||
---
|
||||
|
||||
> A recursive function is a function that calls itself in its definition.
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
tags: [data-structures]
|
||||
categories:
|
||||
- DSA
|
||||
tags:
|
||||
---
|
||||
|
||||
_A stack visualised vertically_
|
||||

|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
tags: [relational_databases]
|
||||
tags: [relational-databases]
|
||||
---
|
||||
|
||||
# Primary key
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
tags: [relational_databases]
|
||||
tags: [relational-databases]
|
||||
---
|
||||
|
||||
# Relational database architecture
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Databases
|
||||
- Programming_Languages
|
||||
- Programming Languages
|
||||
tags: [SQL]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Mathematics
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [binary]
|
||||
---
|
||||
# Binary arithmetic
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
tags: [binary]
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Mathematics
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [binary]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Mathematics
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [binary]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Hardware
|
||||
tags: [motherboard]
|
||||
---
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [CPU]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [CPU]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [CPU]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [CPU, processors]
|
||||
|
||||
---
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Hardware
|
||||
tags: [motherboard, chipset]
|
||||
---
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Electronics
|
||||
- Hardware
|
||||
tags: [logic-gates, binary]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Hardware
|
||||
tags: [memory, motherboard]
|
||||
---
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
tags: [memory]
|
||||
---
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
categories:
|
||||
- Computer_Architecture
|
||||
- Computer Architecture
|
||||
- Hardware
|
||||
tags: [motherboard]
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
Sentences or propositions (we will use 'sentences' for consistency) are expressions **that have truth values**, either true or false.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
Give that the biconditional means that if $P$ is the case, $Q$ is the case and if $Q$ is the case, $P$ must be the case, if we have $P \equiv Q$ and $P$, we can derive $Q$ and vice versa.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
The biconditional means if $P$ is the case, $Q$ is the case and if $Q$ is the case, $P$ must be the case. Thus to introduce this operator we must demonstrate both that $Q$ follows from $P$ and that $P$ follows from $Q$. We do this via two sub-proofs.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
If we have a conditional and we have independently derived its antecedent, we may invoke its consequent. This is often referred to as *Modus ponens* (affirming the antecedent).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
If we can show that $Q$ follows from $P$ (typically via a subproof) than we can assert that P implies Q. This is also sometimes known as _Conditional Proof_
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
If two conjuncts have each been independently derived then they can be conjoined. Also known more simply as *Conjunction*
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Informal definition
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Corresponding material conditional to show validity
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
DeMorgan's laws express some fundamental equivalences that obtain between the Boolean [connectives](Truth-functional%20connectives.md):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
This rule is sometimes also referred to as *Constructive Dilemma*. This can be a bit tricky to understand because the goal is to derive or *introduce* a new proposition separate from the disjunction you start out with. This may be disjunction, a single proposition or a proposition containing any other logical connective. You do this by constructing two sub-proofs, one for each of the disjuncts comprising the disjunction you start out with. If you can derive your target proposition as the conclusion of each subproof then you may invoke the conclusion in the main proof and take it to be derived.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
This rule can seem a little odd: like we are randomly introducing an additional proposition without giving any justification. However this is just a consequence of the fact if $P$ is true, so is $P \lor Q$ since disjunction is not the same as conjunction: only one disjunct needs to be true for the compound disjunction to be true. This is represented in the context of [truth-trees](Truth-trees.md#disjunction-decomposition) by the fact that truth can pass up via either branch of a disjunction pattern.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
When we construct a formal proof in logic we are seeking to show that a certain proposition is **derivable** from other propositions. We use the words *derivation* and *proof* interchangeably.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
The vast majority of sentences in natural and formal logical languages are neither [ logically true](Logical%20truth%20and%20falsity.md#logical-truth) or [\| logically false](Logical%20truth%20and%20falsity.md#logical-falsity). This makes sense because sentences of this form are all either tautologies or contradictions and as such do not express information about the state of events in the world. We call sentences that are neither logically true or logically false, logically indeterminate sentences.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Logical possibility
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
We say of certain sentences that they are logically true or logically false.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||

|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
This is also known as *proof by contradiction*. You start with an assumption declared in a subproof. If you can derive a contradiction from this assumption (typically from the introduction of another proposition and its negation), then you are permitted to derive the negation of the auxiliary assumption in the main proof.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
**Reiteration (R)** allows us to restate any proposition already in the proof within the main proof or a more deeply nested subproof. Reiteration allows us to reuse any assumptions, or propositions derived from assumptions, without having to introduce a new dependency with another assumption.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
### Soundness
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
## General strategy
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
In order to make assertions about the relative [consistency](Consistency.md) or inconsistency of a set of propositions we advance arguments. Consider everyday life: if we are having an argument with someone, we believe that they are wrong. A more logical way to say this is that we believe that their beliefs are inconsistent. In order to change their viewpoint or point out why they are wrong we advance an argument intended to show that belief A conflicts with belief B. Or if C is true, then you cannot believe that D.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Syntax of formal languages versus semantics
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
We know that when we construct a [derivation](Formal%20proofs%20in%20propositional%20logic.md#constructing-proofs) we start from a set of assumptions and then attempt to reach a proposition that is a consequence of the starting assumptions. However it does not always have to be the case that the starting set contains members. The set can in fact be empty.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Truth-functional connectives
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
|
||||
# Truth-tables
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Rationale
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
categories:
|
||||
- Logic
|
||||
tags: [propositional_logic]
|
||||
tags: [propositional-logic]
|
||||
---
|
||||
## Validity
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue