Skip to content

Commit

Permalink
subset sums set
Browse files Browse the repository at this point in the history
  • Loading branch information
piniom committed Jun 13, 2024
1 parent 73846fe commit 5d56159
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
6 changes: 6 additions & 0 deletions paper/sections/01_introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ \subsection{\ApxPartition Problem:}
\text{OPT} := \max_{J \subseteq [n]} \left\{ \sum_{j \in J} x_j \, \bigg| \, \sum_{j \in J} x_j \leq \frac{1}{2} \sum_{i \in [n]} x_i \right\}.
\]

% The subset sum set of a multiset \(X \subseteq \mathbb{N}\) is defined as
% \[
% S(X) := \left\{ \sum_{x \in J} x \mid J \subseteq X \right\}.
% \]


\subsection{Complexity}
The algorithm described in \cite{deng} runs in \(\tildeO(n + \sqrt{n}/\varepsilon)\) time where \(n\) is the size of the input list and \(\varepsilon\) is the desired approximation factor. $\tildeO$ denotes the \textit{soft-O} notation, that ignores polylogarythimc factors.

Expand Down
37 changes: 28 additions & 9 deletions paper/sections/02_outline.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
\section{Alghoritm outline}
The idea of the alhoritm relies on a simple fact that if we were able to obtain a precise enough approximation of the power set of the input list we would immediately be able to solve the \Partition problem. The idea is to start approximating subset sum sets of small subsets and build our way by merging them. Eventually we will obatin the final approximation, hopefully without loosing to much precision. Let's first understand the concept of a \textit{set approximation}.

\subsection{Sumsets}
The algorithm revolves around taking the sum of elements in a set and finding all possible sums in the family of subsets of the set. Let's introduce these concpets, that will be used extensively in the following sections.
\subsubsection{Sum of elements in a multiset}
For a multiset \( Y \subseteq \mathbb{N} \), let \( \Sigma(Y) = \sum_{y \in Y} y \) denote the sum of its elements (without removing duplicates).
\subsubsection {Set of subset sums}
For a multiset \( X \subseteq \mathbb{N} \), let
\[
\mathcal{S}(X) = \{ \Sigma(Y) : Y \subseteq X \}
\] be the set of its subset sums, and let
\[
\mathcal{S}(X; t) = \mathcal{S}(X) \cap [0, t]
\] be the set of its subset sums up to \( t \). \\

The idea of the alhoritm relies on a simple fact that if we were able to obtain a precise enough approximation of the set of subset sums of the input list we would immediately be able to solve the \Partition problem. The idea is to start approximating subset sum sets of small subsets and build our way by merging them. Eventually we will obatin the final approximation, hopefully without loosing to much precision. Let's first understand the concept of a \textit{set approximation}.
\subsection{Set approximation}
An aproximation of a set is another set that for every element in the original set there is an element in the approximation that is close enough to the original element and vice versa. \\ \\
The following is the \textit{Definition 2.3} from \cite{deng}. \\
For integer sets \(A, B \subseteq \mathbb{N}\), and real numbers \(t, \Delta \in \mathbb{R}_{\geq 0}, \delta \in [0, 1)\), we say that \(A\) is a \((1 - \delta, \Delta)\) approximation of \(B\) up to \(t\), if
\begin{enumerate}
Expand All @@ -13,16 +28,20 @@ \subsection{Set approximation}
\\ \\
The \((1, \Delta)\) approximation is also reffered to as a \(\Delta\)-additive approximation, and the \((1 - \delta, 0)\) approximation is referred to as a \((1 - \delta)\)-multiplicative approximation, or simply a \((1 - \delta)\) approximation.\\

\subsection{Subset Sum Set}
The subset sum set of a set \(X \subseteq \mathbb{N}\) is defined as
\[
S(X) := \left\{ \sum_{x \in J} x \mid J \subseteq X \right\}.
\]

\subsection{Merging Subset Sum Sets}

In order to advance the approximation of the subset sum set of the input list, we need to merge the approximations of the subset sum sets of smaller subsets. The following proposition is a key to the algorithm.
In order to advance the approximation of the subset sum set of the input list, we need to merge the approximations of the subset sum sets of smaller subsets. The following simple proposition is a key to the algorithm.

\paragraph{Notation:}
\(X_1 \uplus X_2\) denotes the union of the two multisets with repetitions. For example, when \(X_1 = \{1, 2\}\) and \(X_2 = \{2, 3\}\) then \(X_1 \uplus X_2 = \{1, 2, 2, 3\}\).


\subsubsection{\textit{Proposition 2.4} in \cite{deng}}

For \(i \in \{1, 2\}\), suppose \(A_i\) is a \((1 - \delta, \Delta_i)\) approximation of \(S(X_i)\) up to \(t\). Then, \((A_1 + A_2) \cap [0, t]\) is a \((1 - \delta, \Delta_1 + \Delta_2)\) approximation of \(S(X_1 \uplus X_2)\) up to \(t\). Where

\paragraph{Proposition 2.4 in \cite{deng}}
For now let's not dive into how exactly the merge will be performed

For \(i \in \{1, 2\}\), suppose \(A_i\) is a \((1 - \delta, \Delta_i)\) approximation of \(S(X_i)\) up to \(t\). Then, \((A_1 + A_2) \cap [0, t]\) is a \((1 - \delta, \Delta_1 + \Delta_2)\) approximation of \(S(X_1 \uplus X_2)\) up to \(t\). Where \(X_1 \uplus X_2\) denotes the union of the two sets with repetitions.
\subsection{Algorithm outline}
Note that \( S(\{x\}) = \{0, x\}\).

0 comments on commit 5d56159

Please sign in to comment.