git @ Cat's Eye Technologies
Import of XigXag version 1.0 revision 2011.1214. catseye 10 years ago
1 changed file(s) with 77 addition(s) and 74 deletion(s).
 0 0 1 1 2 2 3 3 4 The Xigxag Automaton 5 6 19 4 5 The Xigxag Automaton 6 7 8 9 10 20 23 21 24 22 25 107 110 be gentle. Anyway, you can just skip it if you don't dig proofs.)

108 111 109 112

To show this, I'm going to split the theorem into two parts: Xigxag has growth almost everywhere, 110 and the magnitude of that growth is always Ω(2n) (where Ω(X) denotes a 113 and the magnitude of that growth is always Ω(2n) (where Ω(X) denotes a 111 114 lower bound on the order of X.) And each of these will be split into several lemmas. 112 115 But first, we need a couple of more definitions, just to make sure we're not relying too much 113 116 on intuition.

122 125 and for configurations of even length, is the gap between symbols which 123 126 has an equal number of symbols on either side of it.

124 127 125

Lemma 1. A minimal expander of length n is given by:

128

Lemma 1. A minimal expander of length n is given by:

126 129
127 130
• when n is even: <n/2>n/2 128 131
• 132 135
133 136

In addition, this minimal expander of length n is unique (up to the symbol represented by x).

134 137 135

Proof: For any symbol left of centre, there will be more symbols on its right 138

Proof: For any symbol left of centre, there will be more symbols on its right 136 139 than on its left. Therefore if some symbol left of centre is a >, more 137 140 symbols will be copied into the next-configuration than if it were a <. 138 141 So in a minimal expander, this symbol must be a <. 142 145 (which only exists when n is odd) is inconsequential; since there are an equal 143 146 number of symbols on either side of it, changing it will not affect the expansion. QED

144 147 145

Lemma 2a. If some configuration s exhibits growth and 148

Lemma 2a. If some configuration s exhibits growth and 146 149 s contains at least one <, 147 150 then the configuration <s also exhibits growth.

148 151 149

Proof: Say s has length n and the next-configuration 152

Proof: Say s has length n and the next-configuration 150 153 of s has length n + m for some positive m. 151 154 Then the next-configuration of <s has length of at least n + m 152 155 because every symbol in s still has at least as many symbols on either 157 160 of <s has length of at least n + m + 1. 158 161 Therefore <s exhibits growth. QED

159 162 160

Lemma 2b. If some configuration s exhibits growth and 163

Lemma 2b. If some configuration s exhibits growth and 161 164 s contains at least one >, 162 165 then the configuration s> also exhibits growth.

163 166 164

Proof: Mirror-image of argument for Lemma 2a. QED 165 166

Lemma 3. If some minimal expander of length n exhibits growth, 167

Proof: Mirror-image of argument for Lemma 2a. QED

168 169

Lemma 3. If some minimal expander of length n exhibits growth, 167 170 then so does the minimal expander of length n + 1.

168 171 169

Proof: Given the minimal expander s of length n, we can form a 172

Proof: Given the minimal expander s of length n, we can form a 170 173 minimal expander of length n + 1 by:

171 174 172 175
175 178
• if it contains more > symbols than < symbols: 176 179 prefixing a < to it (to obtain <s);
• 177 180
• if it contains the same number of > symbols as < symbols: 178 either appending a > to it or prefixing a < to it. 181 either appending a > to it or prefixing a < to it.
• 179 182
180 183 181 184

These cases can easily be checked against Lemma 1. Further, from Lemmas 2a and 2b 182 185 we know that appending > or prefixing < to a configuration 183 186 that exhibits growth will produce a new configuration that also exhibits growth. Thus, 184 187 if some minimal expander of length n exhibits growth, 185 then so does the minimal expander of length n + 1. QED

186 187

Lemma 4. All but a finite number of initial Xigxag configurations 188 then so does the minimal expander of length n + 1. QED

189 190

Lemma 4. All but a finite number of initial Xigxag configurations 188 191 exhibit growth.

189 192 190

Proof: By induction. Note that the Xigxag configuration 193

Proof: By induction. Note that the Xigxag configuration 191 194 <<<<>>>> 192 195 is a minimal expander of length 8 193 196 (by Lemma 1.) Note also that it has a next-configuration of 206 209 expander expands the least of all configurations of its size.) Therefore all Xigxag configurations 207 210 of length 8 or greater exhibit growth, and the only Xigxag configurations that do 208 211 not exhibit growth must have length less than 8. There are clearly only a finite number 209 of such configurations. QED

210 211

Lemma 5. For all integers n ≥ 1, 4·2n+1 ≥ 6·2n-1. 212 of such configurations. QED

213 214

Lemma 5. For all integers n ≥ 1, 4·2n+1 ≥ 6·2n-1. 212 215 (The relevance of this will become apparent later.)

213 216 214

Proof: By induction. For n = 1, 215 4·2n+1 = 4·22 = 16 216 ≥ 217 6·2n-1 = 6·21 = 12. 217

