j = 1
while j <= n do
j = 2j
f()
Sum form of exact calls of f()?Note 1: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Classic
GUID:
added
Note Type: Horvath Classic
GUID:
C5BRbDI3JL
Previous
Note did not exist
New Note
Front
Back
j = 1
while j <= n do
j = 2j
f()
Sum form of exact calls of f()?\[\sum_{j = 0}^{\lfloor \log_2 n \rfloor}\]
We go from \(0\) to \(\lfloor \log_2 n \rfloor\) not from \(1\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | <pre><code>j = 1 while j <= n do j = 2j f()<br></code></pre> Sum form of exact calls of f()? | |
| Back | <div></div><div>\[\sum_{j = 0}^{\lfloor \log_2 n \rfloor}\]</div><div>We go from \(0\) to \(\lfloor \log_2 n \rfloor\) not from \(1\).</div> |
Note 2: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Classic
GUID:
added
Note Type: Horvath Classic
GUID:
Cz/kys?.PN
Previous
Note did not exist
New Note
Front
Every undirected graph that contains a Hamilton path also contains an eulerian walk?
Back
Every undirected graph that contains a Hamilton path also contains an eulerian walk?
No.


Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | Every undirected graph that contains a Hamilton path also contains an eulerian walk? | |
| Back | No.<br><img alt="" src="paste.png"> |
Note 3: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Classic
GUID:
added
Note Type: Horvath Classic
GUID:
FG1IbvZ*6[
Previous
Note did not exist
New Note
Front
The depth \(h\) of a seach tree of any comparison-based algorithm satisfies which bound?
Back
The depth \(h\) of a seach tree of any comparison-based algorithm satisfies which bound?
\(h \geq \Omega(\log n)\) this is information theoretically the least amount of comparisons necessary.
Note that \(h \not \leq O(n)\) necessarily as we could have a really stupid algorithm that compares thrice for example.
Note that \(h \not \leq O(n)\) necessarily as we could have a really stupid algorithm that compares thrice for example.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | The depth \(h\) of a seach tree of any comparison-based algorithm satisfies which bound? | |
| Back | \(h \geq \Omega(\log n)\) this is information theoretically the least amount of comparisons necessary.<br><br>Note that \(h \not \leq O(n)\) necessarily as we could have a really stupid algorithm that compares thrice for example. |
Note 4: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Image Occlusion-73a2c
GUID:
added
Note Type: Image Occlusion-73a2c
GUID:
KoR^|Dl^:[
Previous
Note did not exist
New Note
Front
Back
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Occlusion | {{c1::image-occlusion:rect:left=.0993:top=.1668:width=.1045:height=.5974}}<br>{{c2::image-occlusion:rect:left=.2342:top=.1117:width=.0565:height=.6158}}<br>{{c3::image-occlusion:rect:left=.3241:top=.1209:width=.1087:height=.625}}<br>{{c4::image-occlusion:rect:left=.4651:top=.0933:width=.1252:height=.6709}}<br>{{c5::image-occlusion:rect:left=.6206:top=.0933:width=.0687:height=.6618}}<br>{{c6::image-occlusion:rect:left=.7196:top=.1393:width=.0656:height=.6158}}<br>{{c7::image-occlusion:rect:left=.8101:top=.1393:width=.068:height=.579}}<br>{{c8::image-occlusion:rect:left=.908:top=.1393:width=.0711:height=.5515}}<br> | |
| Image | <img src="paste-89cdffb68fa0e6c27975c01b222032a46336dc8d.jpg"> |
Note 5: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Classic
GUID:
added
Note Type: Horvath Classic
GUID:
MFFs/r0>#}
Previous
Note did not exist
New Note
Front
Can {f, h} ever be in an MST? Prove it:


Back
Can {f, h} ever be in an MST? Prove it:


No, because it's the heaviest edge in the cycle.
If there was an MST containing it, we could remove it and replace it by another edge in the cycle.
Then we preserve the tree property yet it's weight is strictly lower.
If there was an MST containing it, we could remove it and replace it by another edge in the cycle.
Then we preserve the tree property yet it's weight is strictly lower.
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Front | Can {f, h} ever be in an MST? Prove it:<br><img src="paste-0451663ce9f1137e81a00020ee38fb0a96908565.jpg"> | |
| Back | No, because it's the heaviest edge in the cycle.<br>If there was an MST containing it, we could remove it and replace it by another edge in the cycle.<br>Then we preserve the tree property yet it's weight is strictly lower. |
Note 6: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Cloze
GUID:
added
Note Type: Horvath Cloze
GUID:
c-L/EL~rI8
Previous
Note did not exist
New Note
Front
A while loop that doesn't increase constantly but goes from i = 1 and increases by i = 2*i for example, can be modelled as a sum from 0 to \(\log_2 n\)?
Back
A while loop that doesn't increase constantly but goes from i = 1 and increases by i = 2*i for example, can be modelled as a sum from 0 to \(\log_2 n\)?
Note that we start from 0, as \(2 = 1^0\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | A while loop that doesn't increase constantly but goes from <b>i = 1</b> and increases by <b>i = 2*i</b> for example, can be modelled as a sum from {{c1::0}} to {{c2:: \(\log_2 n\)}}? | |
| Extra | Note that we start from 0, as \(2 = 1^0\). |
Note 7: ETH::1. Semester::A&D
Deck: ETH::1. Semester::A&D
Note Type: Horvath Cloze
GUID:
added
Note Type: Horvath Cloze
GUID:
zjEd=>WPZ?
Previous
Note did not exist
New Note
Front
The number of distinct paths in a complete graph grows \(O(n!)\).
Back
The number of distinct paths in a complete graph grows \(O(n!)\).
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | The number of distinct paths in a complete graph grows {{c1:: \(O(n!)\)}}. |