Conversation
Notices
-
Embed this notice
ExtraSpecialK (extraspecialk@poa.st)'s status on Wednesday, 20-Sep-2023 03:49:41 JST
ExtraSpecialK
@shibao @p @olmitch @pernia @not_br549 @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker unironically though, what's the answer? -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:46 JST
pistolero :thispersondoesnotexist:
@MK2boogaloo @sysrq @0 @adiz @dcc @kirby @meso @mia @nishi @not_br549 @olmitch @pernia @shoutboxgangstalker O(log(n)). This is question is less an "IQ test" and more a "Were you awake during CS-101 or can you at least recognize a binary search when you see it?" -
Embed this notice
Avatar of Chaos (mk2boogaloo@freebeerextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:47 JST
Avatar of Chaos
@sysrq @0 @adiz @dcc @kirby @meso @mia @nishi @not_br549 @olmitch @p @pernia @shoutboxgangstalker solve this first, fucker. -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:54:48 JST
tsoifan1997
@MK2boogaloo @mia @0 @adiz @dcc @kirby @meso @nishi @not_br549 @olmitch @p @pernia @shoutboxgangstalker
retard -
Embed this notice
Avatar of Chaos (mk2boogaloo@freebeerextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:49 JST
Avatar of Chaos
@mia @dcc @pernia @p @nishi @not_br549 @0 @kirby @shoutboxgangstalker @sysrq @olmitch @adiz @meso best FE. -
Embed this notice
Jolly Rancher (not_br549@jollyville.net)'s status on Wednesday, 20-Sep-2023 02:54:50 JST
Jolly Rancher
in 1995 i bought a computer with a plan to install something other than microsoft on it. i bought a book on Linux that had a cd in an envelope glued inside the back cover. it ran off the cd, which made it painfully slow. and when you ejected the cd it went back to Windows 95.
next thing i tried was Slackware. everything is a tarball -- at least it was quicker than the cd. i blew away Win95 for Slackware. and then stumbled on Debian -- it had a package manager woo hoo!
but by about 2002 or so, i was just running whatever came with the computer, since it was evident that everyone was not going to do what desperately needed to be done, and dump mickeysoft.
so this operating system apathy persisted until some time into the 2010s, about the time systemd and codes of conduct were being forced onto every distro.
i knew civilization was crashing but the wreckage of open source software has been a shocking thing to behold. -
Embed this notice
mia (mia@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:50 JST
mia
@not_br549 @p @dcc @pernia @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @olmitch @adiz @meso
So, is the gnome thing ironic or? -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:51 JST
pistolero :thispersondoesnotexist:
@not_br549 @dcc @pernia @mia @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @olmitch @adiz @meso I tried to use Debian back in The Day. It was always terrible and smug and cringe but it used to uninstall your kernel when you tried to update.
I don't know anything about the guy himself, but his distro sucked before most people on fedi were born. -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:52 JST
pistolero :thispersondoesnotexist:
@not_br549 @mia @dcc @pernia @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @olmitch @adiz @meso It was before. Also before the first time he left (involuntarily). -
Embed this notice
Jolly Rancher (not_br549@jollyville.net)'s status on Wednesday, 20-Sep-2023 02:54:52 JST
Jolly Rancher
<amateur-psychiatry>he suffered from bipolar disorder, and was undiagnosed and unmedicated. </amateur-psychiatry>
sometimes they do the most amazing midnight code projects, but they can be hard to live with.
I did not pay that much attention to him over the years, but at some point the distro started going downhill . . . -
Embed this notice
mia (mia@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 02:54:53 JST
mia
@not_br549 @olmitch @pernia @dcc @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @adiz @meso
Thank goodness for dead cops. -
Embed this notice
Jolly Rancher (not_br549@jollyville.net)'s status on Wednesday, 20-Sep-2023 02:54:53 JST
Jolly Rancher
Since ian left, it has become a crock of shit. -
Embed this notice
Jolly Rancher (not_br549@jollyville.net)'s status on Wednesday, 20-Sep-2023 02:54:54 JST
Jolly Rancher
I was on twitter that evening, and saw his desperate tweets... did not know what to do, it was very sad.
America, where you call the police if there's a problem, and they come shoot your dog and beat you senseless... -
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 02:54:55 JST
Mitch Conner
@pernia @dcc @mia @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @adiz @meso *murdered by police -
Embed this notice
þernia (pernia@cum.salon)'s status on Wednesday, 20-Sep-2023 02:54:56 JST
þernia
@dcc @mia @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @olmitch @adiz @meso >debian
>portmantou of debby (spiteful opportunistic bitch) and ian (faggot that killed himself) -
Embed this notice
✙ dcc :pedomustdie: :phear_slackware: (dcc@annihilation.social)'s status on Wednesday, 20-Sep-2023 02:54:57 JST
✙ dcc :pedomustdie: :phear_slackware:
@adiz @meso @mia @p @olmitch @MK2boogaloo @kirby @sysrq @nishi @pernia @shoutboxgangstalker @0 >his distro does not have hot ladies -
Embed this notice
:verified_2:防空識別區𝒔𝒐𝒄𝟶 (adiz@soc0.outrnat.nl)'s status on Wednesday, 20-Sep-2023 02:54:59 JST
:verified_2:防空識別區𝒔𝒐𝒄𝟶
@pernia@cum.salon
:opensuse:
@meso@the.asbestos.cafe @mia@freespeechextremist.com @p@freespeechextremist.com @olmitch@shitposter.club @dcc@annihilation.social @MK2boogaloo@lab.nyanide.com @kirby@lab.nyanide.com @sysrq@lab.nyanide.com @nishi@hkgk.nishi.boats @shoutboxgangstalker@lab.nyanide.com @0@lab.nyanide.com -
Embed this notice
þernia (pernia@cum.salon)'s status on Wednesday, 20-Sep-2023 02:55:01 JST
þernia
@adiz @meso @mia @p @olmitch @dcc @MK2boogaloo @kirby @sysrq @nishi @shoutboxgangstalker @0 you are FUCKING NIGGER -
Embed this notice
:verified_2:防空識別區𝒔𝒐𝒄𝟶 (adiz@soc0.outrnat.nl)'s status on Wednesday, 20-Sep-2023 02:55:03 JST
:verified_2:防空識別區𝒔𝒐𝒄𝟶
@pernia@cum.salon I'm an openSUSE stan but I also really like Debian and it would be my second choice (used to be my primary). :debian: @olmitch@shitposter.club @dcc@annihilation.social @mia@freespeechextremist.com @p@freespeechextremist.com @nishi@hkgk.nishi.boats @0@lab.nyanide.com @MK2boogaloo@lab.nyanide.com @kirby@lab.nyanide.com @shoutboxgangstalker@lab.nyanide.com @sysrq@lab.nyanide.com @meso@the.asbestos.cafe
-
Embed this notice
þernia (pernia@cum.salon)'s status on Wednesday, 20-Sep-2023 02:55:05 JST
þernia
@olmitch @dcc @mia @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @meso debian is explicitly dogshit -
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 02:55:06 JST
Mitch Conner
@pernia @dcc @mia @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @meso >implying Debian bad -
Embed this notice
þernia (pernia@cum.salon)'s status on Wednesday, 20-Sep-2023 02:55:07 JST
þernia
@0 @dcc @mia @p @nishi @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @meso >debian -
Embed this notice
0 (https://lab.nyanide.com/users/0)'s status on Wednesday, 20-Sep-2023 02:55:08 JST
0
@kirby @sysrq @MK2boogaloo @dcc @meso @mia @nishi @p @pernia @shoutboxgangstalker
> relying on apt to update shit quickly instead of just yt-dlp -U
ngmi -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:09 JST
Pleroma-tan
@sysrq @0 @MK2boogaloo @dcc @meso @mia @nishi @p @pernia @shoutboxgangstalker debian stable has a broken version iirc -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:10 JST
tsoifan1997
@kirby @0 @MK2boogaloo @dcc @meso @mia @nishi @p @pernia @shoutboxgangstalker
yt-dlp --extract-audio --audio-format mp3 -
Embed this notice
tsoifan1997 (sysrq@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:11 JST
tsoifan1997
@kirby @0 @MK2boogaloo @dcc @meso @mia @nishi @p @pernia @shoutboxgangstalker
skill issue -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:11 JST
Pleroma-tan
@sysrq @0 @MK2boogaloo @dcc @meso @mia @nishi @p @pernia @shoutboxgangstalker i forgot i could use ffmpeg fug -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:12 JST
Pleroma-tan
@0 @dcc @meso @mia @MK2boogaloo @nishi @p @pernia @shoutboxgangstalker @sysrq i cant get it as mp3 -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:13 JST
Pleroma-tan
@sysrq @MK2boogaloo @nishi @pernia @dcc @mia @0 @shoutboxgangstalker @meso @p @mojang@microsoft.com -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Wednesday, 20-Sep-2023 02:55:14 JST
Pleroma-tan
https://www.youtube.com/watch?v=QhPHB6ovnKE -
Embed this notice
:verified_2:防空識別區𝒔𝒐𝒄𝟶 (adiz@soc0.outrnat.nl)'s status on Wednesday, 20-Sep-2023 02:58:03 JST
:verified_2:防空識別區𝒔𝒐𝒄𝟶
@shibao@misskey.bubbletea.dev If anyone thinks I'm going to do math or comprehend code they're sorely mistaken. I'm just going to blindly execute commands in terminal and break shit until I learn what works and what doesn't work. And then I'm going to get real superstitious about it. @p@freespeechextremist.com @MK2boogaloo@lab.nyanide.com @sysrq@lab.nyanide.com @0@lab.nyanide.com @dcc@annihilation.social @kirby@lab.nyanide.com @meso@the.asbestos.cafe @mia@freespeechextremist.com @nishi@hkgk.nishi.boats @not_br549@jollyville.net @olmitch@shitposter.club @pernia@cum.salon @shoutboxgangstalker@lab.nyanide.com
In conversation permalink 受不了包 likes this. -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 04:05:28 JST
pistolero :thispersondoesnotexist:
@shibao @olmitch @pernia @not_br549 @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker If it can crack at the bottom floor and might not crack from the top floor, binary search seems like the fastest way to do this. What is the optimal solution? In conversation permalink -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 04:07:46 JST
pistolero :thispersondoesnotexist:
@shibao @olmitch @pernia @not_br549 @ExtraSpecialK @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker
> Given two eggs, find the highest floor an egg can be dropped from without breaking, with as few drops as possible.
Wait, this is different from the problem statement in the image. This is just "start from the bottom and go up", the image was like "What's the worst-case number of floors you have to test?"In conversation permalink -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 04:11:05 JST
pistolero :thispersondoesnotexist:
@shibao @0 @ExtraSpecialK @MK2boogaloo @adiz @dcc @kirby @meso @mia @nishi @not_br549 @olmitch @pernia @shoutboxgangstalker @sysrq Yeah, yeah, that article gives the problem as "Given two eggs, find the highest floor an egg can be dropped from without breaking, with as few drops as possible." and the image gives it as "What is the minimum number of attempts required to find the critical floor (in the worst case)?"
Here is another problem, it's a topology problem: 全部egg.
egg.jpg
eggirl.jpgIn conversation permalink Attachments
-
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 04:14:08 JST
pistolero :thispersondoesnotexist:
@shibao @olmitch @pernia @not_br549 @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker The trick here is that if I go from the bottom up to maximiz viable eggs at the end instead of minimize the number of steps, then when it's over, I am guaranteed to still get to eat an egg. In conversation permalink -
Embed this notice
armpit licker feet smeller (tiskaan@fedi.layer02.net)'s status on Wednesday, 20-Sep-2023 05:02:42 JST
armpit licker feet smeller
@shibao @p @olmitch @pernia @not_br549 @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker the best solution is to go to trade school In conversation permalink 受不了包 likes this. -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 05:27:59 JST
pistolero :thispersondoesnotexist:
@shibao @olmitch @pernia @not_br549 @dcc @mia @meso @adiz @sysrq @kirby @MK2boogaloo @nishi @0 @shoutboxgangstalker I like this solution. In conversation permalink 受不了包 likes this. -
Embed this notice
Sexy Moon (moon@shitposter.club)'s status on Wednesday, 20-Sep-2023 05:33:34 JST
Sexy Moon
@olmitch @not_br549 @0 @MK2boogaloo @adiz @dcc @ins0mniak @kirby @meso @mia @nishi @p @pernia @shibao @shoutboxgangstalker @sysrq same haha In conversation permalink -
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 05:33:35 JST
Mitch Conner
@not_br549 @dcc @pernia @ins0mniak @mia @p @nishi @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @shibao @adiz @meso I am still fluent in grafitti In conversation permalink Attachments
-
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 05:33:36 JST
Mitch Conner
@ins0mniak @dcc @pernia @mia @p @nishi @not_br549 @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @shibao @adiz @meso yeah this was more of a palm pilot experience. it was similar but the screen was monochrome. People did some cool stuff with it. I remember playing a 3d pong game, a bust a move clone, and doing a lot of drawing and reading text files on there. In conversation permalink Attachments
-
Embed this notice
Jolly Rancher (not_br549@jollyville.net)'s status on Wednesday, 20-Sep-2023 05:33:36 JST
Jolly Rancher
Early palms were monochrome. And i never got used to their shorthand. In conversation permalink -
Embed this notice
ins0mniak (ins0mniak@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 05:33:37 JST
ins0mniak
@olmitch @0 @MK2boogaloo @adiz @dcc @kirby @meso @mia @nishi @not_br549 @p @pernia @shibao @shoutboxgangstalker @sysrq I still have my ti-85. It was fun plugging it into a desktop and sharing programs and such.
There were actually some fun games for it, I think I used it for everything but my math homeworkIn conversation permalink -
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 05:33:38 JST
Mitch Conner
@ins0mniak @dcc @pernia @mia @p @nishi @not_br549 @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @shibao @adiz @meso I got mine after it was already canceled by TI, on sale at office depot. Many good memories with this thing. Nice little sketch pad, and it had an active Dev community with all sorts of apps and games In conversation permalink -
Embed this notice
Mitch Conner (olmitch@shitposter.club)'s status on Wednesday, 20-Sep-2023 05:33:39 JST
Mitch Conner
@ins0mniak @dcc @pernia @mia @p @nishi @not_br549 @0 @MK2boogaloo @kirby @shoutboxgangstalker @sysrq @shibao @adiz @meso I learned it on this In conversation permalink Attachments
-
Embed this notice
ins0mniak (ins0mniak@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 05:33:39 JST
ins0mniak
@olmitch @0 @MK2boogaloo @adiz @dcc @kirby @meso @mia @nishi @not_br549 @p @pernia @shibao @shoutboxgangstalker @sysrq I wanted one of those so bad back then man, but I couln't afford it In conversation permalink -
Embed this notice
ins0mniak (ins0mniak@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 05:33:40 JST
ins0mniak
@p @adiz @0 @MK2boogaloo @dcc @kirby @meso @mia @nishi @not_br549 @olmitch @pernia @shibao @shoutboxgangstalker @sysrq I learned Basic on a calculator. In conversation permalink -
Embed this notice
pistolero :thispersondoesnotexist: (p@freespeechextremist.com)'s status on Wednesday, 20-Sep-2023 05:33:41 JST
pistolero :thispersondoesnotexist:
@adiz @meso @shibao @mia @olmitch @dcc @MK2boogaloo @kirby @sysrq @not_br549 @nishi @pernia @shoutboxgangstalker @0 You should do some math, it's fun for the entire family. In conversation permalink -
Embed this notice
CEO of Monoeye Dating (ceo_of_monoeye_dating@lab.nyanide.com)'s status on Thursday, 21-Sep-2023 07:03:02 JST
CEO of Monoeye Dating
@ai @roboneko @mia @p @scenesbycolleen @shibao @MercurialBlack @ExtraSpecialK @meso >Let me say the same thing in an unnecessarily confusing way
>Right after roboneko is confused by your less confusing explanation
bruhIn conversation permalink -
Embed this notice
mist (ai@cawfee.club)'s status on Thursday, 21-Sep-2023 07:03:03 JST
mist
@ceo_of_monoeye_dating @roboneko @mia @p @scenesbycolleen @shibao @MercurialBlack @ExtraSpecialK @meso
Eye agree with what CMD wrote. Let me say the same thing in an unnecessarily confusing way:
I like the "minimax" perspective which says that, since the question is asking about the worst-case scenario, I can imagine that I am playing against an adversary who decides, at each step, whether my egg cracks or survives. (Of course, his decisions must be self-consistent.)
Suppose I choose to drop my first egg at the midpoint N/2. I will be strictly better off in the world where my egg *doesn't* break because I'll have the same number of floors (N/2 - 1) to rule out but one more egg to do it with. Therefore, the adversary will choose to have my egg break.
In the optimal solution, the adversary should be indifferent to every choice which he is faced with. I accomplish this by dropping the first egg lower than N/2. Then, in the world where my egg "does" break, the handicap of having one less egg is balanced out by the advantage of having fewer floors to rule out. Effectively, I am buying insurance.
If the question had asked about the average scenario (w.r.t. some distribution), it would be as if the adversary doesn't play perfectly. It is still advantageous to purchase the insurance, but less insurance is needed because the adversary may fail to exploit my weakness. This intuition tells you that the optimal strategy for the average scenario would involve dropping each egg at a point higher than the "worst case" answer but still lower than N/2.
---
Another perspective is that an answer such as "binary search until the last egg, and then linear search" should set off warning bells because there's no reason why "1 egg" and ">1 eggs" should have such a stark difference.
If there are a lot of eggs (specifically, > log_2(N)), then you obviously do binary search. If there's only 1 egg, then you have to do linear search. It makes sense that the general answer would smoothly interpolate between these two regimes, which it does.
In fact, for E eggs, the number of steps required is O(N^(1/E)), and this order of growth does converge to O(log N) in the limit E -> infinity. (Related fact: geometric mean is the power mean for exponent p = 0, as explained here: https://en.wikipedia.org/wiki/Generalized_mean )In conversation permalink Attachments
-
Embed this notice
CEO of Monoeye Dating (ceo_of_monoeye_dating@lab.nyanide.com)'s status on Thursday, 21-Sep-2023 07:03:04 JST
CEO of Monoeye Dating
@roboneko @ExtraSpecialK @MercurialBlack @ai @meso @mia @p @scenesbycolleen @shibao
Think about it concretely, like in the linked post:
If you have two eggs and 100 floors and you binary search, and the egg cracks on the 49th floor, the binary search makes you check 50 times.
If you have two eggs and you use your first egg to check every 10th floor starting from the bottom, and the egg cracks on the 99th floor, this makes you check 19 times. Which is better.
You benefit from skewing the partition by making the "oh fuck I'm out of eggs" scenario less bad. This makes the problem "how do we optimize this, if we're allowed so many eggs"?In conversation permalink -
Embed this notice
CEO of Monoeye Dating (ceo_of_monoeye_dating@lab.nyanide.com)'s status on Thursday, 21-Sep-2023 07:03:05 JST
CEO of Monoeye Dating
@roboneko @ai @ExtraSpecialK @MercurialBlack @meso @mia @p @scenesbycolleen @shibao Not really. You're not picking the center floor each time - you're picking something else. In conversation permalink -
Embed this notice
Neko McCatface v2023 :verified::makemeneko: (roboneko@bae.st)'s status on Thursday, 21-Sep-2023 07:03:05 JST
Neko McCatface v2023 :verified::makemeneko:
@ceo_of_monoeye_dating @ExtraSpecialK @MercurialBlack @ai @meso @mia @p @scenesbycolleen @shibao idgi. assuming the answer was selected from a uniform distribution how can you benefit from skewing the size of the partitions? since when you run out of eggs you will have equal probability of continuing the next phase of your search in either partition ... right? :hyperconfused:
dWmn4R.jpegIn conversation permalink Attachments
-
Embed this notice
Neko McCatface v2023 :verified::makemeneko: (roboneko@bae.st)'s status on Thursday, 21-Sep-2023 07:03:06 JST
Neko McCatface v2023 :verified::makemeneko:
@ai @ceo_of_monoeye_dating @mia @p @scenesbycolleen @shibao @MercurialBlack @ExtraSpecialK @meso tired, hopefully not saying something really dumb. isn't that just an awful lot of words to describe "binary search and pivot to brute force when you're about to run out of eggs"? In conversation permalink -
Embed this notice
mist (ai@cawfee.club)'s status on Thursday, 21-Sep-2023 07:03:07 JST
mist
@ExtraSpecialK @mia @p @shibao @meso
Here's the answer to the originally-posted question (see pic), with N floors and E eggs.
For any M, define S(M, E) to be the number of ways to choose at most E elements from a set of size M. In other words, it's the sum of the first (E+1) numbers in the (M+1)-st row of Pascal's Triangle.
The answer is the smallest M such that S(M, E) > N.
To see why S(M, E) shows up, consider the possible outcomes of performing M drops. Each outcome can be summarized by saying, for each drop, whether a crack happened at that drop. Since we only have E eggs, there can be at most E cracks, so the set of possible outcomes has size at most S(M, E).
Since there are N+1 possible answers, we certainly need M to be big enough such that S(M, E) >= N+1. This shows that the claimed answer is a lower bound.
To show that it's an upper bound, we have to construct a strategy. The key is to observe that S(M-1, E-1) + S(M-1, E) = S(M, E) + 1, essentially by Pascal's Identity. Do the first drop from floor S(M-1, E-1). If the egg survives, then we have E eggs left and at most S(M-1, E) - 1 floors to rule out. If the egg cracks, then we have E-1 eggs left and exactly S(M-1, E-1) - 1 floors to rule out. In either case, we can proceed inductively.
cc @ceo_of_monoeye_dating @MercurialBlack @scenesbycolleen @robonekoIn conversation permalink Attachments
-
Embed this notice
Neko McCatface v2023 :verified::makemeneko: (roboneko@bae.st)'s status on Thursday, 21-Sep-2023 13:08:47 JST
Neko McCatface v2023 :verified::makemeneko:
@ceo_of_monoeye_dating @ai @ExtraSpecialK @MercurialBlack @meso @mia @p @scenesbycolleen @shibao amusingly enough what actually got me was comprehending the scenario itself. I failed to notice that the depth to which the partitioning search runs is dependent on the direction in which you branch at each step. as soon as I saw "sorted search" I apparently stopped thinking :blobfoxlaughsweat:
as a conceptual explanation I actually really like AI's scenario with the adversary
it's interesting that this property which seems somewhat unusual from the perspective of a search algorithm running on a dataset that fits within RAM is probably the norm in the physical realm (most irl scenarios have severely non-uniform cost functions, resources are usually severely limited, success is often not guaranteed)
but learning that it's been used as an interview question I have to wonder what candidate characteristics the problem was actually filtering for. in a situation where someone is expecting you to pose scenarios with which to quickly demonstrate some basic proficiency I think they're quite likely to miss unusual details and I'm not sure what catching that is supposed to accomplish
:blobcatsuit: aHA! you *thought* I wanted you to demonstrate inverting a binary tree but you were in fact mistaken!
:gura_pain: so then if you hire me, can I expect such confusing communication of requirements to be a regular thing?In conversation permalink
-
Embed this notice