Proof: By induction. For n = 1, 218 4·2n+1 = 4·22 = 16 219 ≥ 220 6·2n-1 = 6·21 = 12. 218 221 So the base case is proved.

219 222 220

Now we wish to show 4·2n+2 ≥ 6·2n. 223

Now we wish to show 4·2n+2 ≥ 6·2n. 221 224 Divide both sides by 2 to obtain 222 2·2n+2 ≥ 6·2n-1. 223 But note that 2·2n+2 = 4·2n+1, 224 so the expression can be restated 4·2n+1 ≥ 6·2n-1. 225 2·2n+2 ≥ 6·2n-1. 226 But note that 2·2n+2 = 4·2n+1, 227 so the expression can be restated 4·2n+1 ≥ 6·2n-1. 225 228 But this is exactly our inductive hypothesis! So the inductive step is proved, 226 proving the lemma. QED

227 228

Lemma 6. The length of the next-configuration of a 229 minimal expander of length n is Ω(2n).

230 231

Proof: Let's tackle this by finding a closed-form expression T(n) for the 229 proving the lemma. QED

230 231

Lemma 6. The length of the next-configuration of a 232 minimal expander of length n is Ω(2n).

233 234

Proof: Let's tackle this by finding a closed-form expression T(n) for the 232 235 length of the next-configuration of a given minimal expander of length n, where n is even.

233 236 234 237

(Note that we haven't shown that the next-configuration of a minimal expander 236 239 because, from the definition of minimal expanders, we know that any next-configuration 237 240 of a minimal expander 238 241 will have at least as much expansion as a minimal expander would. That's 239 also what lets us phrase the result in terms of a lower bound using Ω-notation.)

242 also what lets us phrase the result in terms of a lower bound using Ω-notation.)

240 243 241 244

First, we find a recurrence formula. 242 245 From Lemma 1, observe that the left half of a minimal expander 268 271 2nd ed., by Cormen, Leiserson, Rivest, and Stein.)

269 272 270 273
271
• c2n+1 ≥ (c2n)2/4 - c2n/2
• 272
• c2n+1c222n/4 - c2n/2
• 273
• c2n+1 ≥ (c2/4)22n-2 - (c/2)2n-1
• 274
• c2n+1 ≥ (c2/4)2·2n-1 - (c/2)2n-1
• 275
• c2n+1 ≥ ((c2/4)2 - (c/2))2n-1
• 276
• c2n+1 ≥ (c2/2 - c/2)2n-1
• 277
• c2n+1 ≥ (c(c - 1)/2)2n-1
• 278
279 280

So T(n) ≥ c2n holds provided we 281 can find some c that satisfies both T(1) = 8 and c2n+1 ≥ (c(c - 1)/2)2n-1 282 for all n ≥ 1. First we examine T(1):

283 284
285
• T(n) ≥ c2n
• 286
• T(1) ≥ c21
• 287
• 8 ≥ 2·c
• 274
• c2n+1 ≥ (c2n)2/4 - c2n/2
• 275
• c2n+1c222n/4 - c2n/2
• 276
• c2n+1 ≥ (c2/4)22n-2 - (c/2)2n-1
• 277
• c2n+1 ≥ (c2/4)2·2n-1 - (c/2)2n-1
• 278
• c2n+1 ≥ ((c2/4)2 - (c/2))2n-1
• 279
• c2n+1 ≥ (c2/2 - c/2)2n-1
• 280
• c2n+1 ≥ (c(c - 1)/2)2n-1
• 281
282 283

So T(n) ≥ c2n holds provided we 284 can find some c that satisfies both T(1) = 8 and c2n+1 ≥ (c(c - 1)/2)2n-1 285 for all n ≥ 1. First we examine T(1):

286 287
288
• T(n) ≥ c2n
• 289
• T(1) ≥ c21
• 290
• 8 ≥ 2·c
• 288 291
289 292 290 293

So let c = 4, and note that (c(c - 1)/2) = 6. 291 Indeed, 4·2n+1 ≥ 6·2n-1 is true for 292 all n ≥ 1 by Lemma 5. So the closed form holds. QED

294 Indeed, 4·2n+1 ≥ 6·2n-1 is true for 295 all n ≥ 1 by Lemma 5. So the closed form holds. QED

293 296 294 297

Finally...

295 298 296

Theorem. Xigxag has exponential growth almost everywhere.

297 298

Proof: Lemma 4 and Lemma 6. QED

299

Theorem. Xigxag has exponential growth almost everywhere.

300 301

Proof: Lemma 4 and Lemma 6. QED

299 302 300 303

In fact, it seems to me that there's an awful lot of wiggle room between 301 4·2n+1 and 6·2n-1, so I'll 302 wager a guess that it's not ω(2n) (that is, that 304 4·2n+1 and 6·2n-1, so I'll 305 wager a guess that it's not ω(2n) (that is, that 303 306 the bound I've given of 2n is not tight, and can be improved upon.)

304 307 305 308

Also, I chose 8 as the base case of the induction to keep things simple.