- enqueue(k, S): append at the end of the queue
- dequeue(S): remove and return the first element of the queue
Note 1: ETH::A&D
Note Type: Horvath Cloze
GUID:
D2>~h
Before
Front
Back
- enqueue(k, S): append at the end of the queue
- dequeue(S): remove and return the first element of the queue
After
Front
- enqueue(k, S): append at the end of the queue
- dequeue(S): remove and return the first element of the queue
Back
- enqueue(k, S): append at the end of the queue
- dequeue(S): remove and return the first element of the queue
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | The ADT <b>quue</b> has the following operations:<br><ul><li><b>enqueue(k, S)</b>: {{c2:: append at the end of the queue}}</li><li><b>dequeue(S)</b>: {{c4:: remove and return the first element of the queue}}</li></ul> | The ADT <b>queue</b> has the following operations:<br><ul><li><b>enqueue(k, S)</b>: {{c2:: append at the end of the queue}}</li><li><b>dequeue(S)</b>: {{c4:: remove and return the first element of the queue}}</li></ul> |
Note 2: ETH::A&D
Note Type: Horvath Cloze
GUID:
F^&OZQURkx
Before
Front
- push: \(O(1)\) insert at the end, with pointer to the end
- pop: \(O(1)\) remove the first element like in a stack
Back
- push: \(O(1)\) insert at the end, with pointer to the end
- pop: \(O(1)\) remove the first element like in a stack
After
Front
- push: \(O(1)\) insert at the end, with pointer to the end
- pop: \(O(1)\) remove the first element like in a stack
Back
- push: \(O(1)\) insert at the end, with pointer to the end
- pop: \(O(1)\) remove the first element like in a stack
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | The ADT <b>queue</b> can be efficiently implemented using a {{c1:: |
The ADT <b>queue</b> can be efficiently implemented using a {{c1::<b>singly linked list with a pointer to the end</b>}}:<br><ul><li><b>push</b>: {{c2:: \(O(1)\) insert at the end, with pointer to the end}}<br></li><li><b>pop</b>: {{c3:: \(O(1)\) remove the first element like in a stack}}</li></ul> |
Note 3: ETH::A&D
Note Type: Algorithms
GUID:
NAHrkHd^ik
Before
Front
Back
Worst Case: \(O(n \log n)\)
After
Front
Back
Worst Case: \(O(n \log n)\)
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Attributes | Not in-place, thus the space complexity is \(K(n)\). (Although it can be programmed to be in-place.)<br><b>Stable</b> |
Note 4: ETH::A&D
Note Type: Horvath Classic
GUID:
Nl}2-%ar31
Before
Front
Back
After
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Back | A datastructure that stores |
A datastructure that stores values in a tree form, with the largest element always being the root. |
Note 5: ETH::A&D
Note Type: Horvath Cloze
GUID:
t/(N7FzdP}
Before
Front
Back
After
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | <div>The ADT <b>priorityQueue</b> can be efficiently implemented using a {{c1:: <b>MaxHeap</b>}}. |
<div>The ADT <b>priorityQueue</b> can be efficiently implemented using a {{c1:: <b>MaxHeap</b>}}. </div><div><br></div><div>This guarantees {{c2::\(O(\log n)\)}} for both operations.</div> |
Note 6: ETH::A&D
Note Type: Horvath Classic
GUID:
xP1aIt[ejN
Before
Front
Back
\(f\) grows asymptotically faster than \(g\)
After
Front
Back
\(f\) grows asymptotically faster than \(g\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Back | \(\exists C \ge 0 \quad \forall n \in \mathbb{N} \quad f(n) \ge C\cdot g(n)\)<br><br>\(f\) grows asymptotically <b>faster</b> than \(g\) | \(\exists C \ge 0 \quad \forall n \in \mathbb{N} \quad f(n) \ge C\cdot g(n)\)<br><br>\(f\) grows asymptotically <b>faster</b> than \(g\). |
Note 7: ETH::A&D
Note Type: Horvath Cloze
GUID:
yy3TxuBe~r
Before
Front
Back
After
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | A queue is also called {{c1:: FIFO}}. | A queue is also called {{c1:: FIFO::/works under the principle of..}}. |
Note 8: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
G|6fl[78G`
Before
Front
To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:
- G1 (associativity)
- G2 (neutral element) G2' -> you only need to prove existence of a right neutral element (not a full two-sided neutral).
- G3 (inverse) G3' -> you only need to prove the existence of a right inverse
Back
To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:
- G1 (associativity)
- G2 (neutral element) G2' -> you only need to prove existence of a right neutral element (not a full two-sided neutral).
- G3 (inverse) G3' -> you only need to prove the existence of a right inverse
After
Front
To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:
- G1 (Associativity)
- G2 (Neutral element) G2' -> you only need to prove existence of a right neutral element (not a full two-sided neutral).
- G3 (Inverse) G3' -> you only need to prove the existence of a right inverse
Back
To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:
- G1 (Associativity)
- G2 (Neutral element) G2' -> you only need to prove existence of a right neutral element (not a full two-sided neutral).
- G3 (Inverse) G3' -> you only need to prove the existence of a right inverse
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | <p>To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:<br> |
<p>To prove \(\langle G; * \rangle\) is a group, you need to prove three axioms:<br></p><ol><li>{{c2::G1 (Associativity)}}</li><li>{{c3::G2 (Neutral element) G2' -> you only need to prove existence of a right neutral element (not a full two-sided neutral).}}</li><li>{{c4::G3 (Inverse) G3' -> you only need to prove the existence of a right inverse}}</li></ol><p></p> |
Note 9: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
K,;}YIg:-h
Before
Front
If \(A = B\), then \(\rho\) is called a relation on \(A\).
Back
If \(A = B\), then \(\rho\) is called a relation on \(A\).
After
Front
If \(A = B\), then \(\rho\) is called a relation on \(A\).
Back
If \(A = B\), then \(\rho\) is called a relation on \(A\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | A <b>relation </b>\(\rho\) from a set \(A\) to a set \(B\) (also called an \((A,B)\)-relation) is a |
A <b>relation </b>\(\rho\) from a set \(A\) to a set \(B\) (also called an \((A,B)\)-relation) is a subset of {{c1::\(A\times B\)}}.<br><br>If \(A = B\), then \(\rho\) is called a {{c1::<i>relation on</i> \(A\)}}. |
Note 10: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
Od*A$z}#*`
Before
Front
\(\psi(a*b) = \psi(a)\star\psi(b)\).
If \(\psi\) is a bijection from \(G\) to \(H\), then it is called an isomorphism.
Back
\(\psi(a*b) = \psi(a)\star\psi(b)\).
If \(\psi\) is a bijection from \(G\) to \(H\), then it is called an isomorphism.
After
Front
\(\psi(a*b) = \psi(a)\star\psi(b)\).
If \(\psi\) is a bijection from \(G\) to \(H\), then it is called an isomorphism.
Back
\(\psi(a*b) = \psi(a)\star\psi(b)\).
If \(\psi\) is a bijection from \(G\) to \(H\), then it is called an isomorphism.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | For two groups \(\langle G;*;\widehat{};e\rangle\)and \(\langle H;\star;\sim;e'\rangle\), a function \(\psi: G\to H\) is called a <i>group homomorphism</i> if for all \(a\) and \(b\):<br>{{c1::\(\psi(a*b) = \psi(a)\star\psi(b)\)}}.<br>If \(\psi\) is {{c2::a bijection from \(G\) to \(H\)}}, then it is called an <i>isomorphism</i>. | For two groups \(\langle G;*;\widehat{\hspace{0.5em}};e\rangle\)and \(\langle H;\star;\sim;e'\rangle\), a function \(\psi: G\to H\) is called a <i>group homomorphism</i> if for all \(a\) and \(b\):<br>{{c1::\(\psi(a*b) = \psi(a)\star\psi(b)\)}}.<br><br>If \(\psi\) is {{c2::a bijection from \(G\) to \(H\)}}, then it is called an <i>isomorphism</i>. |
Note 11: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
lx/&=nJI{d
Before
Front
Neutral Element of a group:
- Addition \(0\).
- Multiplication \(1\).
Back
Neutral Element of a group:
- Addition \(0\).
- Multiplication \(1\).
After
Front
Neutral Element of a group:
- For Addition: \(0\)
- For Multiplication: \(1\)
Back
Neutral Element of a group:
- For Addition: \(0\)
- For Multiplication: \(1\)
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | <p>Neutral Element of a group:</p><ul><li><b>Addition</b> {{c1::\(0\)}} |
<p>Neutral Element of a group:</p><ul><li><b>For Addition:</b> {{c1::\(0\)}}</li><li><b>For Multiplication:</b> {{c2::\(1\)}}</li></ul> |
Note 12: ETH::DiskMat
Note Type: Horvath Classic
GUID:
oo(x.D7C(:
Before
Front
Back
After
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Back | \(a * b = a * c \ \implies \ b = c\) |
Note 13: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
qo:})x5a6`
Before
Front
In a group, the equations \(a * x = b\) and \(x * a = b\) have unique solutions for all \(a, b\) (property G3(v)).
Back
In a group, the equations \(a * x = b\) and \(x * a = b\) have unique solutions for all \(a, b\) (property G3(v)).
After
Front
In a group, the equations \(a * x = b\) and \(x * a = b\) have unique solutions for all \(a, b\).
Back
In a group, the equations \(a * x = b\) and \(x * a = b\) have unique solutions for all \(a, b\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | <p>In a group, the equations \({{c1::a * x = b}}\) and \({{c2::x * a = b}}\) have {{c3::unique solutions}} for all \(a, b\) |
<p>In a group, the equations \({{c1::a * x = b}}\) and \({{c2::x * a = b}}\) have {{c3::unique solutions}} for all \(a, b\).</p> |
| Extra | Property G3 (v) |
Note 14: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
rI[60?4iFu
Before
Front
Back
- Closure
- Associativity
- Identity
- Inverse
After
Front
- Closure
- Associativity
- Identity
- Inverse
Back
- Closure
- Associativity
- Identity
- Inverse
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | A <b>group</b> has the following properties: | A <b>group</b> has the following properties:<br><ol><li>{{c1::Closure}}</li><li>{{c2::Associativity}}</li><li>{{c3::Identity}}</li><li>{{c4::Inverse}}</li></ol> |
| Extra |
Note 15: ETH::DiskMat
Note Type: Horvath Classic
GUID:
u${[$*iYrd
Before
Front
Does the uniqueness of the neutral element imply that a group is abelian (commutative)?
I.e. does a*e = e*a mean G is abelian?
Back
Does the uniqueness of the neutral element imply that a group is abelian (commutative)?
I.e. does a*e = e*a mean G is abelian?
No! The uniqueness of the neutral element does not imply commutativity.
Counterexample: The identity matrix \(I_3\) is the unique neutral element for the group of \(3 \times 3\) real matrices under multiplication. We have \(A \cdot I_3 = I_3 \cdot A\) for all matrices \(A\), even though matrix multiplication is not commutative in general.
After
Front
Does the uniqueness of the neutral element imply that a group is abelian (commutative)?
I.e. does \(a*e = e*a\) mean G is abelian?Back
Does the uniqueness of the neutral element imply that a group is abelian (commutative)?
I.e. does \(a*e = e*a\) mean G is abelian?No! The uniqueness of the neutral element does not imply commutativity.
Counterexample: The identity matrix \(I_3\) is the unique neutral element for the group of \(3 \times 3\) real matrices under multiplication. We have \(A \cdot I_3 = I_3 \cdot A\) for all matrices \(A\), even though matrix multiplication is not commutative in general.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | <p>Does the uniqueness of the neutral element imply that a group is abelian (commutative)?</p> |
<p>Does the uniqueness of the neutral element imply that a group is abelian (commutative)?</p>I.e. does \(a*e = e*a\) mean G is abelian? |
| Back | <p><strong>No!</strong> The uniqueness of the neutral element does <strong>not</strong> imply commutativity.</p>< |
<p><strong>No!</strong> The uniqueness of the neutral element does <strong>not</strong> imply commutativity.</p><p><strong>Counterexample</strong>: The identity matrix \(I_3\) is the unique neutral element for the group of \(3 \times 3\) real matrices under multiplication. We have \(A \cdot I_3 = I_3 \cdot A\) for all matrices \(A\), even though matrix multiplication is <strong>not commutative</strong> in general.</p> |
Note 16: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
wV8Y&j0xY.
Before
Front
- unary operators (NOT)
- quantifiers (for all and exists)
- operators (AND, OR)
- Implication
Back
- unary operators (NOT)
- quantifiers (for all and exists)
- operators (AND, OR)
- Implication
After
Front
- Unary operators (NOT)
- Quantifiers (for all and exists)
- Operators (AND, OR)
- Implications
Back
- Unary operators (NOT)
- Quantifiers (for all and exists)
- Operators (AND, OR)
- Implications
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | Name the binding strengths of PL tokens in order:<br><ol><li>{{c1:: |
Name the binding strengths of PL tokens in order:<br><ol><li>{{c1:: Unary operators (NOT)}}</li><li>{{c2:: Quantifiers (for all and exists)}}</li><li>{{c3:: Operators (AND, OR)}}</li><li>{{c4:: Implications}}</li></ol> |
Note 17: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
y4s0XCy@A
Before
Front
Back
After
Front
Back
This follows directly from the antisymmetry of \(\preceq\). If there were two least elements, they would be mutually comparable, and hence must
be equal.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Extra | Note that a least or a greatest element need not exist. However, there can be at most one least element, as suggested by the word “the” in the definition. <br><br>This follows directly from the antisymmetry of \(\preceq\). If there were two least elements, they would be mutually comparable, and hence must<br>be equal. |
Note 18: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
yAP=DE#~t<
Before
Front
- Closure
- Associativity
- Identity
- Inverse
- Commutative
Back
- Closure
- Associativity
- Identity
- Inverse
- Commutative
After
Front
- Closure
- Associativity
- Identity
- Inverse
- Commutativity
Back
- Closure
- Associativity
- Identity
- Inverse
- Commutativity
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | An <b>abelian group</b> has the following properties:<br><ol><li>{{c1::Closure}}</li><li>{{c2::Associativity}}</li><li>{{c3::Identity}}</li><li>{{c4::Inverse}}</li><li>{{c5::Commutativ |
An <b>abelian group</b> has the following properties:<br><ol><li>{{c1::Closure}}</li><li>{{c2::Associativity}}</li><li>{{c3::Identity}}</li><li>{{c4::Inverse}}</li><li>{{c5::Commutativity}}</li></ol> |
Note 19: ETH::DiskMat
Note Type: Horvath Cloze
GUID:
ztTfjE7<>>
Before
Front
Inverse in a group:
- Addition \(-a\)
- Multiplication {{c2::\(a^{-1}\)}}.
Back
Inverse in a group:
- Addition \(-a\)
- Multiplication {{c2::\(a^{-1}\)}}.
After
Front
Inverse in a group:
- For Addition: \(-a\)
- For Multiplication: {{c2::\(a^{-1}\)}}.
Back
Inverse in a group:
- For Addition: \(-a\)
- For Multiplication: {{c2::\(a^{-1}\)}}.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | <p>Inverse in a group:</p><ul><li><b>Addition </b>{{c1::\(-a\)}}</li><li><b>Multiplication </b>{{c2::\(a^{-1}\)}}.</li></ul> | <p>Inverse in a group:</p><ul><li><b>For Addition: </b>{{c1::\(-a\)}}</li><li><b>For Multiplication: </b>{{c2::\(a^{-1}\)}}.</li></ul> |
Note 20: ETH::LinAlg
Note Type: Horvath Classic
GUID:
eUCQYkiYf@
Before
Front
Back
After
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | What is a property that always hold for linear transformation |
What is a property that always hold for a linear transformation \(T(X)\)? |
| Back | \(T(0) = 0\) |