Become a part of the TranceAddict community!Frequently Asked Questions - Please read this if you haven'tSearch the forums
TranceAddict Forums > Main Forums > Chill Out Room > Smart?
Pages (12): « 1 2 [3] 4 5 6 7 8 9 10 11 12 »   Last Thread   Next Thread
Share
Author
Thread    Post A Reply
drizzt81
Professional Lamer



Registered: Nov 2001
Location: GTA #1 - At work
Re: Re: Smart?

quote:
Originally posted by AndiH
What's the "worst case"?

assume that you develop an algorithm that will test for the second floor at the very end. the worst case is the number of times you'd have to iterate to get to floor 2.


___________________

get font

I see your 4 Crushs and raise you 3 As The Rush Comes. - Yan from PvD's first summerstage event in '03

Old Post Oct-10-2003 16:35  Germany
Click Here to See the Profile for drizzt81 Click here to Send drizzt81 a Private Message Add drizzt81 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
Re: Re: Re: Re: Re: Re: Smart?

quote:
Originally posted by drizzt81
oops today isn;t my day, i was thinking that i had to DETERMINE the weight of yours.. not balance it..

with a sum of 52 i will be able to tell you how much your weight is :/

still not bad, if that had been teh question

try 1,3,7,17,31,79


I don't follow. If I give you a 100 weight, how can you tell me that it's 100 if your weights sum to 52?

Your 6 weights work, but are suboptimal :-)

Old Post Oct-10-2003 16:49  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
Re: Re: Smart?

quote:
Originally posted by AndiH
What's the "worst case"?


The "worst case" depends entirely on your algorithm. For example, if you decided to drop from 1, then 2, then 3, etc... then your worst case would be the 100th floor. It would take 100 tries in the worst case then. You need an algorithm whose worst case is minimal.

Old Post Oct-10-2003 16:50  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
AndiH
Currently not available.



Registered: Jan 2001
Location: Regensburg, Germany | GTA #15
Re: Re: Re: Smart?

quote:
Originally posted by Flyboy217
The "worst case" depends entirely on your algorithm. For example, if you decided to drop from 1, then 2, then 3, etc... then your worst case would be the 100th floor. It would take 100 tries in the worst case then. You need an algorithm whose worst case is minimal.


No, in that case my worst case would be 99 since you said that the egg would break if dropped from the 100th floor. Also, now I assume that there's no ground floor?

Old Post Oct-10-2003 17:05 
Click Here to See the Profile for AndiH Click here to Send AndiH a Private Message Add AndiH to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
Re: Re: Re: Re: Smart?

quote:
Originally posted by AndiH
No, in that case my worst case would be 99 since you said that the egg would break if dropped from the 100th floor. Also, now I assume that there's no ground floor?


You are correct, 99 is the worst case, since I've implicitly guaranteed you it will break by 100 (by enforcing that you must actually find N, rather than allowing you to say "it doesn't break from 1-100"). It's a moot point though; it doesn't change the optimal algorithm or final answer.

Not sure what you mean by a "ground floor." The eggs may break from story 1, if that's what you mean.

Last edited by Flyboy217 on Oct-10-2003 at 17:25

Old Post Oct-10-2003 17:16  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DigiNut
You kids get off my lawn!



Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe
Re: Re: Re: Re: Re: Re: Re: Smart?

quote:
Originally posted by Flyboy217
I'll go one step further and tell you that you make a faulty assumption in your first sentence. Any more and I'd be telling you the solution.

Ok, I think I've figured it out.

You drop the first egg at the 15th floor. If it breaks, you count up in sequence from 1 to 13 (14 drops).

Then you drop the next egg at the 29th floor. If it breaks, count up in sequence from 16 to 28 (again 14 total).

Keep going up to the 42nd, 54th, 65th, 75th, 84th, 92nd, and 99th floors, which gives you intervals of 11, 10, 9, 8, 7, etc. respectively, all with a total worst-case drop of 14.

So the worst case is 14.

Right?

I'd hardly call this an "elegant" solution though... it's not elegant unless you know it in advance.


___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here

Old Post Oct-10-2003 17:35  Canada
Click Here to See the Profile for DigiNut Click here to Send DigiNut a Private Message Add DigiNut to your buddy list Report this Post Reply w/Quote Edit/Delete Message
DigiNut
You kids get off my lawn!



Registered: Dec 2002
Location: Toronto, Self-proclaimed Centre of the Universe

I still think there's something wrong with your question 3. The cups are in arbitrary positions, and the "genie" can rotate them at an arbitrary angle, and you're saying there's a way to guarantee getting them all face up?

There has to be something in this question that's not random, aside from your instructions. That is, unless we're talking about a Gaussian system and assuming an infinite number of "rounds"...


___________________
My party schedule:
2009-02-21 - DJ Attention @ I'm So Popular
2009-06-18 - DJ Annoying @ People Need To Know Where I'll Be
2012-11-32 - DJ Insufferable ɸ Or At Least the Stalkers I Complain About
2048-06-66 - Spastic & Whocares Although I'm Actually Flattered
9999-45-81 - Tweaker Gimp I Probably Won't Even Go To This But I Have To Make Sure I Fill Up All The Available Space Here

