Thread Rating:

Poll

10 votes (45.45%)
9 votes (40.9%)
5 votes (22.72%)
2 votes (9.09%)
7 votes (31.81%)
3 votes (13.63%)
4 votes (18.18%)
3 votes (13.63%)
9 votes (40.9%)
6 votes (27.27%)

22 members have voted

chevy
chevy
Joined: Apr 15, 2011
  • Threads: 2
  • Posts: 75
February 21st, 2021 at 5:19:58 PM permalink
Quote: teliot

Then space filling curves should be equally objectionable. A one dimensional line filling two-dimensional space.



Perhaps it should. Certainly counter-intuitive, but somehow comparing cardinality of two infinite sets (number of points on unit interval to number of points in unit square (for example)) doesn't bother me as much.

I honestly don't know much about space-filling curves beyond a quick wikipedia read. Maybe my mind is limited to differentiable cases.

(From Wikipedia)

Space-filling curves are special cases of fractal curves. No differentiable space-filling curve can exist. Roughly speaking, differentiability puts a bound on how fast the curve can turn.
gordonm888
gordonm888
Joined: Feb 18, 2015
  • Threads: 44
  • Posts: 2809
February 21st, 2021 at 11:06:46 PM permalink
How can you fill the horn with paint without painting the interior surface?

Well, there is a parameter that we are missing and assuming is everywhere equal - the thickness of the coat of paint.

As the flare of the horn stretches out to infinity, the finite thickness of a coat of paint will eventually place some of the coat outside of the "defined volume" of the interior of the horn. Even if the thickness of the coat is one molecule in width, there is an infinite length of horn's flare that is closer to the "length" of the horn than one molecular width.

The problem is really in saying that we fill the horn with paint -because the paint volume becomes infinitely thin as the horn flares out to infinity. Thus, the paint itself must progressively become infinitely thin as the horn flares to infinity. It is this requirement for infinite thinning of the paint layer on the interior of horn that allows a finite volume of paint to cover an infinite surface area.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
marcel55
marcel55
Joined: Feb 21, 2021
  • Threads: 0
  • Posts: 18
February 22nd, 2021 at 5:01:50 AM permalink
Correct man but they are other ways as other people are doing it with other methods also. You can have a view on them also.
Gialmere
Gialmere
Joined: Nov 26, 2018
  • Threads: 39
  • Posts: 1821
February 22nd, 2021 at 7:46:43 AM permalink
Hmm. I'm not sure what the status of this thread is but, here is a classic math puzzle (which I hope hasn't been posted before)...



There is a building of 100 floors
-If an egg drops from the Nth floor or above it will break.
-If it's dropped from any floor below, it will not break.
You're given 2 eggs.

How do you find N in the minimum number of drops?
Have you tried 22 tonight? I said 22.
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 39
  • Posts: 2159
February 22nd, 2021 at 8:33:31 AM permalink
Quote: gordonm888

How can you fill the horn with paint without painting the interior surface?

Well, there is a parameter that we are missing and assuming is everywhere equal - the thickness of the coat of paint.

As the flare of the horn stretches out to infinity, the finite thickness of a coat of paint will eventually place some of the coat outside of the "defined volume" of the interior of the horn. Even if the thickness of the coat is one molecule in width, there is an infinite length of horn's flare that is closer to the "length" of the horn than one molecular width.

The problem is really in saying that we fill the horn with paint -because the paint volume becomes infinitely thin as the horn flares out to infinity. Thus, the paint itself must progressively become infinitely thin as the horn flares to infinity. It is this requirement for infinite thinning of the paint layer on the interior of horn that allows a finite volume of paint to cover an infinite surface area.

I'm trying to imagine the thickness of the paint out near x=Tree(3) ...

No, really, infinite surface area and finite volume have nothing to do with painting, but it's the painting that makes it conceptually difficult to believe.
Personal website: www.ijmp.org
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 97
  • Posts: 4628
February 22nd, 2021 at 8:52:36 AM permalink
Quote: Gialmere

Hmm. I'm not sure what the status of this thread is but, here is a classic math puzzle (which I hope hasn't been posted before)...
There is a building of 100 floors
-If an egg drops from the Nth floor or above it will break.
-If it's dropped from any floor below, it will not break.
You're given 2 eggs.

How do you find N in the minimum number of drops?


I think it has been posted before - in any event, I'm pretty sure I've heard of it, so I'll post what I think is a solution, although I don't have a definitive proof of it yet.

Drop the first egg from the 1st, 3rd, 6th, 10th, ..., floors until either it breaks or you drop it from the 91st floor without breaking.
Go back to 1 floor above the highest one from which you dropped the first egg without breaking, and drop the second egg from each floor until it does.
For example, if it breaks on the 45th floor, the last successful floor was 36, so drop the second egg from the 37th, 38th, 39th,... flooors until it breaks.

Joeman
Joeman
Joined: Feb 21, 2014
  • Threads: 35
  • Posts: 1897
