Ke Shi
Chao Xu
Flash Memory Storage
state \(\in \{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
Abstract memory cell (AMC): stores a value in \(\N\)
- Read: read the number in the cell
- Update: increase the cell by a number in \(\{0,\ldots,\ell\}\)
\(\Z_n=\{0,1,2,\ldots,n-1\}\)
1 rewrite = 1 AMC update
Store a number in \(\Z_n\) use AMCs
Store a number in \(\Z_n\) use AMCs
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:
AMC storage
1 rewrite = 1 AMC update
\(D(x) = (1,2,3,4) ·(1,7,2,9)\pmod{12} =9\)
Example:
AMC storage
\(D(x) = (1,2,{\color{red}5},4) ·(1,7,2,9)\pmod{12} ={\color{red}1}\)
\(2\)
\(4\)
\(3\)
\(1\)
\(5\)
1 AMC update per rewrite is possible if and only if
1 rewrite = 1 AMC update
1 AMC update per rewrite is possible if and only if
\(t\) should be as small as possible to save space
For a fixed \(\ell\) and \(n\), how large must \(t\) be?
\(A\subseteq \mathbb{Z}_n\) is a \(\ell\)-covering of \(U\),
If \(U\subseteq \bigcup_{i\in A} S_i^{\ell}\).
\(U=\Z_n\) most of the time.
We omit \(\ell\) when it is clear
A segment of length \(\ell\) with slope \(i\).
Find a small \(\ell\)-covering \(A\subseteq \mathbb{Z}_n\)
\(n=7, \ell=3\)
\(S_1\)
\(S_3\)
\(S_4\)
\(\mathbb{Z}_n\)
\(S_2\)
\(S_5\)
\(S_6\)
\(5\)
\(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\)
\(A=\{3,4\}\)
\(A\)
\(S_3\)
\(S_4\)
Find a small \(\ell\)-covering \(A\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 |A| = 2\)
\( 2 = \left\lceil \frac{7-1}{3} \right\rceil \leq \)
\(A=\{3,4\}\)
Find a small \(\ell\)-covering \(A\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\)
Chen et. al. 2013: \(f(n,\ell) \leq \frac{n^{1+o(1)}}{\sqrt{\ell}}\)
\(f(n,\ell) = O(\frac{n}{\ell}\log n\log \log n)\)
if \(\ell\) is neither too small nor too large
Koiliaris & Xu 2019
\(f(n,\ell) = O(\frac{n}{\ell}\log n\log \log n)\)
A \(O(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\log \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.
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\).
\(f^*(n,\ell)\) the smallest \(\ell\)-covering of \(\Z^*_n\) such that all segments has slope in \(\Z^*_n\).
Covering \(\Z_n^*\) with \(\Z_n^*\) slope segments
Every elment in \(\Z^*_n\) is covered by \(\varphi(n,\ell)\) segments with slope in \(\Z^*_n\).
Constants \(c,u\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)\).
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}\)
\(d(n) = n^{O\left(\frac{1}{\log \log n}\right)}\)
\(\sigma(n) = O(n\log \log n)\)
Desired bound unless \(\ell\) is too large.
Larger Cover
\(\ell = 4\)
Theorem:
If \(\ell\) is large, \(d\leq \ell'\), then each element in \(\Z_{n,d}\) is covered \(\Omega(\frac{\ell}{n}\varphi(n))\) times by segments with slope in \(\Z^*_n\).
Theorem:
If \(\ell\) is large, each element in \(\Z^*_n\) is covered \(\Omega(\frac{\ell}{n}\varphi(n))\) times by segments with slope in \(\Z^*_n\).
\(f^\dagger(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\).
What's the relation between \(f(n,\ell)\) and \(f^\dagger(n,\ell)\)?
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)\)
Better bound for \(f(n,\ell)\)?
What about \(\ell\)-covering of arbitrary set \(X\subseteq \Z_n\)?
Other interesting groups, e.g. \(\Z_n\times \Z_m\).
Integer programming form of set cover
A linear program is symmetric if there exists a permutation of variables, so the linear program does not change it's value.
\(\textbf{fesible}\) \(\xRightarrow[\textbf{ }]{}\) \({}\textbf{fesible}\)
\(\textbf{c}\cdot\textbf{x}\) \(\xRightarrow[\textbf{ }]{\textbf{same value}}\) \(\textbf{c}\cdot\pi\textbf{ x}\)
We call such a LP \(G\)-symmetric.
Let \(G\) be a permutation group that consists of all permutations that swaps \(i\) and \(j\) if \(\gcd(i,n)=\gcd(j,n)\). LP2 is \(G\)-symmetric.
We let \(y_d\) to represent all variables in \(\{x_i|\gcd(i,n)=d\}\).
If \(\gcd(a,n) = \gcd(b,n)\), then the constraints that covers \(a\) and \(b\) have same format since all variables \(y_d\) have same coffcients in inequalities \(a\) and \(b\).
We have only \(d(n)\) variables and inequalities now!
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{LP4}\)
\(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\)
taking \(O(f(n,\ell)\mathrm{ploylog}(n)) \) time
taking \(n^{o(1)}\) time
taking \(n^{o(1)}\) time
taking \(n^{o(1)}\) time
Theorem:
Algorithm before takes \(O(f(n,\ell)\mathrm{polylog} n + n^{o(1)})\) time and computes a expected size \(O(f(n,\ell)\log n)\) \(\ell\)-covering set in expectation with constant probability.
Theorem: There is an algorithm which successfully returns \(X\sim {\Z^*_n \choose k}\) in \(O(k \mathrm{polylog}(n))\) time with probability at least \(1-\frac{1}{n}\).
Time of constructing the LP.
Step 1. Finding the prime factorization of \(n\) takes \(n^{o(1)}\) time through general number field sieve.
Step 2. Computing all \(\varphi(n/c),c|n\) through \(\varphi(n)=n\prod_{p|n}(1-1/p)\) takes \(n^{o(1)}\) time.
Otherwise, \(k<\frac{\varphi(n)}{2}\). We will sample a random element \(x\sim \Z_n\), if \(x\in\Z_n^*\) and we hasn't get enough elements, pick it. Repeat it specific times.
We can show the runing time of the algorithm is \(O(k \mathrm{polylog}(n))\) and Chernoff bound can show the success probability at least \(1-\frac{1}{n}\).
Consider two cases. If \(k\geq \frac{\varphi(n)}{2}\), then find all elements in \(\Z_n^*\) by brute force and pick \(k\) from it.
Step 3. Computing all \(\varphi(n/c,d\ell/c),d|c|n\) through the inclusion-exclusion principle takes \(n^{o(1)}\) time.
The running time of computing \(\varphi(n,\ell)\) is \(\tilde{O}(2^{\omega(n)})=n^{O(\frac{1}{\log\log n})}=n^{o(1)}\). The number of all \((c,d)\) is also \(n^{o(1)}\).
The total time of sampling is :
\(O(\sum_{d|n}u_d \mathrm{polylog}n)=O(f(n,\ell)\mathrm{ploylog}(n)) \).
Combining all above, the algorithm takes \((O(f(n,\ell)\mathrm{ploylog}(n)+n^{o(1)})\) time.
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