Added quorum systems section to notes.

This commit is contained in:
Michael Whittaker 2021-01-14 11:32:00 -08:00
commit 3ab03da4d1
5 changed files with 581 additions and 0 deletions

277
.gitignore vendored Normal file
View file

@ -0,0 +1,277 @@
*.zip
# vim ##########################################################################
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# latex ########################################################################
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
*.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Comment the next line if you want to keep your tikz graphics files
*.tikz
*-tikzDictionary
# listings
*.lol
# makeidx
*.idx
*.ilg
*.ind
*.ist
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices
*.xyc
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# KBibTeX
*~[0-9]*
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta

16
notes/notes.tex Normal file
View file

@ -0,0 +1,16 @@
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{pervasives}
\begin{document}
\begin{center}
{\Large Quorum Systems}
\today{}
\end{center}
{\input{sections/quorum_systems.tex}}
\bibliographystyle{plain}
\bibliography{references}
\end{document}

184
notes/pervasives.sty Normal file
View file

@ -0,0 +1,184 @@
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{environ}
\usepackage{etoolbox}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{tcolorbox}
\usepackage{tikz}
\usepackage{xcolor}
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
% A pretty color palette taken from https://flatuicolors.com/palette/defo. To
% see a preview of the different colors, use the \showcolors command below.
\definecolor{flatdarkgray}{HTML}{7F8C8D}
\definecolor{flatgray}{HTML}{BDC3C7}
\definecolor{flatred}{HTML}{C0392B}
\definecolor{flatorange}{HTML}{D35400}
\definecolor{flatyellow}{HTML}{F39C12}
\definecolor{flatdenim}{HTML}{2C3E50}
\definecolor{flatpurple}{HTML}{8E44AD}
\definecolor{flatblue}{HTML}{2980B9}
\definecolor{flatgreen}{HTML}{27AE60}
\definecolor{flatcyan}{HTML}{16A085}
\definecolor{flatdarkgrayalt}{HTML}{95A5A6}
\definecolor{flatgrayalt}{HTML}{ECF0F1}
\definecolor{flatredalt}{HTML}{E74C3C}
\definecolor{flatorangealt}{HTML}{E67E22}
\definecolor{flatyellowalt}{HTML}{F1C40F}
\definecolor{flatdenimalt}{HTML}{34495E}
\definecolor{flatpurplealt}{HTML}{9B59B6}
\definecolor{flatbluealt}{HTML}{3498DB}
\definecolor{flatgreenalt}{HTML}{2ECC71}
\definecolor{flatcyanalt}{HTML}{1ABC9C}
\definecolor{flatbrown}{HTML}{836953}
\newcommand{\showcolors}{%
\begin{center}
\begin{tikzpicture}
\tikzstyle{swatch}=[minimum width=3cm, minimum height=0.5cm, y=0.5cm]
\node[swatch, fill=flatdarkgray] at (0, 9) {\texttt{flatdarkgray}};
\node[swatch, fill=flatgray] at (0, 8) {\texttt{flatgray}};
\node[swatch, fill=flatred] at (0, 7) {\texttt{flatred}};
\node[swatch, fill=flatorange] at (0, 6) {\texttt{flatorange}};
\node[swatch, fill=flatyellow] at (0, 5) {\texttt{flatyellow}};
\node[swatch, fill=flatdenim] at (0, 4) {\texttt{flatdenim}};
\node[swatch, fill=flatpurple] at (0, 3) {\texttt{flatpurple}};
\node[swatch, fill=flatblue] at (0, 2) {\texttt{flatblue}};
\node[swatch, fill=flatgreen] at (0, 1) {\texttt{flatgreen}};
\node[swatch, fill=flatcyan] at (0, 0) {\texttt{flatcyan}};
\node[swatch, fill=flatdarkgrayalt] at (3, 9) {\texttt{flatdarkgrayalt}};
\node[swatch, fill=flatgrayalt] at (3, 8) {\texttt{flatgrayalt}};
\node[swatch, fill=flatredalt] at (3, 7) {\texttt{flatredalt}};
\node[swatch, fill=flatorangealt] at (3, 6) {\texttt{flatorangealt}};
\node[swatch, fill=flatyellowalt] at (3, 5) {\texttt{flatyellowalt}};
\node[swatch, fill=flatdenimalt] at (3, 4) {\texttt{flatdenimalt}};
\node[swatch, fill=flatpurplealt] at (3, 3) {\texttt{flatpurplealt}};
\node[swatch, fill=flatbluealt] at (3, 2) {\texttt{flatbluealt}};
\node[swatch, fill=flatgreenalt] at (3, 1) {\texttt{flatgreenalt}};
\node[swatch, fill=flatcyanalt] at (3, 0) {\texttt{flatcyanalt}};
\end{tikzpicture}
\end{center}
}
% New theorem environments.
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{benchmark}{Benchmark}
\newtheorem{example}{Example}
\newtheorem{invariant}{Invariant}
% Toggleable TODOs.
\newtoggle{showtodos}
\toggletrue{showtodos}
% \togglefalse{showtodos}
\newcommand{\TODO}[2][]{%
\iftoggle{showtodos}{{\textcolor{blue}{\textbf{TODO(#1): #2}}}}{}%
}
% Toggleable notes.
\newtoggle{shownotes}
\toggletrue{shownotes}
% \togglefalse{shownotes}
\newcommand{\NOTE}[2][]{%
\iftoggle{shownotes}{{\textcolor{red}{NOTE(#1): #2}}}{}%
}
% Labels and references. To label a figure use the \figlabel command, to label
% a lemma, use the \lemlabel command, etc. Similarly, use the \figref, lemref,
% etc. commands to reference these labels. For example:
%
% \begin{figure}
% % ...
% \caption{A nice figure}\figlabel{MyNiceFigure}
% \end{figure}
%
% Refer to \figref{MyNiceFigure} for a nice figure.
%
% Toggle showlabels to show or hide all labels.
\newtoggle{showlabels}
% \toggletrue{showlabels}
\togglefalse{showlabels}
\newcommand{\genericlabel}[2]{%
\label{#1:#2}%
\iftoggle{showlabels}{\textcolor{flatdarkgray}{\texttt{[#2]}}}{}%
}
\newcommand{\algolabel}[1]{\genericlabel{alg}{#1}}
\newcommand{\algoref}[1]{Algorithm~\ref{alg:#1}}
\newcommand{\applabel}[1]{\genericlabel{app}{#1}}
\newcommand{\appref}[1]{Appendix~\ref{app:#1}}
\newcommand{\benchlabel}[1]{\genericlabel{bench}{#1}}
\newcommand{\benchref}[1]{Benchmark~\ref{bench:#1}}
\newcommand{\clmlabel}[1]{\genericlabel{clm}{#1}}
\newcommand{\clmref}[1]{Claim~\ref{clm:#1}}
\newcommand{\eqnlabel}[1]{\genericlabel{eqn}{#1}}
\newcommand{\eqnref}[1]{\eqref{eqn:#1}}
\newcommand{\invlabel}[1]{\genericlabel{inv}{#1}}
\newcommand{\invref}[1]{Invariant~\ref{inv:#1}}
\newcommand{\examplelabel}[1]{\genericlabel{exa}{#1}}
\newcommand{\exampleref}[1]{Example~\ref{exa:#1}}
\newcommand{\figlabel}[1]{\genericlabel{fig}{#1}}
\newcommand{\figref}[1]{Figure~\ref{fig:#1}}
\newcommand{\lemlabel}[1]{\genericlabel{lem}{#1}}
\newcommand{\lemref}[1]{Lemma~\ref{lem:#1}}
\newcommand{\linelabel}[1]{\genericlabel{line}{#1}}
\newcommand{\lineref}[1]{line~\ref{line:#1}}
\newcommand{\Lineref}[1]{Line~\ref{line:#1}}
\newcommand{\lstlabel}[1]{\genericlabel{lst}{#1}}
\newcommand{\lstref}[1]{Listing~\ref{lst:#1}}
\newcommand{\seclabel}[1]{\genericlabel{sec}{#1}}
\newcommand{\secref}[1]{Section~\ref{sec:#1}}
\newcommand{\appendixlabel}[1]{\genericlabel{appendix}{#1}}
\newcommand{\appendixref}[1]{Appendix~\ref{appendix:#1}}
\newcommand{\tablabel}[1]{\genericlabel{tab}{#1}}
\newcommand{\tabref}[1]{Table~\ref{tab:#1}}
\newcommand{\thmlabel}[1]{\genericlabel{thm}{#1}}
\newcommand{\thmref}[1]{Theorem~\ref{thm:#1}}
% Surrounding symbols.
\DeclarePairedDelimiter{\parens}{(}{)}
\DeclarePairedDelimiter{\set}{\{}{\}}
\DeclarePairedDelimiterX{\setst}[2]{\{}{\}}{#1 \,\delimsize|\, #2}
\DeclarePairedDelimiter{\brackets}{[}{]}
\DeclarePairedDelimiterX{\pfrac}[2]{(}{)}{\frac{#1}{#2}}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
% Symbols and abbreviations.
\newcommand{\nats}{\mathbb{N}}
\newcommand{\ints}{\mathbb{Z}}
\newcommand{\rats}{\mathbb{Q}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\complexes}{\mathbb{C}}
\newcommand{\partialto}{\rightharpoonup}
% https://tex.stackexchange.com/a/74132
\newcommand{\defeq}{\stackrel{\mathclap{\mbox{\normalfont \tiny def}}}{=}}
% Misc.
\newcommand{\defword}[1]{\textbf{\textcolor{flatdenim}{#1}}}
% Tech report environment.
%
% If you're writing a paper and there's too much content, you might want to
% move some content out of the paper and into the technical report version of
% the paper. To do this, you can put the content in the techreport environment
% like this:
%
% This text will appear in the paper and tech report.
% \begin{techreport}
% This text will only appear in the tech report.
% \end{techreport}
%
% When the techreportenabled toggle is enabled, the tech report content will be
% shown. When the toggle is disabled, the tech report content will be hidden.
% Moreover, when the toggle is enabled, the tech report content will be shown
% with a red bar on its left margin to make it easier for readers to figure out
% what is new in the tech report.
\newtoggle{techreportenabled}
\toggletrue{techreportenabled}
\togglefalse{techreportenabled}

19
notes/references.bib Normal file
View file

@ -0,0 +1,19 @@
@article{naor1998load,
title={The load, capacity, and availability of quorum systems},
author={Naor, Moni and Wool, Avishai},
journal={SIAM Journal on Computing},
volume={27},
number={2},
pages={423--447},
year={1998},
publisher={SIAM}
}
@article{vukolic2013origin,
title={The origin of quorum systems},
author={Vukoli{\'c}, Marko and others},
journal={Bulletin of EATCS},
volume={2},
number={101},
year={2013}
}

View file

@ -0,0 +1,85 @@
\section{Quorum Systems}
These definitions are taken from \cite{naor1998load} and
\cite{vukolic2013origin}.
%
Given a set $X = \set{x_1, \ldots, x_n}$, a \defword{quorum system} over $X$ is
a set $Q = \set{q_1, \ldots, q_m}$ of subsets of $X$, called \defword{quorums},
such that every pair of quorums intersect. That is, for every $q_1, q_2 \in
Q$, $q_1 \cap q_2 \neq \emptyset$.
A quorum system $Q$ is a \defword{coterie} if there does not exist quorums
$q_1, q_2 \in Q$ such that $q_1 \subset q_2$. In other words, a coterie is a
quorum system that does not contain some quorum $q_1$ that is a strict subset
of some other quorum $q_2$.
Let $P, Q$ be two coteries over the same set $X$. $P$ \defword{dominates} $Q$,
denoted $P > Q$, if $P \neq Q$ and for every $q \in Q$, there exists some $p
\in P$ such that $p \subseteq q$. A coterie $Q$ is \defword{dominated} if there
exists some coterie $P$ that dominates it.
\begin{example}
Let $P$ be the majority quorum system over the set $X = \set{a, b, c}$. That
is, $P = \set{\set{a, b}, \set{a, c}, \set{b, c}}$. Let $Q = \set{\set{a, b,
c}}$. Note that both quorum systems are coteries. $P$ dominates $Q$. To see
this, we first confirm that $P \neq Q$. Next, we consider every $q \in Q$ and
find a corresponding $p \in P$ where $p \subseteq q$. Here, we only have one
choice for $q$ (i.e. $q = \set{a, b, c}$), and for every $p \in P$, $p
\subseteq q$.
\end{example}
There is an intuitive way to think about non-dominated coteries. A coterie $Q$
is non-dominated if (1) removing any element from any quorum would make $Q$ no
longer a coterie and (2) there are no other quorums that we can add to $Q$
while preserving the fact that $Q$ is a coterie. Here's why. (1) Assume for
contradiction that we remove some element from some quorum in $Q$ to
form a new coterie $P$. $P$ dominates $Q$ in the obvious way, but $Q$ is
non-dominated. (2) Assume for contradiction that we add some quorum to $Q$ to
form a new coterie $P$. Again, $P$ dominates $Q$ in the obvious way, but $Q$ is
non-dominated. Intuitively, a non-dominated coterie is a maximal coterie (we
cannot add any more quorums) with minimal quorums (we cannot remove any
elements from any quorums).
\NOTE[michael]{%
I think domination will be an important property for recursive quorum
systems. I think there are some quorum systems that we cannot form as a
recursive quorum system, but we can form a recursive quorum system that
dominates it. The definition of domination that I found is only defined on
coteries. Can we define this without coteries? I think so, but we have to
double check.
}
Let $\sigma: Q \to [0, 1]$ be a discrete probability distribution over the
quorums of $Q$ (i.e., $\sum_{q \in Q} \sigma(q) = 1$). We call $\sigma$ a
\defword{strategy}. Intuitively, $\sigma$ is a strategy to pick quorums at
random. We have the following definitions.
\begin{align*}
l_\sigma(x) &\defeq \sum_{\setst{q \in Q}{x \in q}} \sigma(q) \\
L_\sigma(Q) &\defeq \max_{x \in X} l_\sigma(x) \\
L(Q) &\defeq \min_\sigma L_\sigma(Q)
\end{align*}
$l_\sigma(x)$ is the load on $x$ given some strategy $\sigma$. $L_\sigma(Q)$ is
the load on most loaded element $x$. $L(Q)$ is the \defword{load} of the best
possible strategy. Intuitively, the lower the load of a quorum system, the
higher the throughput it can support.
\begin{example}
Consider the majority quorum system $Q = \set{\set{a, b}, \set{a, c}, \set{b,
c}}$ on elements $X = \set{a, b, c}$. Let $\sigma(\set{a, b}) =
\sigma(\set{a, c}) = 0.5$ and $\sigma(\set{b, c}) = 0$.
\begin{align*}
l_\sigma(a) &= \sigma(\set{a, b}) + \sigma(\set{a, c}) = 0.5 + 0.5 = 1 \\
l_\sigma(b) &= \sigma(\set{a, b}) + \sigma(\set{b, c}) = 0.5 + 0 = 0.5 \\
l_\sigma(c) &= \sigma(\set{a, c}) + \sigma(\set{b, c}) = 0.5 + 0 = 0.5 \\
L_\sigma(Q) &= \max(1, 0.5, 0.5) = 1
\end{align*}
The load of $Q$ with respect to $\sigma$ is 1, but the load $L(Q)$ is not 1
because $\sigma$ is not an optimal strategy. If we instead choose
$\sigma_{\text{opt}}(-) = \frac{1}{3}$, the load is reduced to $\frac{2}{3}$
which is optimal.
\end{example}
The \defword{resilience} or \defword{fault tolerance} of a quorum system $Q$ is
the largest number $f$ such that for every subset $F \subseteq X$ with $|F| =
f$, there still exists some quorum $q \in Q$ such that $q \cap F = \emptyset$.
Intuitively, a quorum system has fault tolerance $f$ if we can fail an
arbitrary set of $f$ elements and still have some quorum left.