2024-01-24 13:09:26
This commit is contained in:
parent
7ff2413ac6
commit
7e9594f96b
12
.obsidian/workspace.json
vendored
12
.obsidian/workspace.json
vendored
@ -13,7 +13,7 @@
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "UNB/Year 4/Semester 2/CS3873/2024-01-24.md",
|
||||
"file": "UNB/Year 4/Semester 2/CS2333/2024-01-24.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
}
|
||||
@ -85,7 +85,7 @@
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "UNB/Year 4/Semester 2/CS3873/2024-01-24.md",
|
||||
"file": "UNB/Year 4/Semester 2/CS2333/2024-01-24.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
@ -102,7 +102,7 @@
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "UNB/Year 4/Semester 2/CS3873/2024-01-24.md",
|
||||
"file": "UNB/Year 4/Semester 2/CS2333/2024-01-24.md",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
}
|
||||
@ -125,7 +125,7 @@
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "UNB/Year 4/Semester 2/CS3873/2024-01-24.md"
|
||||
"file": "UNB/Year 4/Semester 2/CS2333/2024-01-24.md"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -158,8 +158,9 @@
|
||||
},
|
||||
"active": "81e5aff710e811bc",
|
||||
"lastOpenFiles": [
|
||||
"UNB/Year 4/Semester 2/CS3873/2024-01-22.md",
|
||||
"UNB/Year 4/Semester 2/CS3873/2024-01-24.md",
|
||||
"UNB/Year 4/Semester 2/CS2333/2024-01-24.md",
|
||||
"UNB/Year 4/Semester 2/CS3873/2024-01-22.md",
|
||||
"UNB/Year 4/Semester 2/STAT2593/2024-01-24.md",
|
||||
"UNB/Year 4/Semester 2/CS2333/2024-01-22.md",
|
||||
"UNB/Year 4/Semester 2/CS2333/2024-01-19.md",
|
||||
@ -190,7 +191,6 @@
|
||||
"Semester 1/CS3418/11-15-2023.md",
|
||||
"Semester 1/CS3418/11-13-2023.md",
|
||||
"Semester 1/CS3418/11-1-2023.md",
|
||||
"Semester 1/CS2418/10-27-2023.md",
|
||||
"Semester 1/CS2418",
|
||||
"Semester 1/CS3418"
|
||||
]
|
||||
|
49
UNB/Year 4/Semester 2/CS2333/2024-01-24.md
Normal file
49
UNB/Year 4/Semester 2/CS2333/2024-01-24.md
Normal file
@ -0,0 +1,49 @@
|
||||
Lecture Topic:
|
||||
|
||||
# Equivalence Classes
|
||||
You can represent equivalence classes by writing each one as a set:
|
||||
$$C_0 = \{..., -10, -5, 0, 5, 10, 15, ...\} \text{ or } \{5p | p \in \mathbb{Z}\}$$
|
||||
$$C_0 = \{..., -9, -4, 1, 6, 11, 16, ...\} \text{ or } \{5p + 1| p \in \mathbb{Z}\}$$
|
||||
$$\text{and so on...}$$
|
||||
# Graphs
|
||||
Definitions:
|
||||
- For each *vertex* v, the **degree** of v is the number of edges incident on v
|
||||
- A *path* is a **sequence** of vertices connected by edges
|
||||
- A *cycle* is a path that **starts and ends** at the same vertex
|
||||
- A *simple path* is a path that has **no repeated** vertices
|
||||
- A *connected graph* contains a path between **every pair** of vertices
|
||||
- A *disconnected graph* is the opposite (look at slides for real def)
|
||||
|
||||
# Regular Languages
|
||||
A class of languages that can be processed by simple computers called **finite automata**
|
||||
|
||||
## Simple Example of a finite automaton
|
||||
Vending machine/toll booth gate
|
||||
Requires 25 cents or more to be deposited (gives no change)
|
||||
|
||||
Takes as input, 5 cent, 10 cent, 25 cent coins
|
||||
Uses **states** to remember how much has been deposited so far
|
||||
|
||||
States:
|
||||
- q_0 : 0 cents deposited (START STATE)
|
||||
- q_5 : 5 cents
|
||||
- q_10 : 10 cents
|
||||
- q_15 : 15 cents
|
||||
- q_20 : 20 cents
|
||||
- q_25 : 25 cents (ACCEPT STATE)
|
||||
|
||||
We represent the input as a **string** of symbols.
|
||||
- n = nickel
|
||||
- d = dime
|
||||
- q = quarter
|
||||
Examples:
|
||||
- ddn
|
||||
- ndd
|
||||
- dnd
|
||||
- q
|
||||
Not accepted examples:
|
||||
- nd
|
||||
- d
|
||||
- $\epsilon$
|
||||
## State Diagram
|
||||
(not really possible without an image in obsidian)
|
Loading…
Reference in New Issue
Block a user