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
b2eb347c
You need to sign in or sign up before continuing.
Commit
b2eb347c
authored
4 years ago
by
Václav Končický
Browse files
Options
Downloads
Patches
Plain Diff
Dynamization: Full dynamization
parent
b34e2144
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
vk-dynamic/dynamic.tex
+34
-0
34 additions, 0 deletions
vk-dynamic/dynamic.tex
with
34 additions
and
0 deletions
vk-dynamic/dynamic.tex
+
34
−
0
View file @
b2eb347c
...
...
@@ -377,4 +377,38 @@ construction steps, each taking $B_S(2^i)/2^i$ time. Summing this
together, we get the required upper bound.
\qed
\subsection
{
Full dynamization
}
For our definition of search problems, it is not easy to delete elements, as
anytime we wished to delete an element we would need to take apart and split a
structure into a few smaller ones. This could never be able to amortize to
decent deletion time.
Instead of that, we will want the underlying static structure to have an
ability to cross out elements. These elements will no longer participate in
queries, but they will count towards the structure size and complexity.
Once we have ability to cross out elements, we can upgrade the semidynamic data
structure to support deletion. We add a binary search tree or another set
structure which maps each element to a block it lives in. For each element we
keep a pointer on its instance in the BST. When we build a new block, we can
update all its current elements in the tree in constant time (and insert the
new one in logarithmic time).
Insertion time complexity then will always take at least logaritmic time and
space requirements increase by the BST.
Deletion then finds an element in the BST, locates it in the corresponding
block and crosses it out. We also keep the count of crossed out elements. If
this count becomes a certain fraction of all elements, we rebuild the structure
completely.
Before having to rebuild the whole structure, we cross-out at least
$
\Theta
(
n
)
$
elements, so the deletion time can be amortized and it will result in same time
complexity as insertion.
There also exists an worst-case version of full dynamization which carefully
manipulates with blocks, splitting and merging them as required. The details
are somewhat complicated, so we will not look at them further.
\endchapter
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