Finished implementing Oliver's suggestions 071820.

This commit is contained in:
Aaron Huber 2020-07-20 21:18:14 -04:00
parent fdf08f5c53
commit 2cc520e533
2 changed files with 13 additions and 29 deletions

View file

@ -368,7 +368,7 @@ The number of $3$-paths in $\graph{2}$ is computed by the following linear combi
\end{Lemma}
\begin{proof}
For $s \subseteq S'$ such that $s$ is a $3$-path, it \textit{must} be the case by definition of $f$ that all edges in $f_2(s)$ have at least one mapping from an edge in $s$. \AR{Here you mean to talk about edges in $E_2$ but the states talking about edges in $E_1$}\AH{Not sure if I have understood this comment, but hopefully fixed the problem.} This constraint rules out every pattern $S \in \graph{1}$ consisting of $3$ edges, as well as when $S = \twodis$. For $S = \ed$, note that $S$ doesn't have enough edges to have any output in $f_2^{-1}(S)$, i.e., there exists no $s \in \binom{E_2}{3}$ such that $f_2(s) = S$.\AR{Technically the argument for $\ed$ is different from the others in that $f_2^{-1}(\ed)$ has not have enough edges in total.}\AH{I'm slightly confused by the above comment...intuitively I understand, but doesn't $f_2^{-1}(S) = \emptyset$ technically?} The only surviving pattern is $S = \twopath$, where it can be seen in $f_2^{-1}(S)$ that each subset has successive connectivity from $(e_1, 0)$ to $(e_2, 1)$. There are then $2$ $3$-paths sharing edges $e_1$ and $e_2$ in $f_2^{-1}(S), \pbrace{(e1, 0), (e_1, 1), (e_2, 0)} \text{ and }\pbrace{(e_1, 1), (e_2, 0), (e_2, 1)}$.\AH{\LARGE Here where I left off.}\AR{Explicitly state the paths.}
For $s \subseteq S'$ such that $s$ is a $3$-path, it \textit{must} be the case by definition of $f$ that all edges in $f_2(s)$ have at least one mapping from an edge in $s$. \AR{Here you mean to talk about edges in $E_2$ but the states talking about edges in $E_1$}\AH{Not sure if I have understood this comment, but hopefully fixed the problem.} This constraint rules out every pattern $S \in \graph{1}$ consisting of $3$ edges, as well as when $S = \twodis$. For $S = \ed$, note that $S$ doesn't have enough edges to have any output in $f_2^{-1}(S)$, i.e., there exists no $s \in \binom{E_2}{3}$ such that $f_2(s) = S$.\AR{Technically the argument for $\ed$ is different from the others in that $f_2^{-1}(\ed)$ has not have enough edges in total.}\AH{I'm slightly confused by the above comment...intuitively I understand, but doesn't $f_2^{-1}(S) = \emptyset$ technically?} The only surviving pattern is $S = \twopath$, where it can be seen in $f_2^{-1}(S)$ that each subset has successive connectivity from $(e_1, 0)$ to $(e_2, 1)$. There are then $2$ $3$-paths sharing edges $e_1$ and $e_2$ in $f_2^{-1}(S), \pbrace{(e1, 0), (e_1, 1), (e_2, 0)} \text{ and }\pbrace{(e_1, 1), (e_2, 0), (e_2, 1)}$.
\end{proof}
\qed
%we have two 3-paths generated: $\pbox{(e_1, 0), (e_1, 1), (e_2, 0)}$ and $\pbox{(e_1, 1), (e_2, 0), (e_2, 1)}$. Thus,

View file

@ -10,7 +10,7 @@
\subsection{Introduction}
An incomplete database $\idb$ is a set of deterministic databases $\db_i$ where each element is known as a possible world. Since $\idb$ is modeling all the possible worlds of an uncertain database, it follows that each $\db_i \in \idb$ has the same named set of relations, $\{\rel_1,\ldots, \rel_n\}$ (albeit not equivalent across all instances), whose schemas $(\sch(\rel_i))$ are unchanging across each $\db_j$. For the set of possible worlds, $\wSet$, i.e. the set of all $\db_i \in \idb$, define an injective mapping to the set $\{0, 1\}^M$, where for each vector $\vct{w} \in \{0, 1\}^M$ there is at most one element $\db_i \in \idb$ mapped to $\vct{w}$. When $\idb$ is a probabilistic database, $\idb$ can be viewed as a two tuple $(\wSet, \pd)$, where $\wSet$ as noted, is the set of possible worlds, and $\pd$ is the probability distribution over $\wSet$.
An incomplete database $\idb$ is a set of deterministic databases $\db$ where each element is known as a possible world. Since $\idb$ is modeling all the possible worlds of an uncertain database, it follows that each $\db \in \idb$ has the same named set of relations, $\{\rel_1,\ldots, \rel_n\}$ (albeit not equivalent across all instances), whose schemas $(\sch(\rel_i))$ are unchanging across each $\db_j$. For the set of possible worlds, $\wSet$, i.e. the set of all $\db_i \in \idb$, define an injective mapping to the set $\{0, 1\}^M$, where for each vector $\vct{w} \in \{0, 1\}^M$ there is at most one element $\db_i \in \idb$ mapped to $\vct{w}$. When $\idb$ is a probabilistic database, $\idb$ can be viewed as a two tuple $(\wSet, \pd)$, where $\wSet$ as noted, is the set of possible worlds, and $\pd$ is the probability distribution over $\wSet$.
The possible worlds semantics gives a framework for how to think about running queries over $\idb$. Given a query $\query$, $\query$ is deterministically run over each $\db \in \idb$, and the output of $\query(\idb)$ is the set of results (worlds) from running $\query$ over each $\db_i \in \idb$. We write this formally as,
\[\query(\idb) = \{\query(\db) | \db \in \idb\}\]
@ -20,29 +20,19 @@ The possible worlds semantics gives a framework for how to think about running q
\subsection{Modeling and Semantics}
Define $\vct{X}$ to be the variables $X_1,\dots,X_M$. Let the set of all tuples in domain $\mathbb{D}$ be $\tset$.
Further define $\nxdb$ as an $\mathbb{N}[\vct{X}]$ database, i.e., an incomplete/probabilistic database model where each tuple $\tup \in \tset$ is annotated with a polynomial over variables $X_1,\ldots, X_M$ for some value of $M$ that will be specified later.
\OK{Suggest holding off on the definition of $\nxdb$ until you define $\mathbb{N}[\vct{X}]$-databases in the subsection below.}
\AH{The following \cref{subsubsec:k-rel} is a rough draft to convey a high level, superficial view of the K-relational database framework, specifically in the setting of $\mathbb{N}[\vct{X}]$-relation. Definitely needs some tweaking...any advice is much appreciated.}
\subsubsection{K-relations}\label{subsubsec:k-rel}
A K-relation~\cite{DBLP:conf/pods/GreenKT07} is a relation whose tuples are each annotated with an expression whose values come from its respective commutative K-semiring, denoted $\{K, \oplus, \otimes, \mathbbold{0}, \mathbbold{1}\}$. A commutative $K$-semiring has associative and commutative operators $\oplus$ and $\otimes$, with $\otimes$ distributing over $\oplus$, $\mathbbold{0}$ the identity of $\oplus$, $\mathbbold{1}$ likewise of $\otimes$, and element $\mathbbold{0}$ anihilates all elements of $K$ when being combined with $\otimes$. The information encoded in the annotation depends on the underlying semiring of the relation.
As noted in \cite{DBLP:conf/pods/GreenKT07}, the $\mathbb{N}[\vct{X}]$-semiring produces polynomial values, whose variables can then be substituted with $K$-values from other semirings, evaluating the operators with the operators of the substituted semiring, to produce varying semantics such as set, bag, and security annotations.
\OK{The first occurrence of ``produces'' in this sentence is the wrong word. $\mathbb{N}[\vct{X}]$ is the set of all polynomials. There is a semiring defined over this set.}
Note that $\mathbb{N}[\vct{X}]$ databases are effectively C-tables, since all first order formulas can be lifted to polynomials, where disjunction is equivalent to the addition operator and conjunction is equivalent to the multiplication operator, and in boolean semantics, negation of variable $x$ can be easily translated into $(1 - x)$.
\OK{lifting is not the right word here. Suggest "When used with $\mathbb B$-typed variables, an N[X] relation is effectively a C-Table."}
This would correspond to substituting values and operators from the $\{\mathbb{B}, \vee, \wedge, \bot, \top\}$ semiring.
As noted in \cite{DBLP:conf/pods/GreenKT07}, the $\mathbb{N}[\vct{X}]$-semiring is a semiring over the set $\mathbb{N}[\vct{X}]$ of all polynomials, whose variables can then be substituted with $K$-values from other semirings, evaluating the operators with the operators of the substituted semiring, to produce varying semantics such as set, bag, and security annotations.
%A nice alternative perspective
%Intuitively, one can think of $\idb$ as a parameterized database, whose abstract form maps to each deterministic $\db_i \in \idb$.
When used with $\mathbb B$-typed variables, an $\mathbb{N}[\vct{X}]$ relation is effectively a C-Table, since all first order formulas can be equivalently modeled by polynomials, where disjunction is equivalent to the addition operator and conjunction is equivalent to the multiplication operator, and in boolean semantics, negation of variable $x$ can be easily translated into $(1 - x)$.
This would correspond to substituting values and operators from the $\{\mathbb{B}, \vee, \wedge, \bot, \top\}$ semiring.
Further define $\nxdb$ as an $\mathbb{N}[\vct{X}]$ database where each tuple $\tup \in \db$ is annotated with a polynomial over variables $X_1,\ldots, X_M$ for some value of $M$ that will be specified later.
Since $\nxdb$ is a database that maps tuples to polynomials, it is customary for arbitrary table $\rel$ to be viewed as a function $\rel: \tset \mapsto \mathbb{N}[\vct{X}]$, where $\rel(\tup)$ denotes the polynomial mapped to tuple $\tup$.
\OK{Limiting the left hand side to only the tuples in D is insufficient, as queries may produce new tuples that were not in the original database. Perhaps redefine $\tset$ as the set of all tuples?}
It has been shown in previous work that commutative semirings precisely model translations of RA+ query operations to set annotations. Since $\nxdb$ is an $\mathbb{N}[\vct{X}]$ database,recall then that we are working with the commutative semiring $\{\mathbb{N}[\vct{X}], +, \times, 0, 1\}$.
\OK{This last sentence is largely repeating the last sentence of the prior paragraph.}
It has been shown in previous work that commutative semirings precisely model translations of RA+ query operations to set annotations.
The evalution semantics notation $\llbracket \cdot \rrbracket = x$ simply mean that the result of evaluating expression $\cdot$ is given by following the semantics $x$. Given a query $\query$, operations in $\query$ are translated into the following polynomial operations.
\begin{align*}
@ -56,16 +46,13 @@ The evalution semantics notation $\llbracket \cdot \rrbracket = x$ simply mean t
&\eval{R}(\tup) = &&\rel(\tup)
\end{align*}
Query operations are translated into one of the two semiring operators, with $\project$ and $\union$ of agreeing tuples being the equivalent of the '+' opertator in polynomial $\poly$, $\join$ translating into the $\times$ operator, and finally, $\select$ is modeled as a function that returns either $\rel(\tup)$ or $0$ based on some predicate.
\OK{Translated isn't the word I'd use here. These semantics show how to obtain the annotation on a tuple in the result of the query from the annotations on tuples in the input to the query.}
The above semantics show us how to obtain the annotation on a tuple in the result of q query $\query$ from the annotations on the tuples in the input of $\query$.
\subsection{Defining the Data}
In the general case, the binary value of $\vct{w}$ uniquely identifies a potential possible world. For example, consider the case of the Tuple Independent Database $(\ti)$ data model in which each table is a set of tuples, each of which are independent of one another, and individually occur with a specific probability $\prob_\tup$. Because of independence, a $\ti$ with $\numTup$ tuples naturally has $2^\numTup$ possible worlds, thus $\numTup = M$, and each $\vct{w} \in \{0, 1\}^M$ is indeed a possible world. However in the Block Independent Disjoint data model, because of the disjoint condition on tuples within the same block, it is not the general case that every element $\vct{w} \in \{0, 1\}^M$ is in fact a possible world.
\OK{This may be nitpicking, but I don't see how this follows. Is the implication that a BIDB may not give you exactly $2^M$ possible worlds? If so, say that, and be clear that you can assign make the probability of some $\vct{w}$s to 0.}
Denote a random world (according to distribution $P$) to be $\rw$. Provided that for any non-possible world $\vct{w} \in \{0, 1\}^M, \pd[\rw = \vct{w}] = 0$, then, a probability distribution over $\{0, 1\}^M$ implies a distribution over $\Omega$, which we have already defined as $\pd$.
\OK{Denote a random variable selecting a world according to...?}
In the general case, the binary value of $\vct{w}$ uniquely identifies a potential possible world. For example, consider the case of the Tuple Independent Database $(\ti)$ data model in which each table is a set of tuples, each of which are independent of one another, and individually occur with a specific probability $\prob_\tup$. Because of independence, a $\ti$ with $\numTup$ tuples naturally has $2^\numTup$ possible worlds, thus $\numTup = M$, and each $\vct{w} \in \{0, 1\}^M$ is indeed a possible world. However in the Block Independent Disjoint data model (BIDB), because of the disjoint condition on tuples within the same block, a BIDB may not have exactly $2^M$ possible worlds. Such $\vct{w}$'s, that do not exist, are assigned a probability of $0$.
Denote a random variable selecting a world according to distribution $P$ to be $\rw$. Provided that for any non-possible world $\vct{w} \in \{0, 1\}^M, \pd[\rw = \vct{w}] = 0$, then, a probability distribution over $\{0, 1\}^M$ implies a distribution over $\Omega$, which we have already defined as $\pd$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This could be a way to think of world binary vectors in the general case
@ -82,9 +69,6 @@ One of the aggregates we desire to compute over the annotated polynomial is the
\[\expct_{\vct{\rw} \sim \pd}\pbox{\poly(\rw)} = \sum\limits_{\wVec \in \{0, 1\}^\numTup} \poly(\wVec)\cdot \pd[\rw = \vct{w}].\]
The $\ti$ model has features that we can exploit. Since the powerset of $[\numTup]$ is exactly $\wSet$, the bit-string world value $\vct{w}$ can be used as indexing to determine which tuples are present in the $\vct{w}$ world. Given an $\numTup$-sized vector $\vct{p}$, where the $i^{th}$ element, $\prob_i$ is the probability of the $i^{th}$ tuple, denote the vector $\vct{p}$ according to the probability distributation $\pd$ as $\pd^{(\vct{p})}$. We can then write an equivalent expectation for $\ti$ model,
If there are exactly $2^M$ possible worlds (e.g., as in a $\ti$), the bit-string world value $\vct{w}$ can be used as indexing to determine which tuples are present in the $\vct{w}$ world, where the $i^{th}$ bit position represents whether a tuple $\tup_i$ appears in the unique world identified by the binary value of $\vct{w}$. Given an $\numTup$-sized vector $\vct{p}$, where the $i^{th}$ element, $\prob_i$ is the probability of the $i^{th}$ tuple, denote the vector $\vct{p}$ according to the probability distributation $\pd$ as $\pd^{(\vct{p})}$. We can then write an equivalent expectation for $\ti$ model,
\[\expct_{\rw\sim \pd^{(\vct{p})}}\pbox{\poly(\rw)} = \sum\limits_{\wVec \in \{0, 1\}^\numTup} \poly(\wVec)\prod_{\substack{i \in [\numTup]\\ s.t. \wElem_i = 1}}\prob_i \prod_{\substack{i \in [\numTup]\\s.t. w_i = 0}}\left(1 - \prob_i\right).\]
\OK{isn't this restating the first paragraph? Suggest maybe simplifying the paragraph from a goal-oriented perspective. e.g., "We will use the binary value $\vec{w}$ to identify possible worlds. If there are exactly $2^M$ possible worlds (e.g., as in a TIDB)... " (sidenote: binary value suggests exactly 2 possible values)}