Old Post Oct-10-2003 17:44  Canada
Click Here to See the Profile for DigiNut Click here to Send DigiNut a Private Message Add DigiNut to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...
Re: Re: Re: Re: Re: Re: Re: Re: Smart?

quote:
Originally posted by DigiNut
Ok, I think I've figured it out.

You drop the first egg at the 15th floor. If it breaks, you count up in sequence from 1 to 13 (14 drops).

Then you drop the next egg at the 29th floor. If it breaks, count up in sequence from 16 to 28 (again 14 total).

Keep going up to the 42nd, 54th, 65th, 75th, 84th, 92nd, and 99th floors, which gives you intervals of 11, 10, 9, 8, 7, etc. respectively, all with a total worst-case drop of 14.

So the worst case is 14.

Right?

I'd hardly call this an "elegant" solution though... it's not elegant unless you know it in advance.


The worst case is indeed 14, but your solution is slightly flawed. Suppose the eggs break at 15. Then you try 15, find the egg breaks, and try 1-13 and it doesn't. You don't know whether the answer is 14 or 15 now. Instead, your first drop should be 14.

It extends nicely so that an M-story building requires N drops such that N(N-1)/2 = M. The fun part is understanding that your drops must decrease to balance out the worst case. Most people wrongly believe it must be constant. I sadly removed that joy for you :-P

Old Post Oct-10-2003 17:47  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
starglider
Supreme tranceaddict



Registered: Aug 2001
Location: Montreal, Canada

When I'm in the mood for extra math homework, I'll find you.

Until then... I'll just wait for Acid Junkie to have a go.

Last edited by starglider on Oct-10-2003 at 21:52

Old Post Oct-10-2003 21:31  Canada
Click Here to See the Profile for starglider Click here to Send starglider a Private Message Add starglider to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...

quote:
Originally posted by DigiNut
I still think there's something wrong with your question 3. The cups are in arbitrary positions, and the "genie" can rotate them at an arbitrary angle, and you're saying there's a way to guarantee getting them all face up?

There has to be something in this question that's not random, aside from your instructions. That is, unless we're talking about a Gaussian system and assuming an infinite number of "rounds"...


It is solvable as stated. Feel free to assume an unbounded number of rounds if you like, but please don't try to argue that a random solution will eventually work; it's not *guaranteed* to win.

P.S. I love your pseudo-math terminology. "Real integral" number systems in the "2+2=5" thread. "Directional unit vectors" while trying to explain an n-dimensional space. All that's required of the vectors is that they're linearly independent-- they certainly don't need to be unit, and "directional" is meaningless in this context.

It sounds like you're trying to impress TAs, so I won't burst your bubble. I suppose for the most part, it seems to be working ;-)

Old Post Oct-11-2003 03:07  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Abject Silver
Senior tranceaddict



Registered: Oct 2002
Location: Ottawa, Canada

i direct your attention to 'writing against your life' by richard mitchell, better known as the grammarian.

i love math just as much as the next guy, but uhh.... well, just read it, especially you intellects. you know who you are. it'll kick your asses to infinity and back before you can say 'MENSA!!!'


___________________
You're like a sight for sore eyes, lyrical and gentle, borderlining sentimental...

Old Post Oct-11-2003 04:50  Russia
Click Here to See the Profile for Abject Silver Click here to Send Abject Silver a Private Message Add Abject Silver to your buddy list Report this Post Reply w/Quote Edit/Delete Message
Flyboy217
Senior tranceaddict



Registered: Aug 2003
Location: In DEEP SPACE... Space... space... sp...

quote:
Originally posted by Abject Silver
i direct your attention to 'writing against your life' by richard mitchell, better known as the grammarian.

i love math just as much as the next guy, but uhh.... well, just read it, especially you intellects. you know who you are. it'll kick your asses to infinity and back before you can say 'MENSA!!!'


I couldn't find this title on Amazon. Is it an older book? What's it about?

And I love the way people associate Mensa with "genius." There are societies with *much* higher intelligence requirements (Triple Nine, Iquadrivium) for truly brilliant people :-)

Old Post Oct-11-2003 04:57  United States
Click Here to See the Profile for Flyboy217 Click here to Send Flyboy217 a Private Message Add Flyboy217 to your buddy list Report this Post Reply w/Quote Edit/Delete Message

TranceAddict Forums > Main Forums > Chill Out Room > Smart?
Post New Thread    Post A Reply

Pages (12): « 1 2 [3] 4 5 6 7 8 9 10 11 12 »  
Last Thread   Next Thread
Click here to listen to the sample!Pause playbackunknown track played by Mind-X [2004] [4]

Click here to listen to the sample!Pause playbackDJ Garth & e.t.i - "Twenty Minutes of Disco Glory" (Original Mix) [2003]

Show Printable Version | Subscribe to this Thread
Forum Jump:

All times are GMT. The time now is 22:06.

Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
HTML code is ON
vB code is ON
[IMG] code is ON
 
Search this Thread:

 
Contact Us - return to tranceaddict

Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
Support TA!