Better HN
topnewbestaskshowjobs
Log inSign up

antics

4,248 karma · joined Aug 13, 2010 (16y ago) · 545 submissions

clemmer.alexander@gmail.com alex@moment.dev
Submissions

comment 11y ago · link · parent

The discussion is about big O, yes? This isn't really relevant to our discussion. Parallel analysis and average case, for the purposes of the discussion here, are fancy games you can try to play to get nice bounds, but they do not really have any impact on the big O of these algorithms.

comment 11y ago · link · parent

flebron, you do not seem to be reading my posts and I am getting a bit annoyed.

Again, for the third time: you cannot "assume" that reading the digits of a number takes O(n), but reading the digits of two numbers to compare them takes O(1). That is absolutely, obviously true. Your response, that you can "assume" the latter is true as part of the model of computation is just wrong, plain and simple. There's nothing else to say about it.

The original claim directly implies this, and if you can't address that point, then just save us both the time and don't respond.

comment 11y ago · link · parent

Again, yes, I know. I understand what the model is. I'm saying it's not useful to point out that you can choose contradicting axioms to base your model on. And make no mistake, the two axioms that you are proposing do contradict each other.

So again, the issue is not that you can't compare numbers of arbitrary magnitude in constant time -- I never said that. The issue is that it is a contradiction to say that it takes linear time to inspect all the digits of a number AND that it only takes constant time to compare O(n) digits of two numbers.

You're essentially saying that you can axiomatize your mathematical universe with nonsense axioms, which yes, you could do, but that's not useful to point out.

comment 11y ago · link · parent

I am not sure I understand your point here.

Short circuiting comparisons is still linear for integers of unbounded size. But besides that, it's incredibly common to assume that 64-bit primitives are done in constant time, because to the asymptotic analysis, what matters is that the integers are _bounded_ in size. As long as it's bounded, the asymptotic analysis here doesn't care -- you can pick any size you want, as long as it's bounded.

One thing to keep in mind here (which it seems you are maybe confused about) is that these bounds are _asymptotics_ of the input size generally, and have very little to say about any particular choice of input size. 64-bit, 32-bit, whatever, it doesn't matter, if the size of the operands is bounded, the they're the same thing to the asymptotic analysis. As long as they're bounded, you can say that the operations on those operands is proportional to a constant times the (bounded) size of the operands.

The consequence of this is that when you deal with operands of _unbounded_ size, all of this asymptotic analysis goes right out the window. You can't possibly have a meaningful comparison operator, for example, that operates in constant time on unbounded integers.

comment 11y ago · link · parent

Yeah, I know.

Go read the parent again. The author claims that sorting in this case takes time proportional to the size of largest element, and I'm saying, if it takes time proportional to the space consumption of in the largest element (presumably where the cost of the sort comes from), you can't define a computational model where comparison takes constant time -- it still has to read the digits, which we know takes linear time.

If your point is that you can define a model of computation with contradictions in it, then you should rethink whether what you are saying here is even relevant to the thread at all.

comment 11y ago · link · parent

This isn't really right. If the numbers can be arbitrary in size, then you can't compare them in constant time, which means that comparison-based sorts are quadratic.

This is directly related to my third point. Traditional analysis of sorting algorithms assumes the Von Neumann architecture, and in particular, it assumes constant-time comparisons.

comment 11y ago · link · parent

Just to be 100% clear, in case anyone who is new to the field stumbles on this thread, this is NOT breaking math or anything. This is a fun, but totally normal result.

First of all, there are quite a few linear time sorting algorithms. Radix, pigeonhole, and counting sort are all linear time sorting algorithms. The popular result that any comparison-based sorting algorithm works in O(n log n) applies _specifically_ to comparison-based sorting algorithms, and not those like the above. So, even if you ignore the underlying mechanics of the OS scheduler and assume sleep works "perfectly", the result would not that unusual.

Second off, in the comments there appears to be considerable time worrying about the technicalities of the scheduler, the nondeterministic nature of sleep, and so on, and whether this really implies linear time bound. IMHO these are not worth worrying about because we already have linear time sorting algorithms. It's fine to assume the scheduler adds no significant asymptotic cost here, even if we know differently.

Third off, remember that all of these sorting bounds assume machines of the Von Neumann architecture. In particular, this model assumes constant time memory and constant time comparison operations. In cases where you're comparing really big numbers, these bounds get worse. This is easy to forget, but worth remembering just since we're on the subject anyway.

comment 11y ago · link · parent

I want to dispel the rumor that this is magic. This is standard material in undergrad algorithms classes. See, for example, Jeff Erickson's algorithms notes here[1]. It's literally the first page of the chapter on dynamic programming.

[1] http://web.engr.illinois.edu/~jeffe/teaching/algorithms/note...

comment 11y ago · link · parent

This is actually just standard theory. They teach this in every undergrad algorithms class. A lot of it is just getting good intuition for these sorts of problems.

For example, the nth Fibonacci number has n log_2 \phi bits, which means that to simply list the digits in the nth number, it takes O(n) time.

So from there it's pretty easy to see that actually this algorithm can't "really" operate in O(log n), or at least, something must be up that causes us to produce that analysis.

Another bit of intuition that might help you see where this bound comes from: what's actually true is that it takes O(log n) _matrix multiplications_ to get the result. So if you see that and you see that listing the digits of the nth number of the sequence is O(n), it starts to point at the fact that there's a hidden cost to the multiplications.

comment 11y ago · link · parent

No. He has explicitly said that he does this because he thinks Python makes better pseudocode, and is easier for beginners to understand, as empirically measured by the questions he got from students of his AI books.

I understand your heart was probably in the right place, but honestly, your tone here is kind of hard to take.

comment 11y ago · link · parent

I actually think Norvig is making a totally different point than you are. I also think (with respect) that it's a much more important point to learn.

Where your point is that there is a better but almost-as-intuitive approach, Norvig's point is basically that a naive application of probability theory is often dramatically easier to implement, and also "good enough" when compared to a (usually much more complicated) rule-based implementation.

That's really a great lesson to learn. It's (IMHO) much less valuable to learn that there are better approaches out there -- of course there are.

comment 12y ago · link · parent

Let's take this to email.

comment 12y ago · link · parent

Sinofsky was brought in as President of the Windows division after the failure of Vista, during which he spearheaded (among other things) Windows 7 and IE8, both to extraordinarily great praise.

Yes. He was divisive. Yes. He had failures. But really what you should do is take this for what it is: a successful person talking about success. The real trap is not that he is divisive or wrong about the future, it's that he almost certainly suffers survivor's bias.

comment 12y ago · link · parent

Let's do an exercise.

We say we're interested in targeted outreach to demographics whose attrition rates are especially high, and whose entrance rates are especially low.

You come up with the normative claim. Because the normative claim should be obvious.

Ok, now that you've made your guess, let's see what you've written down. If you guessed that the normative claim is that "we should consider it bad to have an industry so vile that (e.g.) competent female engineers exit the field at many times the rate of male engineers", then you win your gold star.

If you did not guess that this is the normative claim, then it is time to retire all this philosophy and set theory that you have going, because you clearly don't have the basics down.

comment 12y ago · link · parent

I take it from your response that you entirely ignored my response about targeting outreach at demographics that have high attrition and low entrance rates. Specifically those groups. That's what we do when we do outreach.

I don't know what else to say. It's extremely simple. Targeted outreach works. You pick groups you want to include, and you target them for outreach.

Why are you making this so hard? Honestly, I question whether you're really interested. You do this on literally every thread where sexism comes up. It sounds to me like you really just want an argument.

EDIT: And, your insinuation that it's all tribal politics, instead of a very careful investigation of what outreach methods work for getting disadvantaged people into programs they wouldn't normally have access to is in such bad faith it's hard to even muster up the will to reply.

comment 12y ago · link · parent

If you don't reach out specifically to minorities (women, for example), then the outreach doesn't work. So the groups that are systematically marginalized will never apply to begin with, meaning that your set that you've "constructed" doesn't actually contain the really negative cases.

Look, we're not writing a philosophy paper or doing set theory here. We don't have room for any of this "theoretical best" philosophical stuff you're working on here. There are reasons why this shit is set up like it is.

comment 12y ago · link · parent

It's _not_ a hard question.

First off, the rate of attrition among these specific minority groups is dramatically higher than it is for whites of any class. How many women who start as engineers are still engineers 10 years out? Look it up. If the disadvantages really are the same, then why is it that whites from lower income brackets do not have the same problem?

The answer -- as other users have pointed out to you repeatedly over the last few months -- is because the disadvantage is systemic and widespread.

That is why these scholarships are a good thing.

comment 12y ago · link · parent

Ah, thanks! I tried a reverse image search, and Googling various versions of "watch with chrome face", and looked around the site, but nothing.

comment 12y ago · link · parent

I apologize for my ignorance, but does anyone know the brand and model of that unusual watch about a third of the way down the page?

comment 12y ago · link · parent

If your question is how do you evaluate whether something like this is a joke, then why don't we start by considering the fact that Shivers has a distinguished and successful track record of a capable scientist and advisor that spans more than a quarter century?

A joke written 20 years ago does not erase this.

It's really this simple folks: it is irresponsible to go around say dumb things like "never take this person as an advisor because they are literally crazy" when we have demonstrable proof that they are more than capable in that regard.

I don't see why this is controversial.

comment 12y ago · link · parent

Absolutely wrong. Don't speculate about things you know nothing about.

Shivers is beloved by his students. For example, Matt Might -- who I name because his blog is one of the most frequently frontpage'd on HN, and also because you have taken his website format as your own -- personally remarked to me many times about the quality of Shivers as PhD advisor. This occurred over the course of the two or so years that I was advised by Matt, and I have personally heard the same from many of his students since.

comment 12y ago · link · parent

As a Microsoft employee, I assure you that the problem here is not that Microsoft criticism is unpopular on HN. That is just hilarious. I can't even think of a thing that's more popular to bash on HN than Microsoft.

comment 12y ago · link · parent

This talk was submitted to a conference which literally requires exclamation points to be in the title. So that's where they come from.

comment 12y ago · link · parent

Thanks! I really appreciate it! :D

comment 12y ago · link · parent

---Author here---

It wasn't that hard. It took us about 30 minutes (thanks largely to the fact that Bart is a genius.) Besides, that's not actually the source of this DLL. We are on .NET native, and for that matter, a bleeding-edge build that's only available here at MS.

comment 12y ago · link · parent

---Author here---

I work at MS, and we're using a slightly exotic version of this DLL. Please pardon the differences. :)

comment 12y ago · link · parent

---Author here---

We actually chose the most expedient route. The reason is, the source you link to is not actually the source of the DLL we were working with. That particular file is very similar, but the rest of the repot is very much different from the version we were working on. (I work at MS, and our project is kind of exotic in this case.)

comment 12y ago · link · parent

---Author here---

Yeah, I've never tried, but I have a copy of the actual Windows source tree, so I'm guessing the answer is yes.

1
91011
19