a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
yakov's comments
activity:
yakov  ·  601 days ago  ·  link  ·    ·  parent  ·  post: Ptolemy versus Copernicus

This is tangential, but the Hellenistic Greeks already understood that the planets orbit around the sun, and this knowledge was forgotten by the time of Ptolemy (source: Lucio Russo - The Forgotten Revolution).

I often think of this quote by David Fremlin: "Indeed I have very little confidence in anything I have ever read concerning the history of ideas."

yakov  ·  3099 days ago  ·  link  ·    ·  parent  ·  post: Man do I love the internet

I'm thinking of trying out EVE. Any chance I could get a referral link from you?

yakov  ·  3193 days ago  ·  link  ·    ·  parent  ·  post: Roots, Roots!

Neat.

What method did you use to find the roots? And how long did it take to render?

yakov  ·  3205 days ago  ·  link  ·    ·  parent  ·  post: Facebook fruit and maths puzzle tricks adults into arguing about algebra

Eh, not really a math puzzle, more of an exercise in vigilance. I always feel indignant after seeing this sort of thing: it seems deliberately designed to insult the player's intelligence.

yakov  ·  3298 days ago  ·  link  ·    ·  parent  ·  post: Jabberwocky

That is strange.

I've never understood people who make things like this. It's crazy that the students in the video seem to be actually having fun. And how does it help anyone learn biology, really?

yakov  ·  3368 days ago  ·  link  ·    ·  parent  ·  post: Looking for good reads

Thumbs up for Cryptonomicon and Anathem.

Another sf recommendation: Wool by Hugh Howey. Not quite free, but well worth it.

yakov  ·  3371 days ago  ·  link  ·    ·  parent  ·  post: A nice problem from SICP

Yeah, it's tough, I don't really know how to go about it. But here's at least a demonstration for three denominations, {1, 2, 5}: (n is the total amount to add up to)

    def onetwofive(n):

numfives = math.floor(n/5.)+1

return int( numfives * (n % 5 + n + 3)/4 - (numfives % 2) * (n % 2 - 0.5) / 2. )

Disgusting, I know! But it works: I double checked it against your code, it gives the same result up to n=5000.

