From: Martin Mares Date: Mon, 24 Mar 2008 22:01:28 +0000 (+0100) Subject: Approaching Optimality. Very slowly. X-Git-Tag: printed~160 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b39f3d352632de304959fae93bcc8960e961a37e;p=saga.git Approaching Optimality. Very slowly. --- diff --git a/Makefile b/Makefile index 59c6155..2aad2c2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ all: saga.ps -CHAPTERS=cover mst notation ram adv rank +CHAPTERS=cover mst ram adv opt rank notation %.dvi: %.tex macros.tex biblio.bib tex $< && bibtex $* && tex $< && tex $< diff --git a/PLAN b/PLAN index 42c81f2..0df7090 100644 --- a/PLAN +++ b/PLAN @@ -20,11 +20,16 @@ o MST verification o Linear-time verification o A randomized algorithm - . ?? Chazelle ?? - . ?? Pettie ?? o Special cases and related problems -* Ranking combinatorial objects +* Approaching Optimality + + . Soft heaps + . Robust contractions + . An optimal algorithm + . Decision trees + +* Ranking Combinatorial Objects o Ranking and unranking o Ranking of permutations @@ -57,8 +62,9 @@ Spanning trees: - practical considerations: katriel:cycle, moret:practice (mention pairing heaps) - parallel algorithms: p243-cole (see also remarks in Karger and pettie:minirand), pettie:parallel - bounded expansion classes? -- restricted cases and arborescences +- degree-restricted cases and arborescences - Pettie's paper on random bits (pettie:minirand) +- random sampling (propp:randommst) Models: @@ -67,6 +73,7 @@ Models: - consequences of Q-Heaps: Thorup's undirected SSSP etc. - add more context from thorup:aczero, also mention FP operations - expand the section on radix-sorting, mention Buchsbaum +- move Q-Heaps to the chapter on the MST's? Ranking: diff --git a/biblio.bib b/biblio.bib index 4fb17c0..b3b6086 100644 --- a/biblio.bib +++ b/biblio.bib @@ -1141,3 +1141,41 @@ inproceedings{ pettie:minirand, year = {2002}, pages = {1879--1895}, } + +@article{ chazelle:softheap, + author = {Bernard Chazelle}, + title = {The soft heap: an approximate priority queue with optimal error rate}, + journal = {J. ACM}, + volume = {47}, + number = {6}, + year = {2000}, + issn = {0004-5411}, + pages = {1012--1027}, + doi = {http://doi.acm.org/10.1145/355541.355554}, + publisher = {ACM}, + address = {New York, NY, USA}, +} + +@article{ propp:randommst, + author = {James Gary Propp and David Bruce Wilson}, + title = {How to get a perfectly random sample from a generic Markov chain and generate a random spanning tree of a directed graph}, + journal = {J. Algorithms}, + volume = {27}, + number = {2}, + year = {1998}, + issn = {0196-6774}, + pages = {170--217}, + doi = {http://dx.doi.org/10.1006/jagm.1997.0917}, + publisher = {Academic Press, Inc.}, + address = {Duluth, MN, USA}, +} + +@article{ vuillemin:binheap, + title={{A Data Structure for Manipulating Priority Queues}}, + author={Vuillemin, Jean}, + journal={Communications of the ACM}, + volume = 21, + number = 4, + pages={309--315}, + year={1978} +} diff --git a/opt.tex b/opt.tex new file mode 100644 index 0000000..7b05c12 --- /dev/null +++ b/opt.tex @@ -0,0 +1,66 @@ +\ifx\endpart\undefined +\input macros.tex +\fi + +\chapter{Approaching Optimality} + +\section{Soft heaps} + +Recently, Chazelle \cite{chazelle:ackermann} and Pettie \cite{pettie:ackermann} +have presented algorithms for the MST with worst-case time complexity +$\O(m\timesalpha(m,n))$. We will devote this chapter to their results +and especially to another algorithm by Pettie and Ramachandran \cite{pettie:optimal}, +which is provably optimal. + +At the very heart of all these algorithms lies the \df{soft heap} discovered by +Chazelle \cite{chazelle:softheap}. It is a~meldable priority queue, roughly +similar to the Vuillemin's binomial heaps \cite{vuillemin:binheap} or Fredman's +and Tarjan's Fibonacci heaps \cite{ft:fibonacci}. The soft heaps run faster at +the expense of \df{corrupting} a~fraction of the inserted elements by raising +their values (the values are however never decreased). This allows for +an~trade-off between accuracy and speed controlled by a~parameter~$\varepsilon$. +The heap operations take $\O(\log(1/\varepsilon))$ amortized time and at every +moment at most~$\varepsilon n$ elements of the~$n$ elements inserted can be +corrupted. + +\defnn{Soft heap operations}% +The soft heap contains distinct elements from a~totally ordered universe and it +supports the following operations: +\itemize\ibull +\:$\(\varepsilon)$ --- create an~empty soft heap with the given accuracy parameter, +\:$\(H,x)$ --- insert a~new element~$x$ to the heap~$H$, +\:$\(H_1,H_2)$ --- form a~new soft heap containing the elements stored in two disjoint + heaps $H_1$ and~$H_2$ + (both heaps must have the same~$\varepsilon$ and they are destroyed in the process), +\:$\(H)$ --- delete the minimum element of the heap~$H$ and return its value + (optionally signalling that the value has been corrupted). +\endlist + +\defnn{Soft queues} +The soft heap is built from \df{soft queues} (we will omit the adjective soft +in the rest of this section). Each queue has a~shape of a~binary tree.\foot{% +Actually, Chazelle defines the queues as binomial trees, but he transforms them in ways that are +somewhat counter-intuitive, albeit well-defined. We prefer describing the queues as binary +trees with a~special distribution of values. In fact, we get this exact type of binary +trees from the natural correspondence between general rooted trees and binary trees +(as described for example in Knuth's Fundamental Algorithms \cite{knuth:fundalg}). +Also, the original C~code in the Chazelle's paper uses this representation internally.} +Each vertex~$v$ of the tree remembers a~linked list $\(v)$ of values. The first value in the list +is called the \df{controlling key} of the vertex, denoted by $\(v)$ and defined to be~$+\infty$ if the +list is empty. The item list in every left son will be used only temporarily and it +will be kept empty between operations. Only right sons and the root have their lists +permanently occupied. (See the picture.) + +Each vertex is also assigned its \df{rank,} which is a~non-negative integer $\(v)$. +The rank of leaves is always zero, the rank of every internal vertex must be strictly +greater than the ranks of its sons. + +\obs +The rank of the root..... +Complete binary trees..... +The master tree..... + + + + +\endpart diff --git a/saga.tex b/saga.tex index 58483eb..42243a8 100644 --- a/saga.tex +++ b/saga.tex @@ -5,6 +5,7 @@ \input mst.tex \input ram.tex \input adv.tex +\input opt.tex \input rank.tex \input notation.tex