sniffnoy: (SMPTE)
...OK, this has absolutely nothing to do with INTERCAL, that's just what the word "interleave" called to mind.

Table now goes to 16. And with that, I'm going to stop this nonsense. These things take too long to compute and aren't actually very useful. I am going to continue with my classification, of course, and the results will take the form of large tables, but they'll be tables that don't take so damn long to compute, and will be heavily compressed compared to these enormous ones.

-Harry
sniffnoy: (Kirby)
Made it to 15. Table updated. Did this by hand; after figuring out some speedups, figured it would just be easier to do the rest by hand rather than taking the time to fix my program. (I'm pretty sure I know what the problem is, and I'm pretty sure it'll be annoying to unravel. Basically, I used one data type to represent two different things, and in a rush to get *something* printed out, I equivocated between the two quite a bit, and so the resulting program is largely nonsense, because the various functions I've written can't be hooked up that way. So I'd probably have to rewrite a *lot*.) Should certainly make it to 16 in the next few days, probably 17, maybe even 18. 19, of course, is going to be a lot harder...

-Harry
sniffnoy: (SMPTE)
3+3+2=5+1+1+1=8, 4*4*3=6*2*2*2=48.

Well, I probably shouldn't be wasting my time on *lower* bounds on A_k(x) anyway... unfortunately I don't really have time to continue my computations right now, as I have an enormous amount of grading to do...
sniffnoy: (SMPTE)
FINAL EDIT March 22nd (i.e. much, much later): As stated here, this conjecture is false. See this entry.

BIG EDIT later that night: OOPS! I really didn't think this one fully through before posting it. The integral version is our conjecture, yes; but the fractional version was my own extension that I didn't think through properly - it's an underestimate that's not even consistent with our actual data so far. Fortunately, the fractional version is not too important. I'm pretty sure I could write up a conjecture of what the fractional version should be, but it would be substantially more complicated. I'm just going to erase the fractional version from here, OK? On the basis that trying to correct it with strikeouts and such would just be too messy. Though I will do a little of that...

ADDENDUM next day: Actually, this is looking less likely now that I think about how little we understand what will happen when k gets bigger than 3+α_1. We do have good reason to say that this is almost certainly an asymptotic lower bound; conjecturing that it's asymptotic is just conjecturing that yup, we've covered everything relevant. Which seems less sensible when k>3+α_1. Oh well. I guess that means that rather than try to prove this, my next thing to do will be to continue computation, see if I can get out that far, and see if it still seems sensible.
EDIT Wednesday: Sorry, instead of 3+α_1 there, that number should actually be 5-log_3(2), quite a bit bigger by our standards.

OK. Let's let A_k as before, except that to make the statement simpler, this time I'm going to use a nonstrict inequality, i.e., A_k={m∈N: d(m)≤k}. (The distinction only matters if k<1 - which would be k=0 in the integral version - but I'd rather not have to make exceptions.) Let's let k=n+α, where n is an integer and 0≤α<1. Let's let k be an integer.
Conjecture: A_k(x) ~ p_k/(k+1)! * (log3x)^(k+1), where p_k is the number of partitions of k.

Josh tells me that if this is true, that's enough to prove that, in fact, f(n) is not asymptotic to 3log_3(n) (though being much more specific than that would be nasty). So yay, the whole reason he introduced this line of reasoning, would indeed pan out. (In addition to my nifty tables and proofs of f(2^a*3^k)=2a+3k for low a.)

So, uh, is it true? Guess I'd best get to work on that. Well, in addition to my computations with larger step sizes, which I haven't had time to start, and fixing my program, which I haven't had time to finish. I've been pretty busy with school lately. But, if I can actually get anywhere on this, I think computation and program-fixing can probably be saved for later. Unless, of course, the conjecture is false, in which case they'll provide counterexamples. :P

Tangentially, can anyone answer the following question? Let's say we have a finite multiset S of positive integers. If we know the sum of S, and we know the product of the multiset S+1, is that enough to determine S? I would expect not, due to how much freedom those two conditions appear to allow - thinking how without the positive integer requirement, you would need all the elementary symmetric polynomials, not just one and a slight variation on one - and yet, I can't seem to produce a counterexample. This seems like something that would be known, but no idea where I'd look. Anyone know anything about this?

Whoops, just one more thing 16 Feb 19:00: Above, S is actually supposed to be a multiset... I think that was pretty clear from context, but I've modified the above paragraph to be explicit about that. Also cleaned up the reason I would expect it to be false.

-Harry
sniffnoy: (Chu-Chu Zig)
OK, actually, I think I've got a fix for the problem from my previous entry. Unfortunately, rather than α≤1/2, it requires α<1/2.

...you know, the reason I originally suggested changing our definition of the A_k is so that I could use steps of size α_1, rather than some size arbitrarily close to α_1. But, that won't help here. It's just annoying, you know? That no matter how you pick your step size, there's a better one? (Well, OK, that's probably not exactly so, as using step sizes closer to 1/2 would result in more exceptions to keep track of. But still.)