An estimate for four denominations {1, 2, 5, 10} is n^3/600; for five denominations {1, 2, 5, 10, 25}, n^4/60000. I got these by summing crudely and dropping low order terms. They seem to be asymptotic: the estimate for five denominations is accurate to within 5% of the true value for n > 2000. That might seem silly but count_change does get quite slow for n >> 10^6 (that's $10,000.00), while the approximation is good to within 0.01%.

edit: You could write a program that returns an estimator function for a given set of denominations. See Faulhaber's formula.

yakov  ·  3371 days ago  ·  link  ·    ·  parent  ·  post: A nice problem from SICP

You're right. I hadn't quite thought it through, but it would work well: eg. for 8 coin values, if you need to calculate the number of ways to make 2.00, you need to make at most 200*8=1600 calls to the recursive function. So you get O(n) efficiency.

But it still seems like you should be able to do better: O(1) would be possible with a closed-form formula.

edit: Oh, I noticed you actually implemented it with memoization. Great!

yakov  ·  3378 days ago  ·  link  ·    ·  parent  ·  post: A nice problem from SICP

I remember reading SICP. It's a lot of fun.

The recursive algorithm reminds me of something I was just looking at the other day, the Chu-Vandermonde identity.

One obvious way to speed it up is memoization. But I wonder if that would be as effective in this case as for Fibonacci.

Another way would be to just handle the penny case by just outputting 1 straight away if amount >= 0, and handle the penny-and-nickel case by outputting 1+floor(amount/5). I'd imagine that just doing this would speed up the program quite a bit.

But a straight-up, non-recursive calculation in one fell swoop? I'm not sure how to do that.

yakov  ·  3378 days ago  ·  link  ·    ·  parent  ·  post: A puzzle: How to most quickly destroy the tank?

Sorry, but I still only have a very hazy idea of what you're trying to say! It seems like a very slippery argument and I'm not sure that it holds water. Could you make it more rigorous?

The first claim is that each black square must be bombed before its adjacent white squares. I take this to mean that if S is a guaranteed-tank-destroying sequence of firing coordinates, and b is some particular black square with w some particular neighbor of b, then the first occurence of b in S must fall before the last occurence of w. (That is, b may be targeted after w as many times as one pleases, as long as w is targeted at least once after the first targeting of b.)

The next statement is: "bombing all blacks and then all whites is the same as bombing them in some other pattern that meets the same requirements and outputs the same number(for instance, bombing all whites in a row then bombing all blacks in a row.)" And here I'm completely lost: What does it mean, precisely, for two firing sequences to be "the same"? Does it mean that either they both are guaranteed to kill the tank or they both are not, and that they are also of the same length?~

yakov  ·  3378 days ago  ·  link  ·    ·  parent  ·  post: A puzzle: How to most quickly destroy the tank?

    if the tank starts on a black square, you must bomb all black squares and then all white squares. If the tank starts in a white square, you must bomb all white squares and then all black squares and then all white squares. Therefore the bombing run must be W-B-W.

In fact if the tank starts on a black square, you must merely bomb that ONE square before all of its neighbours. You say that it's necessary to bomb all the black squares first, use that claim as proof for a lower bound, then admit in the next paragraph that in fact bombing all the black squares first is unnecessary. So I still don't see how you've shown that it's impossible to destroy the tank in fewer shots. Perhaps by some clever interleaving of black and white squares you might save a missile or two?

yakov  ·  3379 days ago  ·  link  ·    ·  parent  ·  post: A puzzle: How to most quickly destroy the tank?

I am not convinced that you've shown that it cannot be done in fewer moves. It seems that you are begging the question: why must you necessarily bomb all the black squares at once?

In fact, it is not necessary: I can think of many other sequences that destroy the tank in 2521 moves.

yakov  ·  3515 days ago  ·  link  ·    ·  parent  ·  post: Do any of you play go? Want to learn?

Nope!

Wow, sorry about the late reply, I haven't been on hubski for a while.

Actually I'm xiuhcoatl on OGS. If you're still interested, send me a challenge! I play 19x19 pretty much exclusively but I wouldn't mind a 13x13 match.

yakov  ·  3623 days ago  ·  link  ·    ·  parent  ·  post: My favourite math puzzle

That's the correct solution. Yeah, you're right, it's not all that hard. I was twelve when I first heard it so I suppose it made an impression.

yakov  ·  3623 days ago  ·  link  ·    ·  parent  ·  post: 10th Occasional Give Us a Quote from Your Recent Reading

    Because the strain energy storage of horn and tendon, as materials, is better than that of yew, a composite bow can be made shorter and lighter than a wooden one. This is why we talk of a wooden bow as a 'long' bow. The composite bow could be made small enough to be used on horseback, as was indeed done by the Parthians and the Tartans. The Parthian bow was handy enough for the cavalrymen to be able to shoot backwards, as they retreated, at their Roman pursuers; from this we get the phrase 'a Parthian shot'.

From Structures by James Edward Gordon.

yakov  ·  3623 days ago  ·  link  ·    ·  parent  ·  post: My favourite math puzzle

At least one. And other eye colors are allowed, not just blue and green.

Yeah, there's really no trick. When you get the solution you'll know.

yakov  ·  3626 days ago  ·  link  ·    ·  parent  ·  post: HUBSKI ANIME CLUB: Akira -- in 7 days!

Why do people dislike dubtitles so much? And how can you tell the difference if you don't understand Japanese?

How do I know if my copy has dubtitles?

yakov  ·  3628 days ago  ·  link  ·    ·  parent  ·  post: How do *you* Hubski?

Are you serious? You're basically using hubski the way you'd use delicious? That's disappointing. Seems to me that the whole point of hubski is community and conversation.

So why hubski at all? Why not use reddit or delicious or stumbleupon or digg or any one of a hundred other social bookmarking sites?

yakov  ·  3631 days ago  ·  link  ·    ·  parent  ·  post: HUBSKI ANIME CLUB: Winter Edition

Cool. Looks like we're doing Akira -- I'll make the final announcement tomorrow if nothing changes.

yakov  ·  3632 days ago  ·  link  ·    ·  parent  ·  post: December Photo Challenge, Day 18: "Up Close"

That's a shame.

I just got my first orchid as a gift in September. Started reading up on them, got hooked, went to a show the next month and bought three more. Two of them just started budding last week: unexpected at this time of year, but I'm not complaining!

yakov  ·  3633 days ago  ·  link  ·    ·  parent  ·  post: December Photo Challenge, Day 18: "Up Close"

Are they yours? What's the one in the background?

yakov  ·  3636 days ago  ·  link  ·    ·  parent  ·  post: Whats the best soda?

Hard to say without having tried them all! But I bet John Nese knows (Obsessives - Soda Pop).

yakov  ·  3636 days ago  ·  link  ·    ·  parent  ·  post: 150k Megapixel Image of the Milky Way

Very neat!

Also check out the Hubble eXtreme Deep Field (full-size jpg). It's an image of a dark section of sky far away from the Milky Way. Each speck of light is an entire galaxy!!