From 53a939f4d68057d4ee7586c08dcc834e8eb66141 Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Thu, 7 Apr 2022 11:52:38 +1200 Subject: [PATCH] auto update --- content/notes/aymptotic-notation.md | 4 ++-- content/notes/big-theta-notation.md | 18 ------------------ content/notes/cosc-201-outline.md | 4 +--- content/notes/cosc-202-outline.md | 7 +++++++ content/notes/cosc-202.md | 4 ++-- content/notes/induction.md | 2 +- content/templates/induction-proof-template.md | 7 +++++++ 7 files changed, 20 insertions(+), 26 deletions(-) delete mode 100644 content/notes/big-theta-notation.md create mode 100644 content/templates/induction-proof-template.md diff --git a/content/notes/aymptotic-notation.md b/content/notes/aymptotic-notation.md index 53374dd16..30774dd47 100644 --- a/content/notes/aymptotic-notation.md +++ b/content/notes/aymptotic-notation.md @@ -10,7 +10,7 @@ Asymptotic notations are used in computer science to classify algorithms based h # big O notation -Big O defines a bound for the *upper limit* of the running time (or space) of a algorithm. However, it is possible that the actual running time is much less as it does not take into account special cases +Big O defines a bound for the *upper* bound of the running time (or space) of a algorithm. However, it is possible that the actual running time is much less as it does not take into account special cases ## 1 Formal definition @@ -20,7 +20,7 @@ $f(n) = O(g(n))$ if there is some constant $A$ such that $f(n) < A \times g(n)$ # big theta notation -Big theta defines an upper and a lower bound for a the running time (or space) of an algorithm. +Big theta defines an *upper and a lower* bound for a the running time (or space) of an algorithm. ## 2 Formal definition diff --git a/content/notes/big-theta-notation.md b/content/notes/big-theta-notation.md deleted file mode 100644 index 40e85ee66..000000000 --- a/content/notes/big-theta-notation.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "big-theta-notation" -tags: -- cosc201 ---- - - - - ->Big theta means $f(n) = \Theta(g(n))$ if there are constants 0 < B < A such that for all sufficiently large n, ==$B × g(n) ≤ f(n) ≤ A × g(n)$== - -- Upper and lower bound -- $Θ$ says that $g(n)$ provides **upper** and **lower** bound for $f(n)$ - - "selection sort is $\Theta(n^2)$" -> the maximum number of operations will be bounded both above and below by some constant times $n^2$ -- $f(n) = \Theta(g(n))$ means that f and g have similar growth rates -- if $f(n) = \Theta(g(n))$ then the opposite is also true -- usually $f(n)$ is complex but $g(n)$ is very simple - diff --git a/content/notes/cosc-201-outline.md b/content/notes/cosc-201-outline.md index 401f991f1..43faa4f16 100644 --- a/content/notes/cosc-201-outline.md +++ b/content/notes/cosc-201-outline.md @@ -6,7 +6,6 @@ tags: --- - [[notes/aymptotic-notation]] -- [[notes/big-theta-notation]] - [[notes/induction]] - [[notes/analysis-of-recursive-algorithms]] - [[notes/union-find]] @@ -14,5 +13,4 @@ tags: - [[notes/sorting]] - [[notes/heapsort]] - [[notes/mergesort]] -- [[notes/quicksort]] - +- [[notes/quicksort]] \ No newline at end of file diff --git a/content/notes/cosc-202-outline.md b/content/notes/cosc-202-outline.md index e2089db7f..f6a1741c4 100644 --- a/content/notes/cosc-202-outline.md +++ b/content/notes/cosc-202-outline.md @@ -10,3 +10,10 @@ tags: - [[notes/ethics-in-cs]] - [[notes/integrated-development-environments]] - [[notes/branch]] +- [[notes/testing]] +- [[notes/test-driven-development]] +- [[notes/unit-testing]] +- [[notes/debugging]] +- [[notes/documentation]] +- [[notes/continuous-integration]] +- \ No newline at end of file diff --git a/content/notes/cosc-202.md b/content/notes/cosc-202.md index 380877d67..72681079c 100644 --- a/content/notes/cosc-202.md +++ b/content/notes/cosc-202.md @@ -10,9 +10,9 @@ tags: - [[notes/cosc-202-lectures]] - [[notes/cosc-202-outline]] -## 2 Assignments +## 1 Assignments - -## 3 Resources +## 2 Resources diff --git a/content/notes/induction.md b/content/notes/induction.md index e58f96e98..443a71fdf 100644 --- a/content/notes/induction.md +++ b/content/notes/induction.md @@ -33,7 +33,7 @@ Four parts e.g., - we will prove that, for every non-negative integer $n$, *insert property here* - For $n = 0$, *The property* is true because *explicit verification of this case* -- for any $n > 0$, assuming *the property* is true for $n-1$ (or, for all $k < n$), *the property* is true at $n$ because *explain why we can take a step up* +- for any $n > 0$, assuming *the property* is true for $n-1$ (or, for all $k < n$), *the property* is true at $n$ because *explain why we can take a step up* - Therefore, by induction, *the property* is true for all n. ### 1.3 Checking diff --git a/content/templates/induction-proof-template.md b/content/templates/induction-proof-template.md new file mode 100644 index 000000000..9e1c48582 --- /dev/null +++ b/content/templates/induction-proof-template.md @@ -0,0 +1,7 @@ +We will prove that, for every non-negative integer $n$, *insert property here* + +For $n = 0$, *The property* is true because *explicit verification of this case* + +For any $n > 0$, assuming *the property* is true for $n-1$ (or, for all $k < n$), *the property* is true at $n$ because *explain why we can take a step up* + +Therefore, by induction, *the property* is true for all n. \ No newline at end of file