Sunday, 23 February 2014

co.combinatorics - Existence of a zero-sum subset

For every finite set of real numbers, $S ={a_1,a_2,...,a_n}$ which satisfies the condition of the problem, there corresponds a directed graph $G_S$ with the following construction:



Each element of $S$ is associated with a vertex in $G_S$, according to the rule that if $a_i in S $ then $ V_i in G_S$. A vertex $V_i in G_S$ is connected to another vertex $V_k in G_S$ by an edge $E_j$ if and only if $a_i + a_j = a_k$. Clearly, the existence of a closed cycle in $G_s$ with no repeat edges corresponds to a zero sum subset of $S$.



A useful fact, which I refer to as the "vertex replacement trick", is that if $V_i rightarrow(E_j)rightarrow V_k$, then by the defining property of $S$, we also have $V_j rightarrow(E_i)rightarrow V_k$.



I will say that a path $P$ is "well behaved" if no index of $S$ appears more than once in $P$, unless it occurs in an adjacent vertex/edge pair of the form $ cdots rightarrow V_i rightarrow (E_i) rightarrow cdots$



Choose an arbitrary vertex $V_a in G_S$, and choose an arbitrary incoming edge to $V_a$, say $E_b$. Then the initial path is:



$$P=V_c rightarrow (E_b) rightarrow V_a $$



Unless $0 in S$, then every possible initial path is well behaved.



Add one vertex/edge pair to $P$, if $P$ is still well behaved then repeat until it is not. Due to the defining property of $S$, it's always possible to find another vertex to add to any given path, and since $S$ is finite, this process must eventually terminate.



$Claim:$ If $P$ is well behaved, but $P'=V_y rightarrow (E_x) rightarrow P$ is not, then $P'$ either contains a closed cycle with no repeat edges, or it can be transformed into one that does by applying the vertex replacement trick.



$Proof:$ If the index $x$ does not appear in $P$ but $y$ does, then we can use the vertex replacement trick to ensure that $V_y in P$, and thus obtain a closed cycle, which by virtue of $P$ being well behaved, is guaranteed to have no repeat edges:



$$V_y rightarrow E_x rightarrow cdots rightarrow V_y$$



If the index $y$ does not appear in $P$ but $x$ does, then similarly, we use the vertex replacement trick to obtain:



$$V_x rightarrow E_y rightarrow cdots rightarrow V_x$$



In the case that $x=y$, we obtain:



$$V_x rightarrow E_x rightarrow cdots rightarrow V_x$$



Otherwise, in the case that the indices $x$ and $y$ both appear in $P$, choose the element with index of $x$ or $y$ which occurs first in $P$, and if that element is an edge, turn it into a vertex using the trick. Then remove all the elements of $P$ which occur after that vertex, and return to one of the previous cases where only one of the indices appears in $P$.



EDIT: This is a massive update/rewrite of an unfinished answer of mine from years ago. My apologies if this makes the old comments no longer relevant.

No comments:

Post a Comment