Hmm. From experience, I know an Android SIM-card-based phone without a SIM card will not change timezones to that of local towers it’s in emergency-calls-only contact with. I haven’t attempted to see if a wrong date is corrected.

]]>I imagine they even said that the chances of a phone booting up for the first time in an Internet-connected cell-unconnected situation is so rare that it’s not worth the hassle to get NTP working. Keep in mind that even without a SIM card, cell phones can connect to the network (for instance, to dial 911), and I expect the phone could still have gotten the proper time in such a situation. This is only a problem when you remove the battery from your phone when you’re, say, 3 stories underground.

]]>It’s easier than you might think. All the kiosks run identical software, and we make a point of never special-casing stuff like this.

]]>> Your new link doesnâ€™t link to anything; are you sure you typed it in correctly?

Try here.

> I did indeed get the same output as you for â€œcatâ€.

Hmm, how are you testing it? When I test the regex in comment 1124 with print “$i\n” if $i =~ /…/, it seems to match correctly.

> (which adheres to what I wrote in the problem specification, but not exactly to its spirit)

Yes, if I had realized my solution was n^d instead of incorrectly thinking it was n^3, I wouldn’t have implemented it. I might have tried to use | to make a conjunction with de Morgan’s laws. I doubt I would have thought of using the zero-width lookahead assertion to make a conjunction, I’ll have to remember that trick.

]]>I did indeed get the same output as you for “cat”. Furthermore, I’m no longer convinced that your solution uses exponential space. You use a constant amount of space for each distinct subset of letters, which is “only” O(n^26) (or O(n^52) if you allow for capital letters as well). So, it’s exponential in the size of your alphabet, but not in the size of your input (which adheres to what I wrote in the problem specification, but not exactly to its spirit).

Your new link doesn’t link to anything; are you sure you typed it in correctly?

]]>Do you get the same output for “cat” as I do?

Let’s see, my (crummy) solution will output one term for each way of selecting letters from the word. If there are a_i of letter i, that gives PRODUCT[a_i+1]. For d distinct letters, that’ll max out with a_i = n/d. Which gives (n/d)^d terms, of size d. Which is not the way my code is behaving, so it’s buggy.

And indeed, the way I recurse through the space is simply broken. A fixed version is here. This gives smaller output (academic since we already know this approach is not good): 50k for “restrain”, 102k for “restrains”, 337k for “restrained”, 1.8M for “restraining”. And does seem to be growing with an exponent of d.

]]>No, you’re right; I had a typo. The output of “restrains” (with an s on the end) is 2.8 MB long, and you’re right that “restrain” without the s only gives 0.6 MB output. However, “restrained” yields 27.7 MB of output, and “restraining” uses 154 MB. I suspect your solution uses exponential space because every letter I add increases the space used by an order of magnitude.

]]>