Chao Xu
Professor at UESTC.
Ke Shi
Chao Xu
cxu@uestc.edu.cn
https://tcsuestc.com/
逻辑,组合优化,图论,机制设计,计算代数,实验算法,精确算法,分配机制,算法博弈论
Flash Memory Storage
state \(\in [\ell]=\{0,\ldots,\ell\}\)
cell stores a state
block \(\sim 10^6\) cells
Operations
increase a state
= single cell update
set a state to 0
= clear entire block
write \(10^6\) cells
Cell stores a value in \(\N\)
- Read: read the number in the cell
- Increase: increase the cell by a number in \([\ell]\)
\(\Z_n=\{0,1,2,\ldots,n-1\}\)
1 update = 1 cell increase
Store a number in \(\Z_n\)
Store a number in \(\Z_n\)
store \(y\in \Z_n\) by storing \(x\in \N^t\)
\(s\in \Z_n^t\) a fixed vector
\(2\)
\(4\)
\(3\)
\(1\)
\(D(x) = (1,2,3,4) ·(1,7,2,9)\pmod{12} =9\)
Example:
Cell storage
1 update = 1 cell increase
\(D(x) = (1,2,3,4) ·(1,7,2,9)\pmod{12} =9\)
Example:
\(D(x) = (1,2,{\color{red}5},4) ·(1,7,2,9)\pmod{12} ={\color{red}1}\)
\(2\)
\(4\)
\(3\)
\(1\)
\(5\)
1 increase per update is possible if and only if
Cell storage
\(t\) should be as small as possible to save space
For a fixed \(\ell\) and \(n\), how large must \(t\) be?
1 increase per update is possible if and only if
1 update = 1 cell increase
\(B\subseteq \mathbb{Z}_n\) is a \(\ell\)-covering of \(U\),
If \(U\subseteq \bigcup_{i\in B} S_i^{\ell}\)
We omit \(\ell\) when it is clear
A segment of length \(\ell\) with slope \(i\).
Find a small \(\ell\)-covering \(B\subseteq \mathbb{Z}_n\)
\(n=7, \ell=3\)
\(S_1\)
\(S_3\)
\(S_4\)
\(\mathbb{Z}_n\)
\(S_2\)
\(S_5\)
\(S_6\)
\(1\)
\(4\)
\(6\)
\(0\)
\(1\)
\(3\)
\(5\)
\(0\)
\(1\)
\(4\)
\(5\)
\(0\)
\(3\)
\(2\)
\(6\)
\(0\)
\(2\)
\(4\)
\(6\)
\(0\)
\(1\)
\(3\)
\(2\)
\(0\)
\(1\)
\(3\)
\(2\)
\(4\)
\(5\)
\(6\)
\(0\)
\(S_0\)
\(0\)
\(n=7, \ell=3\)
\(\mathbb{Z}_n\)
\(1\)
\(4\)
\(5\)
\(0\)
\(3\)
\(2\)
\(6\)
\(0\)
\(1\)
\(3\)
\(2\)
\(4\)
\(5\)
\(6\)
\(0\)
\(B=\{3,4\}\)
\(B\)
\(S_3\)
\(S_4\)
Find a small \(\ell\)-covering \(B\subseteq \mathbb{Z}_n\)
\(n=7, \ell=3\)
\(\mathbb{Z}_n\)
\(1\)
\(4\)
\(5\)
\(0\)
\(3\)
\(2\)
\(6\)
\(0\)
\(1\)
\(3\)
\(2\)
\(4\)
\(5\)
\(6\)
\(0\)
\(f(n,\ell)\) is the size of the smallest \(\ell\)-covering of \(\mathbb{Z}_n\).
\(f(7,3)\leq |B| = 2\)
\( 2 = \left\lceil \frac{7-1}{3} \right\rceil \leq \)
\(B=\{3,4\}\)
Find a small \(\ell\)-covering \(B\subseteq \mathbb{Z}_n\)
Combinatorial: What is the correct bound for \(f(n,\ell)\)?
Algorithmic: How to find a small \(\ell\)-covering?
\(f(n,\ell)=\left\lceil \frac{n-1}{\ell} \right\rceil\)?
No.
\(f(16,5)>3=\lceil \frac{16-1}{5}\rceil\)
Klove et. al. multiple papers in the 2010s: \(f(n,\ell)\) for \(\ell=2,3,4\), and when \(n\) and \(\ell\) are very special
\(f(n,\ell) = O(\frac{n}{\ell}\log n\log \log n)\)
if \(\ell\) is neither too small nor too large
Koiliaris & Xu 2019, construction time \(O(n\ell)\)
Chen et. al. 2013: \(f(n,\ell) \leq \frac{n^{1+o(1)}}{\sqrt{\ell}}\), similar construction time
\(f(n,\ell) = O(\frac{n}{\ell}\log n)\)
A \(f(n,\ell)\log n\) size \(\ell\)-covering can be found in time
\(\tilde{O}(\frac{n}{\ell}) + n^{o(1)}\)
There exist examples where
\(f(n,\ell)=\Omega(\frac{n}{\ell}\frac{\log n}{\log \log n})\)
\(f(n,\ell) = O(\frac{n}{\ell}\log n)\)
There exist examples where
\(f(n,\ell)=\Omega(\frac{n}{\ell}\frac{\log n}{\log \log n})\)
A \(f(n,\ell)\log n\) size \(\ell\)-covering can be found in time
\(\tilde{O}(\frac{n}{\ell}) + n^{o(1)}\)
\(f(n,\ell) = O(\frac{n}{\ell}\log n)\)
* \(\ell\) is not too small and not too large.
*
A more refined analysis of \(\varphi(n,\ell)\).
A more refined analysis of covering.
Semigroup \((S,\diamond)\), \(A,B\subseteq S\). \(A\diamond B = \{a\diamond b | a\in A, b\in B\}\). \(B\) is an \(A\)-covering, if \(A\diamond B = S\).
Theorem Bollobas et. al. 2009
Let \(G\) be a group, for any \(A\subseteq G\), there is an \(A\)-covering of size \(\frac{|G|}{|A|}(\log |A|+1)\).
\((\Z_{2n},\cdot)\), \(A=\{2,4,6,\ldots,2n\}\). No \(A\)-covering exists.
Our problem \(S=\Z_n\), \(\diamond = \cdot\), \(A = [\ell]\)
Given \(\mathcal{S} \subseteq 2^U\).
A collection of sets in \(\mathcal{S}\) covers \(U\) is a set cover.
Formally, if \(\mathcal{S}'\subseteq \mathcal{S}\) such that \(U= \bigcup_{X\in \mathcal{S}'} X\), then \(\mathcal{S}'\) is a set cover of \(U\).
\(\ell\)-covering as set cover
\(U=\Z_n\)
\(S_i=\{ij\pmod{n}|j\leq\ell\}\)
\(\mathcal{S}=\{S_i|i\in\Z_n\}\)
An algebraic special case
(naively) apply to \(\ell\)-covering?
\(p\) a large prime, \( n=2p, \ell=p-1\). \(p\) only covered by \(S_p\).
Idea: Reduce to group case
\((\Z^*_n,\cdot)\) forms a group. Find \(([\ell]\cap \Z^*_n)\)-covering of \(\Z^*_n\).
\(f^*(n,\ell)\) the smallest \(\ell\)-covering of \(\Z^*_n\) such that all segments has slope in \(\Z^*_n\).
When \(\ell = n^{\Omega(\frac{1}{\log \log n})}\)
Constant \(c \geq 1\)
\(\pi(\ell)\geq c_1\frac{\ell}{\log \ell}\) (Prime Number Theorem)
\(\omega(n)\leq c_2\frac{\log n}{\log \log n}\).
\(\omega(n)\leq \frac{\pi(\ell)}{2} \) if \(\ell \geq c\log n\) for sufficiently large \(n\).
\(\pi(n)\): number of primes no larger than \(n\)
\(\omega(n)\): number of distinct prime factors of \(n\)
Using the fact about \(\varphi(n,\ell)\).
When \(\ell = n^{\Omega(\frac{1}{\log \log n})}\)
We can cover \(\mathbb{Z}_{n,d}\) with \(f^*(\frac{n}{d},\ell) \) segments in \(\mathbb{Z}_{n,d}\).
We can cover \(\mathbb{Z}_n^*\) with \(f^*(n, \ell)\) segments in \(\mathbb{Z}_n^*\).
\(\mathbb{Z}_n\)
We can cover \(\mathbb{Z}_{n,d}\) with \(f^*(\frac{n}{d},\ell) \) segments in \(\mathbb{Z}_{n,d}\).
\(\mathbb{Z}_n\)
\(d \mid x\)
We can cover \(\mathbb{Z}_n^*\) with \(f^*(n, \ell)\) segments in \(\mathbb{Z}_n^*\).
We can cover \(\mathbb{Z}_{n,d}\) with \(f^*(\frac{n}{d},\ell) \) segments in \(\mathbb{Z}_{n,d}\).
\(\mathbb{Z}_n\)
\(d \mid x\)
\(\mathbb{Z}_{n,d}\)
We can cover \(\mathbb{Z}_n^*\) with \(f^*(n, \ell)\) segments in \(\mathbb{Z}_n^*\).
We can cover \(\mathbb{Z}_{n,d}\) with \(f^*(\frac{n}{d},\ell) \) segments in \(\mathbb{Z}_{n,d}\).
\(\mathbb{Z}_n\)
\(d \mid x\)
\(\mathbb{Z}_{n,d}\)
\(\mathbb{Z}^{*}_{\frac{n}{d}}\)
We can cover \(\mathbb{Z}_n^*\) with \(f^*(n, \ell)\) segments in \(\mathbb{Z}_n^*\).
Cover of \(\Z^*_\frac{n}{d}\) using \(\Z^*_{\frac{n}{d}}\) lifts to a cover of \(\Z_{n,d}\) using \(\Z_{n,d}\)
When \(\ell = n^{\Omega(\frac{1}{\log \log n})}\)
When \(\ell = n^{\Omega(\frac{1}{\log \log n})}\)
Dominates when \(n\) is large
Using \(\Z^*_n\) to cover \(\Z_{n,d}\) for many \(d\)
A better estimate for \(\varphi(n,\ell)\) using sieve theory
Larger Cover
\(\ell = 4\)
\(g(n,\ell)\) the smallest \(\ell\)-covering of \(\bigcup_{d|n,d\leq \ell'} \Z_{n,d}\) such that all segments has slope in \(\Z^*_n\).
\(\mathbb{D}_n\) be the set of divisors of \(n\).
\((\mathbb{D}_n,\odot)\), where \(a\odot b = \gcd(ab,n)\).
Let \(A = \{i \mid i\in \mathbb{D}_n, i\leq \ell'\}\).
Find a \(A\)-covering \(B\) so the sum is small.
If \(B\) is an \(A\)-covering of \(\mathbb{D}_n\), then
\(B = \{1\}\cup (\mathbb{D}_n\setminus A)\)
# of divisors
larger than \(\ell'\)
\(\ell\) is small: \(\ell=n^{1-\Omega(\frac{1}{\log \log n})}\)
\(B = \mathbb{D}_m\) for some \(m|n\) and \(m\geq \frac{n}{\ell'}\)
\(\sigma(m) = O(m)\)
If
\(B = \mathbb{D}_m\) for some \(m|n\) and \(m\geq \frac{n}{\ell'}\)
Theorem
There exists a \(m|n\) such that \(m = n^{\Omega(\frac{1}{\log \log \log n})}\) and \(\sigma(m)=O(m)\).
Such \(B\) exists when \(\ell\) is large: \(\ell = n^{1-O(\frac{1}{\log \log \log n})}\)
\(\sigma(m) = O(m)\)
and
Conjecture: \(f(n,\ell) = O(\frac{n}{\ell}\log \ell)\) if \(\ell = \Omega(\log n)\)
What about \(\ell\)-covering of arbitrary set \(X\subseteq \Z_n\)?
Other interesting semigroups, e.g. \(\Z_n\times \Z_m\).
Conjecture:
Thank you
Limited-magnitude errors:
Jiang A., Langberg M., Schwartz M., Bruck J.: Trajectory codes for flash memory. IEEE Trans. Inf. Theory 59(7), 4530–4541 (2013).
Sieve theory:
Alina Carmen Cojocaru, M Ram Murty, et al. An introduction to sieve methods and their applications, volume 66. Cambridge University Press, 2006.
References
If \(d|n\), then \(d=d_1d_2\), where \(d_1|m\), and \(d_2\leq \ell'\).
How large is \(d(m)\)?
\(f(n,\ell) = O(\frac{n}{\ell}\log n\log \log n)\)
\(f(n,\ell) = O(\frac{n}{\ell}\log n\log \log n)\)
\(f(n,\ell) = O(\frac{n}{\ell}\log n)\)
Better choice of \(m\)
Alternative choice of divisor cover
A \(O(f(n,\ell)\log n)\) size \(\ell\)-covering can be found in time
\(\tilde{O}(\frac{n}{\ell}) + n^{o(1)}\)
Symmetric LP
Randomized rounding
Sampling
Input size: \(O(n^2)\). \(n\) variables and \(n\) constraints.
Certain permutation of variables does not change the LP.
\(\textbf{fesible}\) \(\xRightarrow[\textbf{ }]{}\) \({}\textbf{fesible}\)
\(\textbf{c}\cdot\textbf{x}\) \(\xRightarrow[\textbf{ }]{\textbf{same value}}\) \(\textbf{c}\cdot\pi\textbf{ x}\)
\(G\)-symmetric LP
Example:
\(S_n\)-symmetric LP
\(G\)-symmetric LP has a \(G\)-symmetric optimum.
Optimum
\(G\)-symmetric optimum
Let \(G\) be a permutation group that consists of all permutations that swaps \(i\) and \(j\) if \(\gcd(i,n)=\gcd(j,n)\). LP is \(G\)-symmetric.
Replace each \(x_i\) with \(y_d\) where \(\gcd(i,n)=d\)
We have only \(d(n)\) variables.
We have only \(d(n)\) variables and inequalities.
Let \(u_d=\varphi(n/d)y_d\), We have the following concise form.
\(\underline{\textbf{Cover}(n,\ell)}\)
compute the prime factorization of \(n\)
compute \(\varphi(n/c,d\ell/c)\) and \(\varphi(n/c)\) for all \(d|c|n\)
compute the optimum for \(\mathrm{LP}^*\)
\(C\leftarrow \empty\)
repeat \(4\log{n}\) times
for \(d|n\):
if \(u_d\geq1\):
\(C\leftarrow C\cup (S\sim {\Z_{n,d}\choose \lceil u_d \rceil})\)
else if \(u_d > (x\sim[0,1])\):
\(C\leftarrow C\cup (S\sim {\Z_{n,d}\choose 1})\)
return \(C\)
Sample ~\(\mathbb{E}[u_d]\)
distinct elements
from \(\Z_{n,d}\)
Construct and solve the LP
If \(k<\frac{\varphi(n)}{2}\). Sample a random element \(x\sim \Z_n\), if \(x\in\Z_n^*\) and we hasn't get enough elements, pick it. Repeat at most \(8k \log(n)\) times.
The runing time of the algorithm is \(O(k \mathrm{polylog}(n))\) and by Chernoff bound the success probability \(\geq 1-\frac{1}{n}\).
If \(k\geq \frac{\varphi(n)}{2}\), then find all elements in \(\Z_n^*\) by brute force and pick \(k\) from it.
Theorem: There is an algorithm which successfully returns \(X\sim {\Z^*_n \choose k}\) in \(\tilde{O}(k)\) time with probability at least \(1-\frac{1}{n}\).
\(\underline{\textbf{Cover}(n,\ell)}\)
compute the prime factorization of \(n\)
compute \(\varphi(n/c,d\ell/c)\) and \(\varphi(n/c)\) for all \(d|c|n\)
compute the optimum for \(\mathrm{LP}*\)
\(C\leftarrow \empty\)
repeat \(4\log{n}\) times
for \(d|n\):
if \(u_d\geq1\):
\(C\leftarrow C\cup (S\sim {\Z_{n,d}\choose \lceil u_d \rceil})\)
else if \(u_d > (x\sim[0,1])\):
\(C\leftarrow C\cup (S\sim {\Z_{n,d}\choose 1})\)
return \(C\)
\(\tilde{O}(u_d) \)
\(n^{o(1)}\)
\(\tilde{O}(\sum_{d} u_d) = \tilde{O}(f(n,\ell))\)
Theorem:
The algorithm takes \(\tilde{O}(f(n,\ell)) + n^{o(1)}\) time and computes an expected size \(f(n,\ell)\log n\) \(\ell\)-covering set with constant probability.
By Chao Xu