February 22nd, 2021 at 9:01:43 AM permalink
The best way to find N is to drop the first egg from floors at regular intervals until it breaks. Then, with the second egg, start with the the floor above the highest floor from which the first egg did not break, and go up by 1 until it breaks. The floor from which the second egg breaks will be floor 'N.'

The (worst case) number of drops required for this can be represented by the function:

H/x + (x-1)

Where x is the chosen interval, and H is the height of the building in terms of floors.

To find the minimum, set the first derivative of the above function equal to zero:

-H/x2 +1 = 0, which simplifies to x = H1/2

Given H = 100, x must be 10. So, we would then drop the first egg from every 10th floor (starting at floor 10) until it breaks. Then, drop the second egg from the floor directly above where the penultimate drop took place, and go up one floor at a time for subsequent drops until it breaks, indicating floor 'N.' This will take a maximum of 19 drops (when N=99).
"Dealer has 'rock'... Pay 'paper!'"
charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 33
  • Posts: 2322
Thanks for this post from:
Gialmere
February 22nd, 2021 at 9:16:56 AM permalink
Here are various plans - starting with the worst!

Plan A: It seems reasonable that with one egg you could drop from floor 1, floor 2... and just work your way up until you find N. Average number of drops about 50.

With two eggs Plan B, not optimal, is to narrow that range to either 0-50 or 51-100 by dropping one from floor 50, and repeating as above. Average number of drops about 25 + 1. A similar plan is to go up in even numbers (dropping from floor 2,4,6 etc and then when the egg breaks see if it would have dropped from one floor lower. Similarly 25+1.

Plan C, not optimal, is to drop the egg from floor 33. If it breaks go from 0-32. If it doesn't try floor 66. This has a lower average.

Plan D, not optimal, is to drop egg from 10,20,30 etc then hone in on the last digit with the second egg. While this is quicker for low numbers, it takes quite a while with the higher ones.

Plan E, is the best I have found so far (although I don't know how to prove whether it's a minimum).

Suppose you try to ensure the worst case scenario is you needed 14 drops, then that might be better. So for instance if your first drop was on floor 14, then it could take a worst case of 14 to find the floor (14,1,2,3...13). However If you had more drops before the first egg broke, then you might want the gaps smaller. So one plan is drop an egg at 14,14+13=27,27+12=39 etc. and the work your way up. 14 27 39 50 60 69 77 84 90 95 98 seems a good plan and ensures the worst case is 14, I think this gives an average of about 10.35. (I've also ignored that once 99 doesn't break you know it's 100, so the average would be 10.34.)
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1367
  • Posts: 22723
Thanks for this post from:
Gialmere
February 22nd, 2021 at 9:33:17 AM permalink
Quote: Gialmere

How do you find N in the minimum number of drops?



Are you asking for the minimum mean N or the minimum maximum N?

If it's the maximum N, then I get the same answer as Don. Looks like the maximum number of drops needed is ...

14


It's probably the same answer as for the mean N as well.
It's not whether you win or lose; it's whether or not you had a good bet.
Gialmere
Gialmere
Joined: Nov 26, 2018
  • Threads: 39
  • Posts: 1821
February 22nd, 2021 at 9:51:50 AM permalink
Quote: charliepatrick

Here are various plans - starting with the worst!

Plan A: It seems reasonable that with one egg you could drop from floor 1, floor 2... and just work your way up until you find N. Average number of drops about 50.

With two eggs Plan B, not optimal, is to narrow that range to either 0-50 or 51-100 by dropping one from floor 50, and repeating as above. Average number of drops about 25 + 1. A similar plan is to go up in even numbers (dropping from floor 2,4,6 etc and then when the egg breaks see if it would have dropped from one floor lower. Similarly 25+1.

Plan C, not optimal, is to drop the egg from floor 33. If it breaks go from 0-32. If it doesn't try floor 66. This has a lower average.

Plan D, not optimal, is to drop egg from 10,20,30 etc then hone in on the last digit with the second egg. While this is quicker for low numbers, it takes quite a while with the higher ones.

Plan E, is the best I have found so far (although I don't know how to prove whether it's a minimum).

Suppose you try to ensure the worst case scenario is you needed 14 drops, then that might be better. So for instance if your first drop was on floor 14, then it could take a worst case of 14 to find the floor (14,1,2,3...13). However If you had more drops before the first egg broke, then you might want the gaps smaller. So one plan is drop an egg at 14,14+13=27,27+12=39 etc. and the work your way up. 14 27 39 50 60 69 77 84 90 95 98 seems a good plan and ensures the worst case is 14, I think this gives an average of about 10.35. (I've also ignored that once 99 doesn't break you know it's 100, so the average would be 10.34.)


Quote: Wizard

Are you asking for the minimum mean N or the minimum maximum N?

If it's the maximum N, then I get the same answer as Don. Looks like the maximum number of drops needed is ...

14


It's probably the same answer as for the mean N as well.



Correct!

We're looking for the maximum and 14 drops it is. This problem is evidently one of those Google interview questions.

----------------------------------

Saw a sign at a farm that said, "duck, eggs."

I was contemplating the use of the comma when it hit me.
Have you tried 22 tonight? I said 22.

  • Jump to: