free web page hit counter
🛡️
Copyright Notice: This video is officially sourced and embedded from YouTube. For all copyright inquiries, reports, or removals, please contact YouTube's legal team here.
TED-Ed

TED-Ed

22,700,000 subscribers

👁 2,222,676 views

Can you solve the birthday cake riddle? - Marie Brodsky

Video Overview & Insights

Practice more problem-solving at https://brilliant.org/TedEd

Visit https://brilliant.org/TedEd to check out Brilliant’s 60+ courses in math, logic, science, and computer science. They feature storytelling, code-writing, interactive challenges, and plenty of puzzles for you to solve. And as an added bonus, the first 833 of you to use that link will receive 20% off the annual premium subscription fee.

— @TEDEd

--

Your friend’s birthday is tomorrow, and he’s turning… well… you’ve forgotten. A ginormous cake has been prepared and your job is to sculpt his age as the chocolate centerpiece. The birthday boy is a giant, and you’re afraid that if your forgetfulness becomes known, you’ll become part of the feast. Can you figure out your friend’s age before the party? Marie Brodsky shows how.

É só acender/apagar todas e dps deixar uma diferente das outras pra marcar

— @lucasteixeiramacedo6463

Lesson by Marie Brodsky, directed by Igor Coric, Artrake Studio.

Support Our Non-Profit Mission

Plot twist: you lose count

— @GrookeyPeacemaker

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

Support us on Patreon: http://bit.ly/TEDEdPatreon

Uh- Just Climb the Cake. It's a Small Mountain Range, right? You can climb that.

— @builder-b01

Check out our merch: http://bit.ly/TEDEDShop

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

Can't I just put one lever in the middle of the on/off switch and walk until I see that lever again?

— @ITZRAM27

Connect With Us

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

Before going iin thc cake. You walk around and count how many steps for the outside loop. Jump in and walk around turning candles off for the minimum amount of steps for the loop. Turn 1 on and walk around again same steps counting the candles until the lit one.

— @CelsoGarrido-b8w

Sign up for our newsletter: http://bit.ly/TEDEdNewsletter

Follow us on Facebook: http://bit.ly/TEDEdFacebook

I also had another idea: you start at one side, turn on 1, turn off 2, turn on 3, turn off 4 and so on. Althought there is a risk of erasing your first matks, so in case you saw 1on 2 off you'd need to stop and check first if you'd already finish the circle

— @comicsbyazbe

Find us on Twitter: http://bit.ly/TEDEdTwitter

Peep us on Instagram: http://bit.ly/TEDEdInstagram

I run around the tunnel turning them all off then lighting them all again to mark start and end while counting

— @chloelee-g3f

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

Keep Learning

If I’m so small, I’ll just climb on the giant and count the candles form his bed. Since I’m small, he won’t even notice.

— @CookieBox99

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

View full lesson: https://ed.ted.com/lessons/can-you-solve-the-birthday-cake-riddle-marie-brodsky

Love the head bob at 2:30

— @Pomodorosan

Dig deeper with additional resources: https://ed.ted.com/lessons/can-you-solve-the-birthday-cake-riddle-marie-brodsky#digdeeper

Animator's website: https://www.artrake.com

why dont you just turn all candles off except one then go to the lit candle then count all unlit candles until you reach the lit one again then take number of unlit candles and add it to 1

— @Usersif77

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

Thank you so much to our patrons for your support! Without you this video would not be possible! Angel Alberici, Minh Quan Dinh, Sylvain, JasonD, Terran Gimpel, Talia Sari, Katie McDowell, Allen, Sarat Chandra Vegunta, Mahina Knuckles, Charmaine Hanson, Thawsitt, Jezabel, Abdullah Abdulaziz, Adriano Fontes, Xiao Yu, Melissa Suarez, SpartacusDMR, Brian A. Dunn, Francisco Amaya, Daisuke Goto, Matt Switzler, Leonardo Monrroy, Maryam, Bethany Connor, Jeremy Shimanek, Mark Byers, Avinash Amarnath, Xuebicoco, Rare Media, Rayo, Po Foon Kwong, NinjaBoffin, Jesse Jurman, Scott Markley, Elija Peterson, Ovidiu Mrd, paul g mohney, Aravind Battaje, Steven Razey, Nathan Giusti, Helen Lee, Anthony Arcis Benedict, Karthik Balsubramanian, John Hong, Annastasshia Ames, Sean, Amy Lopez, Vinh-Thuy Nguyen and Liz Candee.

what if te giant or someone wakes up from the candles

— @ddfhjmksjfjgj

More User Perspectives

@

Just turn off all the candles while going in a loop at one time then turn on one candle and go count in a circle until you reach the lit candle

@Kaitlynbird-101notaIDIOT
@

Is it valid if you start by making a mark on the cake wall as your starting point (since you aren’t worried about the mark remaining) and then walk through the tunnel and switch off any lights that are on. Use this to count the number of candles on the cake, and continue until a full loop. Then once you are back at the starting point and have the number of lit candles, go back around and turn on the Candles in any order since it is random, and so the giant doesn’t suspect anything. Do this until you have reached the mark - so in total you’ve done only two loops

@cli_shai6405
@

Is the solution not to just start at a turned off candle and then switch each candle on after that and keep track of how many switches you didnt have to flip? Eventually all the candles except one will be turned on and when you get to that point you will know how many switches you didnt have to flip and thats the giants age? Since they were randomly flipped you can just go back and flip off every candle except one...dont put multiple on in a row except for the first two next to the entrance, or if his age is really high then do the opposite. I am confused why this is not one of the solutions, am i missing something

@hailie-jane1771
@

Or , turn all the candles off , choose one of them as a starting point and start counting untill you reach back the first only lit candle

@CosmicCrumb
@

You turn on all the candles, but remember to count them. One you already turn on one and the next one is already on, yup you got the answer 😂

@ShellaMaeAAndo
@

My answer:
Step 1: Run and turn all candles on
Step 2: Continue for 10 minutes until you can’t see any more off switches
Step 3: Stop at a random candle
Step 4: turn every candle off, counting them as you go
Step 5: once you’ve counted,go out and put that number on the cake.

@Human_1888
@

My plan was to go back 3 candles and turn them off, then go forward past the 3 candles and start counting while turning on every candle. If I reach 3 unlit ones in a row followed by every single one lit thereafter, then I'm at the start and can count those 3 for the total number of candles. Though I realise now that if there were a lot of candles then it might be hard to remember my number count... 😅

@pakki6555
@

Bro just ask the freakkin baker for christ's sake😂

@mightyrockfeller9105
@

Here's what I was thinking: Make sure all but one light is turned off, then count from there. Not sure why this wouldn't work.

@avivastudios2311
@

💩take a poop at #1, go around counting them all unit you reach your pile of poop again...💩

@lyonsdavid
@

easy

@pipan6953
@

1:30 nice scratching mate

@WUmotionless8813
@

just leave your shoe at one of the candles then count them until you reach your shoe again

@AdeolaIfekoya
@

turn off all the candles, then switch one on to mark your route, start counting and finish when u find the candle

@daiconicphroggo5564
@

THE TEN

@growupwithkrischannelmadness
@

The right way that I thought would be to move one step right, turn off then one step left turn off and come back to your initial candle which is on. Like this, if you reach a point where you come back to your initial candle and find that its off. Then you'll know you've reached the end of it. I haven't watched the solution yet, but this is what I came up with.

@akyr_01
@

Just go around once ,switch on all candles . then . Next round - switch off one candle and take a round again and count candles on the way while tracing back to off candle

@pearlsadija
@

The fire gem and the Earth gem is in this

@dmetriDunn
@

eyes became this 😐 to this😳2:24

@dmetriDunn
@

Probably not

@LukeTheOceanGuardian
@

Cant you just go around turning all of the candles on first, going around multiple times if you need to make sure that ALL candles are on, then stop at one, turn it only it off, count it, then count all the other ones in the loop and you should know how many once you get back to the one that you turned off?

@superiorclassic
@

0:12+0:00=Me on my mum’s 45th birthday.Or was it her 46th?

@thiyagarajahchella326
@

Pull on one of the candles until it is deeper than the rest.

@JerIbi
@

can't I just ask the baker?

@AserGaming
@

1:23 I mean we’re wearing a jacket so cant we just place it near one of the candles thats not technically making a mark

@limetictac
@

I would say that I need to be on the top of the cake to make the chocolate thing in order to ensure I make it the right size
When they let me up there I will count the number of candles and make the correct number

@_Sami__
@

Just turn off all of the candles then start at one and turn all of them on and once you reach an already lit one youve got the number

@deathbugschannel
@

A better solution would be to modify the 'naive' approach using a "forward check" presented in the following explanation:
Let's define two lists: L and T which will contain sequences of lit (represented by 1) or unlit (represented by 0) candles.


Step0: light the first candle you see and add it to L. At this moment L only contains one lit candle so L = {1}.
Step1: go forward until you see unlit candles and add them to list L. When you bump into a lit candle go to next step
(if this is the first time going through the steps L will look like {1,0, ... , 0} = L)

Let's define L1 as a list equal to L a part from the first entry which is set to 0.
(if this is the first time going through the steps L1 will look like {0,0, ... , 0} = L1)

Step2: turn off the new candle and add it to the list T. Now keep going FARWARD adding all additional new candles to list T as long as it keeps matching the entries of list L1 (the idea is that we are assuming that we already bumped into the original first light, turned it off, restarted the loop and now we are observing the sequence for a second time).
If you encounter a new candle which does not match the sequence in list L1, it means that we are in fact not circling back and we have to discard our guess. go to step 3a.
If you have encountered all candles in the same order as L1, it means that now T=L1 (we are still not sure weather we really circled back or simply got 'lucky' and found a new stretch of the tunnel that matches exactly our previous sequence). Go to step 3B

Step3A: Append list T to list L, empty list T and go back to step 1.
Step3B: IF the next candle is lit, add it to list T and go to step 3A. (this is bad because we wanted this candle to be the original first candle, in our assumption it should be off since we were hoping to have already changed its state in step2. This is the bad scenario where we can conclude that we weren't circling the original sequence for 2 times but actually just got lucky by matching the whole sequence L1 with UNSEEN candles in T).
IF the next candle is unlit, light it and go to step 4 (this is the good scenario where we have hope that what we saw in sequence T were actually the same candles in sequence L1 and we have really done two full loops).

Step4: go back n = |T| (=|L1|) steps until you reach the first candle in list T (which we are hoping is the very first candle that we unlit in step 2 and lit again in step 3B).
IF it is lit, we win, the age of our friend is equal to n.
IF it is not lit, move forward n steps (now we are back at the lit candle that we modified in step 3B) add this state to list T and go to step 3A.

WHST IS THE IDEA?
the point is that we don't really care what the observed sequence is, we start with a sequence that we think includes all and only the candles corresponding to one lull loop and we have to verify this assumptions. To do so, the 'naive' way proceeds by switching off the next candle and going back every time. My algorithm first performs a forward check (which helps to detect false loops much more often) and builds a tentative list T with the observations coming from this forward check (in the best case they math all candles already seen) and only when the forward check matches the observed sequence we perform a 'naive' approach on the tentative list (note that this final check could be performed also going back twice the length of T, meaning the we trace back our steps reverting all the visits in T and all those in L, but it would just be a waste of time since if we really found the loop, the first candle in T is exactly the same as the first one in L). This means that in the worst case scenario we only trace backs our steps by N/2 (where N is the number of total candles seen, in the worst case scenario they will all be unique candles that have not looped yet) and in all other cases where the algorithm fails, we don't lose any progress and actually have a 1:1 gain from our forward check steps.

@l-lsb2084
@

İntervalls, expect, lengthy, trek, slightly, incinspicuous, chisel, enormus, downwind, blows

@İsmayilovNajim
@

Set every candle to the same position (Either on or off) and once you’ve encountered the position you’ve set it to 20 or so times in a row, set them to the opposite position and count how many times you flip a switch.

(This feels oddly simple.)

@RuruSeiko-Shipper
@

Would it not be more efficient to go around and light every candle and then go around again to switch of every candle. When you walk the same loop again you count them as you switch them off. If you find a candle witch is already switched of you can just start over.

@Mimeypen
@

The best method is to switch off all candels than switch on each candel counting them.
No, how many years the giant is going to have doesnt matter.

@IoDavide1
@

tell the giant that at least one of his eyes are green

@jaydahsoutar805
@

Go around the cake and turn off all of the candles. Then, pick one as your starting point, and count that as the first candle. Go around the cake and count until you’ve reached the lit one, but don’t count the lit one, or else you would have one extra. The number you counted is the giants age.

@TheSTwins23
@

confirm that you have green eyes.

@Guest_7410
@

in my opinion, the real question is how TedEd managed to guess my age-

@Guest_7410
@

you can just make a pattern of on and off light for first five candles like "on,off,on,off,on" the possibility of this combination accuring is very low orr just brake one candle switch as a mark and keep counting

@Notannant
@

Just keep turning candles off until you go past 20 unlit candles in a row. Then light one and count from there. If the total is less than the distance from the first to last lit candle you know that you didn’t go far enough. If it is more than 20+ that distance you also know you didn’t go far enough.

@duke_hugo