Upload
michael-soltys
View
219
Download
0
Embed Size (px)
DESCRIPTION
Presentation at the International Workshop on Combinatorial Algorithms, IWOCA 2013.
Citation preview
Circuit complexity of shuffle
Michael Soltys
July 10, 2013
Shuffle - Soltys IWOCA 2013 Title - 1/12
Shuffle
w is a shuffle of x and y : Shuffle(x , y ,w)
x = 01101110
y = 10101000
w = 0110110011101000
w is a shuffle of x and y provided:
x = x1x2 · · · xk and y = y1y2 · · · ykand w obtained by “interleaving”:
w = x1y1x2y2 · · · xkyk .
Shuffle - Soltys IWOCA 2013 Definition - 2/12
Shuffle
w is a shuffle of x and y : Shuffle(x , y ,w)
x = 01101110
y = 10101000
w = 0110110011101000
w is a shuffle of x and y provided:
x = x1x2 · · · xk and y = y1y2 · · · ykand w obtained by “interleaving”:
w = x1y1x2y2 · · · xkyk .
Shuffle - Soltys IWOCA 2013 Definition - 2/12
Motivation
I Modelling and verification of concurrent systems
I Used in XML database systems for schema definitions
I Plan recognition
I Natural language processing
See http://bit.ly/17OD2md for more details
Shuffle - Soltys IWOCA 2013 Motivation - 3/12
Square Shuffle
w is a square provided it is equal to a shuffle of a x with itself, i.e.,∃x s.t. Shuffle(x , x ,w).
The string w = 0110110011101000 is a square:
w = 0110110011101000
andx = 01101100 = 01101100
Shuffle - Soltys IWOCA 2013 Square Shuffle - 4/12
given an alphabet Σ, |Σ| ≥ 7,
Square = {w : ∃x Shuffle(x , x ,w)}
is NP-complete; see http://arxiv.org/abs/1211.7161
What we leave open:
I What about |Σ| = 2 (for |Σ| = 1, Square is just the set ofeven length strings)
I What about if |Σ| =∞ but each symbol cannot occur moreoften than, say, 6 times (if each symbol occurs at most 4times, Square can be reduced to 2-Sat – see P. AustrinStack Exchange post http://bit.ly/WATco3)
Shuffle - Soltys IWOCA 2013 Square Shuffle - 5/12
Upper Bound
Shuffle(000, 111, 010101)
Shuffle(011, 011, 001111)
Based on Mansfield’s algorithm, Shuffle ∈ NL
Shuffle - Soltys IWOCA 2013 Upper bound - 6/12
Circuits
5.1. BASIC RESULTS AND DEFINITIONS 67
¬
OO
_
OO
^
OO
^
OO
GG
¬
??
¬
__
>> `` OO
66
OO
KK
Figure 1. Using de Morgan and replicating gates.
_
OO
_
OO
^
??
^
__GG WW
OO OO
Figure 2. Putting And gates on the wires of an Or.
Proof. Let an�1, . . . , a0, bn�1, . . . , b0 be the two inputs (n-bit integers, wherea0, b0 are the least significant bits).
Algorithm 5.8 (Classical Binary Addition).On input an�1 . . . a0 and bn�1 . . . b0
1. y0 := a0 � b0
2. carry0 := a0 ^ b0
3. for i = 1, . . . , n� 14. yi := ai � bi � carryi�1
5. carryi := (ai ^ bi) _ (ai ^ carryi�1) _ (bi ^ carryi�1)6. yn := carryn�1
Suppose we were to implement the classical algorithm with a circuit. Since carryi
depends on carryi�1, the depth of the resulting circuit would be at least O(n), andhence not an AC0 circuit.
Instead, note that the i-th bit of the sum is ai � bi � carryi, where carryi is thecarry bit left over after summing the (i�1) first bits. Compute carryi diÄerently; notethat the i-th carry is 1 iÄ 9j 2 {0, . . . , i�1} such that aj^bj and 8k 2 {j+1, . . . , i�1}
Shuffle - Soltys IWOCA 2013 Upper bound - 7/12
Suppose that we want a family of circuits that recognize{1n : n ∈ N} ⊆ {0, 1}∗.
4x x x x x x x x x x1 21 1 12 23 3
I.e., it can be done with a ciruit family {Ci} where |Ci | ≤ 1 (anddepth 1), and hence in AC0.
Shuffle - Soltys IWOCA 2013 Upper bound - 8/12
By results of Sudborough & Venkateswaran:
NL ⊆ SAC1 ⊆ AC1
Shuffle - Soltys IWOCA 2013 Upper bound - 9/12
Lower Bound
#(x)s be the number of occurrences of a symbol s in the string x .
Shuffle(0#(x)0 , 1#(x)1 , x) is always true.
Parity(x) =∨
0 ≤ i ≤ |x |i is odd
Shuffle(0|x |−i , 1i , x),
Shuffle - Soltys IWOCA 2013 Lower bound - 10/12
n−i
i=1 i=3 i=5 i=n
0 x 1 1 10 0 0x x x1ii n−i i in−i n−i
Shuffle - Soltys IWOCA 2013 Lower bound - 11/12
By the famous result of Furst, Saxe, Sipser, Parity 6∈ AC0.
Therefore Shuffle 6∈ AC0.
Shuffle - Soltys IWOCA 2013 Lower bound - 12/12