Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
ds2-notes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
datovky
ds2-notes
Commits
10243df7
Commit
10243df7
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Cache: Clarified the argument by number of children
parent
52f63cca
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
05-cache/cache.tex
+2
-1
2 additions, 1 deletion
05-cache/cache.tex
with
2 additions
and
1 deletion
05-cache/cache.tex
+
2
−
1
View file @
10243df7
...
@@ -268,7 +268,8 @@ To establish time and I/O complexity, we consider the tree of recursion. Every n
...
@@ -268,7 +268,8 @@ To establish time and I/O complexity, we consider the tree of recursion. Every n
to a~T or TS problem. It has 3 or~4 children for its sub-problems. At level~
$
i
$
(counted from the
to a~T or TS problem. It has 3 or~4 children for its sub-problems. At level~
$
i
$
(counted from the
root, which is at level~0), we have at most
$
4
^
i
$
nodes with sub-problems of size
$
N
/
2
^
i
$
.
root, which is at level~0), we have at most
$
4
^
i
$
nodes with sub-problems of size
$
N
/
2
^
i
$
.
Therefore, the height of the tree is
$
\log
N
$
and it has
$
4
^{
\log
N
}
=
N
^
2
$
leaves.
Therefore, the height of the tree is
$
\log
N
$
and it has
$
4
^{
\log
N
}
=
N
^
2
$
leaves.
Since all internal nodes have at least 2~children, there are less internal nodes than leaves.
Since all internal nodes have least 2~children (in fact, 3 or~4), there are
less internal nodes than leaves.
In every TS leaf, we swap a~pair of items. In every T~leaf, nothing happens. Internal nodes
In every TS leaf, we swap a~pair of items. In every T~leaf, nothing happens. Internal nodes
only redistribute work and they do not touch items. So every node takes
$
\O
(
1
)
$
time and the
only redistribute work and they do not touch items. So every node takes
$
\O
(
1
)
$
time and the
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment