Live data from Hacker News

Potato paradox

en.wikipedia.org

91–100 of 142 posts

Re: Potato paradox

#92

Another intuitive way of thinking is to think in terms of proportionality between water and potato matter. The weight of the potato matter remains constant, and the amount of water can change, which in our case goes down. To make the matter proportionally twice as bigger compared to water, one needs to divide water by twice.

Not entirely. You need to divide the total by 2, not the water. Dividing the water by 2 would give 49.5 water vs 1 potato matter, for a total of 50.5. The potato matter content would only be 1.98%.

Re: Potato paradox

#93
post #84

Here is another variation. A fresh lake gets infested with algae and the amount of algae doubles every day. The algae covers the whole lake in 10 days. How many days did it take the algae to cover half the lake?

9

Re: Potato paradox

#95
post #83

Earlier quoted context omitted.

Well yeah, just add a wait loop somewhere else

I thought they were speed-up loops... http://thedailywtf.com/articles/The-Speedup-Loop

That is pure genius. Some very forward thinking there.

Re: Potato paradox

#97
post #37

This is not that uncommon when optimizing code. Your program is slow so you profile it, and find out that f() takes 99% of the time. So you work a lot to optimize f(), and re-profiling shows that now f() takes 98% of the time. Doesn't seem that impressive after all the work you've put into optimizing f(), but your program is actually twice as fast :)

If you understand Amdahl's law, it's not suprising at all!

But Gustafson's law has a lot more meaning. Who cares if it takes some fixed time to do something if you can parallelize and get 2x, 4x, 8x, 1000x, etc. as much done in the same time?

Re: Potato paradox

#98
post #37

This is not that uncommon when optimizing code. Your program is slow so you profile it, and find out that f() takes 99% of the time. So you work a lot to optimize f(), and re-profiling shows that now f() takes 98% of the time. Doesn't seem that impressive after all the work you've put into optimizing f(), but your program is actually twice as fast :)

This is an interesting observation, and confirms the way I optimise code: 1) Create a benchmark (some code that performs the task that I want to optimise), and measure the absolute time it needs. 2) Use a profiler to see where most of the time is spent. Optimise that code. 3) Run benchmark to see if your optimisation are effective. Or, in other words: the percentage tells you where to focus your effort. The absolute…

This is the obvious strategy, but it's not always applicable.

For example when profiling a long-running service, or a kernel, there's no "absolute time it needs", you need other proxies of running time such as the CPU usage percentage, but even that is not noise-free.

So if you just run "perf" on it, you need to be aware of this fallacy.

Re: Potato paradox

#99
post #41
post #28

Another angle on this problem: How much water must you add to the potatoes to make them 100% water? Of course, you can add all the water in the universe and they'll still not be 100% water. The water-percent increment just gets smaller and smaller, the more water you add. This "potato paradox" illustrates the same effect, but in the other direction, where a small relative decrease yields a large absolute decrease.

If you add water to the potato infinitely (hypothetically speaking), does the water percentage approach 100%? And also, does the solid percentage approach 0%?

If the potato is sufficiently finely divided, and the volume of water is large enough, evetually all the potato will dissolve completely in the water, and there will be no solids left.

Re: Potato paradox

#100

Neat. This bumps up my list of food-related maths from 3 to 4. So far: https://en.wikipedia.org/wiki/Ham_sandwich_theorem https://en.wikipedia.org/wiki/Pizza_theorem https://en.wikipedia.org/wiki/Layer_cake_representation

One of the people I went to university with had a little (very short) mental catalogue of "chromatic mathematical fruit jokes". There are exactly two famous ones. "What's purple and commutes?" "An abelian grape." And: "What's yellow and equivalent to the axiom of choice?" "Zorn's lemon." He invented another, which requires more esoteric knowledge: "What's green and determined up to isomorphism by its first Chern class?" "A lime bundle." I don't remember whether anyone found a credible fourth example.

(Oh, how we laughed.)

[In case anyone reading this thinks the above might be amusing if only they knew what mathematical objects were actually being referred to: (1) No, probably not. (2) Abelian group; Zorn's lemma; line bundle. For the last one, you need to make it the first Stiefel-Whitney class if you're working over the real numbers rather than the complex numbers.]

Post reply on HN