Essentially the idea is just that as long as α<1/2, we can look *two* steps back for the addition step rather than 1 step back, without breaking things. With introducing more exceptions, to be sure, but those shouldn't be a big problem.

I think I'll try a step size of 1/3 first, for convenience...

-Harry
sniffnoy: (Dead face)
Well, it looks like α=1/2 - or rather, α>d(2) in general - still has problems with the addition step if you want to actually compute A_k. Josh has said he has a further refinement for the multiplication step, I know, but multiplication already works pretty well and isn't really a problem. :-/

Maybe further refinement of addition is possible, though. I don't think our current techniques suggest it, but perhaps I should take a look and see if the data itself does.

But first, I think it's back to working on that program...

-Harry
sniffnoy: (Kirby)
EDIT next day: Two small addenda within.
EDIT 18:17 that day: Sorry, changing A back to its old 1-including definition... the statements would need to be modified otherwise. (Well, the only change would be that you'd need to also union in A+S(k+1)α and AαTα.) Similarly modifying the definition of B to fit this (namely, excluding 3 from it).
EDIT 19:30 Feb 13: Sorry, I forgot about an earlier slight improvement I had made to addition - namely in the definition of S_x - since it hadn't been relevant previously... it's actually not really relevant here either, but I want to remind myself of it.

OK. A few days ago Josh sent me an email with an observation on our recursive construction of A. You may recall that it contained a multiplication by Aα*, where by "*" I mean "multiplicative closure". This was annoying for multiple reasons, but one in particular was that in order to actually compute A_k, I had to use step size at most d(2)=2-3log_3(2), which lies inbetween 1/10 and 1/9. (Thought: Perhaps I should start using a different variable for step size, instead of α. Typing that all the time is getting annoying. Maybe h or something. Oh well, I'll stick with α for now.)

Anyway Josh pointed out - we don't really need products of arbitrarily many elements of A_α. When you consider that powers of 3 can basically be ignored, and everything else has a defect of at least d(2), you only need about 10 or so.

"Holy crap this is AMAZING" I responded. The argument is really simple but we had somehow managed to miss it until now. Indeed, I realized, it could be refined - you didn't need 10 or so, you only needed 1 (with one exception). The fundamental idea here was not that the minimal nonzero defect is d(2); the fundamental idea here was tracking the defect at all. (At first, I thought this would actually allow us to use α≥1, but this isn't right because the addition step still requires α<1.)

That one exception (which I'll get to shortly) would annoy me for the next few days, but even by itself, his refinement was enough to finally prove a conjecture we've had for a while - I think Josh suggested it initially - that A_r(x)=Θ((log x)⌊r⌋+1). (The lower bound we already had; it suffices to check it for integers, for which just note that if you take numbers of the form "sums of r+1 distinct powers of 3", these all have defect at most r.)[0]

Anyway Josh thinks that he can actually analyze the constants to the point of being able to actually prove f(n) is not asymptotic to 3log_3(n) (his original motivation for introducing this line of thinking in the first place, you'll recall). I looked at that a bit and it didn't look very promising, but, we'll see. ADDENDUM next day: Having presumably analyzed it rather more than I did, Josh now says the constants really aren't good enough for that. Oh well.

Anyway! Let me state my refinement of Josh's big improvement.

No, wait, first, let me restate some definitions. I've been kind of fiddling with these - I no longer see any real reason to include 1 in A_α for α<1; and I've decided that some of the tricks we've used should be explicitly incorporated into them. Also I'm defining "B_k" to make my "factoring out 3s" trick (which I don't think I've discussed here) work formally. EDIT later: OK, I've changed it back to having 1 in A_α for α<1; perhaps it really shouldn't be, but it simplifies this statement, so I'm leaving it in here for now.

So: Take 0<α<1. Define A_x={n∈N: n=1 or d(n)<x}. Define B_x={n∈A_x: 3 does not divide n, or f(n)≠3+f(n/3) and n≠3}, so that A_x={3}*B_x (where again * means multiplicative closure). Define S_x={b∈N: f(b)<x+3log_3(2), and b does not have a minimal representation as a sum} (so in particular S_x is finite). Finally define T_α={m∈N: m<2/(3^((1-α)/3)-1)+1, and either m=1 or f(m)=f(m-1)+1}. (So as α<1, T_α is finite.)

Then: A ⊆ (A_α)^3 ∪ A_α(A_α+S_α) ∪ A_αT_α;
and for k≥2, A(k+1)α ⊆ (∪ki=2 AA(n+2-i)α) ∪ A_α(A+S(k+1)α) ∪ A_αT_α.

Similarly, B ⊆ (B_α)^3 ∪ B_α(A_α+S_α) ∪ B_αT_α;
and for k≥2, B(k+1)α ⊆ (∪ki=2 BB(n+2-i)α) ∪ B_α(A+S(k+1)α) ∪ B_αT_α.

(It's really the latter we want to use for determining the order of A_k(x), as it has powers of 3 factored out for us, to avoid redundancy. The "annoying exception" was the case k=1, passing from 1 to 2, which as you see I stated separately. ADDENDUM next day: Also I forgot to mention that Josh said he had a further refinement to the multiplication part, but I guess he doesn't have it fully worked out yet.)

So if we start from the fact that for α<1, B_α is a finite set, i.e., B_α(x)=O(1), and we repeatedly apply A_k={3}*B_k and the fact about B_k above, we quickly see that B_(kα)(x)=O((log x)^(k-1)) and A_(kα)(x)=O((log x)^k). Then our conjecture follows immediately - given r, take α=r/(⌊r⌋+1), k=⌊r⌋+1, and... well, there you go. (Again, the lower bound we already had.)

OK. But as I said earlier, we don't actually need my refinements to prove that - Josh's original observation sufficed for that. So, what are my refinements good for? Well, for one thing, maybe proving f(n) not asymptotic to 3log_3(n), Josh suggests; but also, they could potentially speed up my explicit computations of A_k a huge amount.

Here I've been, crawling along d(2) at a time - and now I can potentially work with α much larger! How large? Arbitrarily close to 1? Well, for reasons I'd rather not get into right now I think I want to keep α≤1/2, but if that does work, from d(2)<1/9 to 1/2 is a huge improvement! The program I was writing, I never did finish; I think I should probably still do that, especially seeing as I think it was close to done. But, if I can go in steps of 1/2 at a time, quite possibly I won't need it! (Remember, it breaks down at 2; to make it go further than that would require serious rethinking of the algorithm.)

We're not, of course, any closer to a general proof that f(2^n)=2n, because the addition step is still nasty. (Also, Josh says that by some advanced number theory stuff, the fact that for any m there exists a K such that if we let M=3^K, then f(M*3^k)=f(M)+3k for any k means proving f(2^n)=2n should be very hard.) (Also, Josh hasn't improved his upper bounds any in a while, last I asked.) Also FWIW I still have little idea about proving that the set of defects is well-ordered.

So, yay for actually bothering to track the defect involved in that "arbitrary" product.

-Harry

[0]The distinctness condition can probably be relaxed, which if you care about it at that level would get you a better lower bound - but even asymptotically speaking I don't think you'd actually improve the constant any. If you do want to be as general as possible, I think the restriction you want is just that the largest power of 3 involved is distinct from the others, but, well, I don't really care.
sniffnoy: (Dead face)
So like I said earlier, by writing everything in ternary, I figured out how to automate the computations I was doing. So, what did I want to write it up in? Certainly not C. So, uh, Haskell, I guess?

I'm thinking now Haskell probably wasn't the right choice, partly because it means I have to figure out how to write my recursions to be not shitty. :P In any case, it's close to done so definitely not changing that now... regarding my use of shitty recursions[0], well, hopefully it shouldn't matter - I don't intend to run this with n>18, anyway, and if it does matter, well, I'm sure I can figure out how to make them better, I just don't feel like doing that first time through if it's not necessary.

Regardless, even though I knew my recursions were shitty, I was quite surprised when one of my initial tests resulted in a stack overflow! This was with n=3, so there really shouldn't have been any opportunity for that. What was going on?

So you see, I wrote this function called "multimax". It just takes a bunch of lists of integers, and returns the list [maximum of 0th elts of the lists, maximum of 1st elts of the lists, ...]. Pretty simple. In fact now that I think of it I could have written this rather more simply, as just multimax = map maximum . transpose. I didn't think of that earlier. Oh well. I wrote it instead as multimax = foldl1 (zipWith max).

Anyway when I tried out what I had written so far, errors started popping up, because if you called multimax on an empty list, well, you were calling foldl1 on an empty list. Crap. So instead of foldl1, let's use foldl, meaning we need a default, for the max of 0 things then, which should be the lowest value in the relevant set... in this case, it should be a list of all -1s. How many -1s? Well, let's just use an infinite list of -1s - then once we do a zipWith, it'll be cut down to the appropriate size.

Do you see the error in my reasoning? The whole problem case is when the original list is empty. In this case, no zipWith is performed - we've still got an infinite list. And so this infinite list got passed around until another function tried to do something with it that resulted in a stack overflow.

...yeah, I think I'm just going to turn that into a special case. (Note that if we write multimax = map maximum . transpose, then multimax [] = []; but I don't want [], I want -1s.)

[0]By which I mean doing things that branch and recompute unnecessarily, like the infamous example "fib n = fib (n-1) + fib (n-2)".
sniffnoy: (Chu-Chu Zig)
(Also: My computing account with Uchicago, and hence that email address, is now defunct. Oh well...)

EDIT: Emily points out that the above is mistaken.

(Also also: Right now it seems I can only play Dominion at all decently if I can get combo cards. Need to learn how to better handle games where those don't exist.)

So let's take a moment for me to explain the computations I've been doing.

So let's let f(n) be complexity of n, define d(n)=f(n)-3log_3(n) (d stands for "defect"), and A_k={n:d(n)<k.} (Yes, this used to be a nonstrict inequality. I've decided I like the strict inequality better. You'll see why.) Recall, some time ago Josh proved that for any k, A_k(x) is polylogarithmic in x. He did this by showing that A_k satisfied a... what would you call it, a sub-recurrence? A_(k+1) is contained in something that depends on A_k. Although he didn't actually use step size 1, he used step size 1/10. Really any step size at most d(2)=2-3log_3(2) would work. (I'm going to call that number α1... I think I've said that before. Actually, no, I'm just going to call it d(2), because that's much easier to write here.) In fact, any step size less than 1 would work, but we didn't realize this till later. However I'm going to continue to talk just about using a step size of d(2), for reasons you'll see.

So I asked, is this good enough to explicitly compute A_k beyond what we already know? Unfortunately, well, it wasn't. But I'm going to skip over how we got to where we did, seeing as I don't remember the chronology very well and much of it involved us doing stuff that was a bit dumb (i.e. trying to use a step size of 1.) (Basically, I tried to use a step size of 1, and concluded I couldn't do it. Then Josh tried to fix what I did by just using a strict inequality instead (at that point we were generally using nonstrict inequalities). But when I looked over his argument, it didn't quite work. While trying to repair it and failing, somewhere I realized the whole issue would go away if we just used a step size of less than 1. D'oh.)

Anyway, eventually Josh got an improvement on the addition part and I got an improvement on the multiplication part that allowed us to get that linear bound on the power of the logarithm; but also to start actually computing A_k. Let's say we pick a step size of &alpha, and let Aα* denote the multiplicative closure of A_α (which is polylogarithmic iff α<1); then an element of A(k+1)α is an element of Aα* times one of the following: A product of an element of A_iα and A_jα where i+j=k+2; or an element of A_kα plus an element of of a finite set which depends on (k+1)α; or an element of a finite set that depends on α.

Is *this* good enough to explicitly compute A_k? Almost! We need two things. Firstly, we need to pick a step size at most d(2). Otherwise, A_α contains 2, meaning Aα* contains all powers of 2; and if we knew how to handle powers of 2, well, we probably wouldn't be doing all this. But if α≤d(2) then we just have to deal with powers of 3. Secondly, we need to use an additional clever argument of Josh's that improves the addition case a bit - if k<3, we can take the finite set we're adding from to just be {1}.

OK. So procedure is now as follows: 1/10<d(2)<1/9, and we already know A_1 from stuff I'd done previously; what's more, we explicitly know the defects of all those numbers, so we know A_kd(2) for k≤9.(Actually, this procedure is good enough we could start from the bottom and recompute this! We don't need to use the stuff I did earlier.) So say we want to carry out the first step and compute A_10d(2). (We also want to compute the defects of all its elements, so we can determine A_k for any k≤10d(2).) Well, we take products of elements from A_id(2) and A_jd(2), where i+j=11. And we take elements of A_9d(2), and add 1 to them. Then, we compute f of these numbers. How? Well, upper bounds are easy; and for lower bounds, we use the fact that we know that these numbers are not in A_9d(2). Well, if they're not. If they are, then we already know their defects. So having computed f, we now know d of these numbers, and so in particular we know which ones have defect less than 10d(2). Yay! Repeat until you hit kd(2)>3 and you have to rethink your method (because now 1 is not the only number you might have to add), or until you get sick of it.

I have currently, by hand, gone up to 14d(2) (a little over 3/2), and most of this was looking quite automatable. The lower bounds on f I was doing a bit adhocly at first, but actually it's not too hard to prove that - so long as the number's not one you already have - they work out to be what you want them to. The only sticky part, that I couldn't think of how to automate, was how do you check if the numbers *are* ones you already have? We're dealing with infinite families of numbers here.

Of course, these infinite families of numbers are all of forms like a*3^n+b*3^m+c*3^k, but somehow it didn't occur to me till recently that I should just write everything in ternary. Suddenly it's so much easier - I can check it pretty much by eye! Indeed, it seemed automatable... and now I'm quite certain it is, and that's what I'm working on right now. This shouldn't take too long; it's much simpler than that previous monstrosity I wrote.

Unfortunately, what I'm writing up right now will necessarily break down when we hit 2 (i.e. when we hit 19d(2)). You see, the numbers 3^n+1 all have defect less than 1; so numbers (3^n+1)(3^m+1) will all have defect less than 2. And that infinite family is not one that the program as I'm writing it can handle. It's quite possibly doable, but I'll think about that afterwards.

Hm, perhaps I should upload my table of summarized results so far... note not everything in the initial note will be comprehensible as this was originally just intended to show to Josh (and due to its nature as something only partially completed, I'm not going to fix that right now). Here it is! The reason it includes 14d(2) itself is because we can get that as a freebie, already knowing it from elsewhere.

ADDENDUM: I just realized I never explained why strict inequalities make things better! The reason for this is that if you use nonstrict inequalities, then 2∈A_d(2), and so you can't actually compute A_k using steps of size d(2), you'd have to use steps of size less than d(2). So that is way more trouble. Especially since determining things of defect exactly k*d(2) is (in cases so far) pretty easy (the freebie mentioned above), so truly nothing is lost.

-Harry
sniffnoy: (Dead face)
So for the past few days I've been crunching numbers to compute all numbers n with d(n)<k(2-3log_3(2)), for k=10, 11, 12... well, so far I've made it to 13. [From hereon I'm just going to refer to 2-3log_3(2) as α_1.] Each iteration has become more and more tedious and I'm not sure I'm actually going to want to go all the way to 19 or 20 like I planned. I've compiled a giant table, in order, of all possible values (both approximate and exact) of d(n) less than whatever I have so far; what n yield those values; and what D(n) is for those n. I'm still not far enough out to see any "strange" behavior, disappointingly.

The process is as follows: Say we want numbers with defect less than kα_1. Well, we look at pairs (i,j) with i+j=k+1, and look at products of pairs (n, m) with d(n)<iα_1 and d(m)<jα_1. Check the defect to see if it actuallly works. Then, check n+1 for all n with d(n)<(k-1)α_1. (This doesn't work in general, but for k this low, it does.) This is harder than it sounds because of course these sets are not finite, nor are they just finite sets times powers of 3, which is why I haven't quite figured out how to automate it yet. (Well, I may have a way, but it'll almost certainly break at 19 or so. I may want to actually try it.)

Well, the table should allow us to reduce our bounds on A(x), because rather than having to rely on our induction past k=1, we can actually determine the correct rate of growth explicitly when k is small enough that we're within the table. Picking α=5-3log_3(5) (which I will in the future refer to as β_2), because that's been so good here in the past, we can get explicitly for k=2. What does this actually get us? I have no idea, because I've been doing basically nothing but computing these sets! I haven't been using them to prove f(2^a3^b)=2a+3b either... just computing them.

Actually, here's something neat I thought of: It's not in general true that f(m3^k)=f(m)+3k. But it is true that for every m, there exists a K such that if we let M=m3^K, then f(M3^k)=f(M)+3k for all k. Proof? For any n≠1, D(3n)≤D(n) with equality iff f(3n)=f(n)+3. (If m=1, well, we already know it's true in that case.) But also for any n, D(n)≥0, and D(n) is always an integer, so the sequence D(m), D(3m), D(9m), ..., must stabilize, yielding the above.

Can you possibly get a bound on K? I have no idea and I'm not going to think about it.

-Harry
sniffnoy: (Kirby)
So: d(n)<10(2-3log_3(2)) iff n is of one of the following forms: 2^a*3^k, a≤9; 5*2^a*3^k, a≤4; 7*2^a*3^k, a≤3; 19*2^a*3^k, a≤2; 13*3^k; 55*3^k; or (3^m+1)3^k.

With this, and our previous stuff (not all of which has appeared here, mind you :P ) it's not too hard to show that f(2^20*3^k)=40+3k.

Why do I get the distinct suspicion that it will, in fact, turn out that A_(k-ε)(x)=Θ((log x)^k) for k an integer, as Josh suggested? Or at least when k=2? And that these won't get too much more complicated until I pass k=2 so I should be able to push up to about 29 or 30 or so?

-Harry
sniffnoy: (Chu-Chu Zig)
(This is on integer complexity so notation as usual.) OK. Let's let D(n)=f(n)-L(n). Suppose m is a canopy number (i.e. D(m)=0). If m=g(k) for some k, then m+1 is also a canopy number, and f(m+1)=f(m)+1, f((m+1)3^k)=3k+f(m)+1. So say m≠g(k) for any k. If m+1 is also a canopy number, then since L(m)=L(m+1), f((m+1)3^k)=3k+f(m+1)=3k+f(m). And if m+1 is not such, then clearly f(m+1)≤f(m)+1, and also as D(m+1)≥1, f(m+1)≥L(m+1)+1=L(m)+1=f(m)+1, f(m+1)=f(m)+1; furthermore f((m+1)3^k)=3k+f(m)+1, as if D(n)=1, then D(n*3^k)=1 as D(n*3^k)≤D(n), but D(n*3^k)≠0 as D(n)≠0.

So if m is a canopy number, f((m+1)3^k) is usually 3k+f(m)+1... but if m+1 is also a canopy number, and m is not g(k) for any k, then it's just 3k+f(m).

So I have to go recompute a bunch of stuff, because I was doing a bunch of computations while ignoring that the latter was a possibility. Then I got to 5 and noticed something was wrong. So I had to go and figure out all canopy numbers m (other than 3^k, 2*3^k, and 4*3^k) such that m+1 is also a canopy number.

Here I just sat down to do some computation, not some tedious... whatever you call this. Regardless, the complete list of exceptions is as follows: For k≥1, 2*3^k+1, 4*3^k+2, 2*3^k+2, 4*3^k+2, 4*3^k+3, as well as the numbers 5, 63, and 512. (Yes, 5=4*3^0+1, but writing it that way would have made things more complicated.)

Now I have to actually go recompute stuff, accounting for this. But not now, that was tiring.

EDIT next day: Silly me, 7 is redundant anyway as it's 2*3+1.

-Harry
sniffnoy: (Kirby)
So not only does the linear bound given in the last entry actually work, but the actual construction behind it suggests a method for proving f(2^a3^b)=2a+3b for fixed a, one that doesn't cap out, uh, anywhere. Unfortunately it seems terribly tedious. So far I've just used it to go up to a=19, one past what we already had. Past that I can no longer rely on nice explicit descriptions. Hopefully something will generalize?

Also another quick addendum: Also, yes, that infimum is achieved; for n≥1, A_n(x)=O((log x)^K) where K=3n/(5-3log_3(5)).

-Harry
sniffnoy: (Kirby)
Well my convolution idea from earlier didn't work, if you'll recall. But Josh had an idea on how it could work, and well, his idea didn't quite work either. But several fixes later, I'm pretty sure we've got a real linear bound: A_n(x)=O((log x)^(4.96n))[0]. Josh claims he's got 2n, but he's given me no details so I'm kind of expecting a mistake just because there's been one whenever we've claimed anything that nice. :P Not going into the details now; there's still improvements that can be made, I'm sure. Have yet to explore implications for 2^a3^b, though again, I'll need a special power-of-2-avoiding version to do so.

EDIT Dec 27: Sorry, the numbers in this post are wrong. I'll correct it shortly. OK, the numbers have been corrected; there was a trick I had that I realized didn't work. Also apparently 2n didn't work out, as expected... :-/

EDIT early Dec 28: Goddammit. Missed a big hole. Post retracted until further notice.

EDIT afternoon Dec 28: Nevermind that. The hole was entirely imaginary. It works! And Josh has a lemma that should help reduce the numbers, too.

-Harry

[0]4.96 here is actually standing in for "any number greater than 3/(5-3log35)". I think this infimum on what I've got should actually be achievable, but I haven't worked out the details yet.
sniffnoy: (SMPTE)
So while I've written a bunch about what Josh and I have done with integer complexity, it's been rather scattered and contextless. So I thought I would take some time to write up a big summary of what's already known, what the numerical data suggests, what we've actually proven, and where we are now, that should hopefully be accessible to everybody. No proofs, just statements and some relations between them. However I'm going to go into what is probably excessive detail in the "background etc." section, just for the sake of completeness/explanation. The "results etc." section will be more sketchy.

Background, data, immediate questions )
Results, resulting questions, where we are now )
Stuff we're not touching )

Anyway I think that more or less sums things up.

-Harry
sniffnoy: (Chu-Chu Zig)
Actually, now I do think I have a way for improving on Josh's proof - don't look at the *minimal* nonzero defect, just an acceptably small one - one small enough so that the stuff below that has a small multiplicative closure. Such as, say, 1/2. (That way everything below is of the form 2^a*3^b.) Actually, anything less than 1 should do, but of course you get tradeoff between growth rate and starting value. Of course, since 1/2 - or anything not below the minimal nonzero defect - gets you powers of 2, it can't tell us anything about 2^a*3^b; but anything below the minimal nonzero defect is so impractical I'm pretty sure it can't either.

I still have to check all this, but I'm pretty sure this should work.

-Harry
sniffnoy: (Dead face)
So, more on integer complexity. Let's recall I'm using f(n) to denote the complexity of n, and g(k) to denote the highest number of complexity k. f(n)≥3log3n; the smallest differences occur when n is of the form g(k) for some k, i.e. it's of the form 2^a*3^k with a≤2, and after those the smallest differences occur when n is what I called a "canopy number", which are of the form 2^a*3^k with a≤10 or 2^a(2^b*3^m+1)3^k with a+b≤2.

So let's define A_k={n∈N: f(n)-3log3(x)≤k} (we may also want to always throw in 1 even if k<1), and let's recall that Josh proved that A_k(x)=O((log x)^K) for some K depending on k. (Actually, have I stated that before? Well, he proved it a while ago. In particular, it follows that f(n)-3log3n is unbounded, which was the original motivation.)

Notice that if we define L(x)=min k such that g(k)≥x, this is bounded away from 3log_3(x), so the statement is equivalent with L(x) in place of 3log_3(x). Or instead we might use, say, ⌈3log_3(x)⌉, or l(x), defined by l(x)=max k such that g(k)≤ x. (Note l(x)=L(x)-1 unless x=g(k) for some k, then l(x)=L(x)=k.)

Regardless, I'm going to think about this difference, between f and whatever-function-that's-close-to-3log_3-we're using, as a "defect".

Now, here's the thing about Josh's proof: When I defined A_k, note I never required k to be an integer, and if we're going to be using actual logs, then, well, that would kind of be a silly requirement. And so Josh's proof works, inducting on k, increasing it 1/10 at a time. (Actually 2-3log32-ε, but it's easier to just say "1/10".)

This is perfectly good if all you want to do is prove that A_k(x) is polylogarithmic, but if you want good bounds on what the exponent is, it stinks. We start with an exponent of 1 for A_0 as our base case; this gets us an exponent of 2^(10k) for A_k. An exponent of 1024 for A_1. The actual minimal exponent for A_1 is 2 (this follows from what I did earlier).

Why 1/10? Because 2-3log_3(2) is the minimal nonzero defect that can occur. So I had an idea, if we use a different function in place of 3log_3, that gives us a larger minimal nonzero defect - say, 1, because the function will always be an integer - we could get much better bounds. Indeed, I even found a way to bring K down from exponential in k all the way down to linear in k - but this specifically used the fact that we were dealing with integers. And not only that, but the actual concrete methods that led to these bounds, I thought, could potentially prove the 2^a*3^b conjecture for higher a - for a short time I thought I had (nearly) proved it for a≤29.

But apparently there were some major holes in what I'd done.

You see, while the bad thing about Josh's proof is its small minimal nonzero defect, the good thing - that makes it work, unlike my attempts at variants of it - is just what happens at zero defect. You don't want there to be many things of zero defect - rather, you don't want there to be many elements in the multiplicative closure of the set of zero-defect numbers. If we're just using 3log_3, we get powers of 3, which are already closed under multiplication. Pretty good.

But suppose we use L instead - then you get all the canopy numbers. Because of that pesky +1, these are far from closed under multiplication. I'm not sure exactly how best to estimate how many products of canopy numbers are at most x, but I don't think it's polylogarithmic, and assuming that's correct, it makes it useless for this. Using the stricter ⌈3log_3⌉ doesn't help any.

Ah, but what if instead I use l? For a while, I thought this fixed it - then the numbers of defect 0 are the g(k), which, while not closed under multiplication, yield just numbers of the form 2^a*3^b when you close it up - logarithm squared, that's perfectly fine. But the problem is, unlike the functions above, l doesn't satisfy l(ab)≤l(a)+l(b), which is, SFAICT, quite necessary for the induction.

So we don't have 2^a*3^b for a≤29, we don't have that you can just use K=2k or 3k-1 or even just 2^k or 2^(k+1)-1; what we have, that works, is just Josh's original proof, that gets you K=2^(10k). (Unless I'm wrong about products of canopy numbers.)

...well, at least this'll make writing everything up quite a bit easier.

-Harry
sniffnoy: (Kirby)
SO!

Turns out not *everything* I can ssh into at Chicago is down; see comments here. With that, I've gone and made a few modifications to the old page listed as my "website". In particular, I finally dug up and uploaded that old file listing everything I owe the Internet Oracle. I wonder how old the last item on that list is? Quite a few years, that's for certain.

...and, oh yeah, here's my writeup (hopefully clear and not horribly formatted) of what I've managed to prove about integer complexity, and the code, now (hopefully) readable, I used to do it.

Yes, the "personal communication" citation is kind of a joke - as the old joke goes, "I saw Karp in the elevator and he said it was probably NP-complete" - I expect we'll probably eventually merge that stuff, but for now I've just written it all up as if it were to stand alone.

Totally unrelatedly, I find it pretty funny that this equation has become known as "Sun's curious identity". (Especially considering it's pretty recent.) It just sounds so Vancian.

-Harry
sniffnoy: (Dead face)
OK. I cleaned up that horrid mess of code. Well, for the most part I left the code untouched, I just added lots of comments, but in a few places going back over it so that I could understand it so that I could explain it, I noticed there were a few mistakes, or redundancies, and I took care of them.

So I've got the whole thing there. Since in my writeup I start with the concrete version of the algorithm, then abstracted it, and then finally abstracted it further to the thorough version that tells us everything, I had it do all three. Let's test all three modes. Concrete mode... OK, I was about to say it works fine, but apparently it runs into problems with gamma3? That's odd, that shouldn't be happening... well, when it returns, it seems to work fine, and that shouldn't be too hard to fix. Abstract mode... matches my data perfectly. Good. Thorough mode... doesn't return. Crap. Evidently there was an additional way of generating these infinite families which I missed because my code, with some errors in it, missed it. Gah.

ADDENDUM Oct 1: There wasn't. It was just a really stupid programming error. In fact, the corrected version hit *less* than the previous version, because the previous version for some reason included one or two things that were in those infinite families anyway, somehow.

Tomorrow, I say. Tomorrow I shall finish this. Hopefully.

(Ignoring, of course, the whole part where Josh and I try to put our work together into something coherent. But this part will be done, I'll have something I can upload somewhere and show you...)

-Harry
sniffnoy: (SMPTE)
So next project, of course, is not, in fact, trying out that averaging idea that Josh had, but rather going back and making my code readable. Once that's done, perhaps I'll post the whole thing up here... (meanwhile I will also ceaselessly tweak minor points of the writeup like the obsessive I am).

-Harry

August 2025

S M T W T F S
     12
3456789
1011 12 13141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom
Page generated Aug. 27th, 2025 06:14 pm
Powered by Dreamwidth Studios