The River-Crossing Puzzle (Dino + Santa edition)

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 444

  • @galacticfish6380
    @galacticfish6380 Рік тому +414

    Loved the generalizing of the solution at the end there, but I wonder, what if we adjust the number of people rather raft can carry?
    That expands the number of movement vectors we get so I can imagine that we would get different solutions. Is there any point at which we would need more rafts, or does that stop once one extra person can get on?

    • @tetrachart4156
      @tetrachart4156 Рік тому +53

      I mean theses also the consideration of if the Dino eating Santa caveat should be applied also on the rafts as well.

    • @carykh
      @carykh  Рік тому +142

      Thanks galacticfish! Oooh, bigger rafts is an interesting variation to try. I think it actually wouldn't be too hard to test - I'd just have to add more legal moves to my array, which right now is (1,0,1), (2,0,1), (0,1,1), (0,2,1), (1,1,1). Tetrachart brings up an interesting point though, that 2 Dinos could eat a Santa while on the raft haha
      My guess is, once we have a raft that can hold 4 creatures, you can just shimmy along the diagonal (2D + 2S cross, 1D + 1S come back, repeat over and over)

    • @Aelfraed26
      @Aelfraed26 Рік тому +8

      @@carykh You should do a short with the increased carrying capacity of each raft.

    • @kleko
      @kleko Рік тому +2

      Adding capacity should just change the previous constant in n - 2 rafts yeah? as in n - x where n is amount of santas and x is raft carry capacity.
      Well kinda. I'm not enough of a math kid to add a stipulation that the sum must be at least 1, but other than that it should be correct. Any added capacity should just push the middle gap problem one step further away.

    • @syfontenot7427
      @syfontenot7427 Рік тому +2

      @@carykh Could possibly change the nom nom condition from strictly greater than to greater than or equal to and then to greater than or equal to Santas - 1. I do fear, however, that the same patterns will arise on the edge cases (where size is 1 off nom nom threshold). And I assume there is a way to procedurally calculate moves rather than hardcoding them to an array. Another expansion could be of adding like a rock-paper-scissors equivalent (idk the specifics), but that’ll get rid of the 3 dimensions. Perhaps have a graph of graphs and at some point (if you delve into 5 or 6 dimensions) just display the result(s) instead. Love this graph theory approach!

  • @MeesterTweester
    @MeesterTweester Рік тому +545

    Santa should fly on his sleigh across the river

    • @asheep7797
      @asheep7797 Рік тому +26

      The last 9 word TWOW-Mission.

    • @IMC_123
      @IMC_123 Рік тому +20

      @@asheep7797 the Nine Words Of Intelligence

    • @rhebucks_zh
      @rhebucks_zh Рік тому +2

      I watched 3 seconds of your video confessional and I now know that the description "the sun kid" makes sense.

    • @naterhythm
      @naterhythm Рік тому +5

      genius

    • @Koweret
      @Koweret Рік тому +2

      @@IMC_123 NWOI

  • @shuu-wasseo
    @shuu-wasseo Рік тому +185

    omg this is such an interesting way to visualise the puzzle! i wonder what other similar puzzles look like on a similar graph

    • @ioium299
      @ioium299 Рік тому

      but you believe the ted-ed riddle is wrong?

    • @shuu-wasseo
      @shuu-wasseo Рік тому +1

      @@ioium299 what

  • @garyweibel1372
    @garyweibel1372 Рік тому +48

    I’ll keep this in mind next time I’m visiting the North Pole in the Cretaceous period

  • @SonicPman
    @SonicPman Рік тому +51

    As a Yoshi, I’m glad carykh is finally giving us some representation.

    • @f.u.m.o.5669
      @f.u.m.o.5669 Рік тому +1

      True. I'm a Yoshi rights activist.

    • @polyplayer
      @polyplayer Рік тому +2

      Ditching Yoshis off a cliff should be illegal

    • @PrideEepy64
      @PrideEepy64 Рік тому

      @@polyplayerYoshi is popular on Super Mario Galaxy 2 that doesn’t exist on 3D All Stars Back in March 31st 2021

    • @polyplayer
      @polyplayer Рік тому

      @@PrideEepy64 im talking about super mario world

    • @PrideEepy64
      @PrideEepy64 Рік тому

      @@polyplayer I know but I was also referring to another part of Yoshi in Super Mario Galaxy 2
      I am aware of Yoshi cliff in Super Mario World

  • @koopa472
    @koopa472 Рік тому +34

    8:20 no way!!!!!
    Jokes aside, this is a really cool visualization of this problem that I never would’ve thought of. Great video as always!

    • @unarei
      @unarei Рік тому +5

      every state that can be explored hazbin

    • @zieykey
      @zieykey Місяць тому

      and hazbin 🥶🥶🥰🤩🤩😘🥳😘😍🤩😘🤪😝😝🤤😜🤤😛😏😜😔🥲😍😗😍😗😌😚🤣

  • @Siuwajansiwa
    @Siuwajansiwa Рік тому +7

    I like how it shows these visualizations can offer insights that are hard to see by just thinking through it.

  • @keyboardtalk
    @keyboardtalk Рік тому +10

    8:56 dang that got deep really quick...
    Had to solve this problem in college using PROLOG. Never fully understood how that worked.

  • @thomasrosebrough9062
    @thomasrosebrough9062 Рік тому +24

    Love this new style of video editing, Cary! I can tell you had fun with little bits like the "so wasteful" voice in the background lol

  • @pinkorcyanbutlong5651
    @pinkorcyanbutlong5651 Рік тому +50

    Pretty neat visualisation, would be a fun project (for me, or someone else) to write a solver using these heuristics, given an 'n' input, output an array of vectors of each step
    Also, I guess you chose this version of the puzzle (or, TED-Ed) because its the easier one to visualize and reason about, while the other versions are more nuanced, like the one with the farmer, wolf, goat, and cabbage, or the one with a whole family that is super weird

    • @carykh
      @carykh  Рік тому +18

      Thanks PinkorCyan! Yeah, I did feel lucky when I realized this version of the puzzle only has 3 dimensions, when many other variations could easily have 5, 10, 15. Interestingly, the wolf+goat+cabbage one (which is arguably more well-known) actually has a 3D representation I found on Wikipedia! (but it's designed slightly differently)

  • @DGCubes
    @DGCubes Рік тому +13

    8:58 Cary's getting too real :P Love the video!!

  • @Bladieblah
    @Bladieblah Рік тому +4

    1:32 Ha, I knew you would slip and call em Yoshi's at least once! Cool Yoshi models btw, honestly clicked for the Yoshi, wondering what it was doing here in a puzzle video

  • @handupandu6000
    @handupandu6000 Рік тому +38

    i love the visualization, i never would have thought about it this way. your videos are the best

  • @Monkeylordz88
    @Monkeylordz88 Рік тому +9

    I love your algorithm videos and how you explore the concepts visually, so glad to see them return!

  • @AgainsaidBen
    @AgainsaidBen Рік тому +97

    So great! I feel like I'm actually understanding the world in extra dimensions. P.S. I still show your scale of the universe to my students every term.

    • @carykh
      @carykh  Рік тому +37

      Thanks Ben! Oh wow, it's really cool to hear that my Scale of Universe is still playing a small part in students' education 😃
      (One of these days the students themselves will be younger than the website, aaaaaa)

    • @flyingduck91
      @flyingduck91 Рік тому +3

      extra dimensions? this is just 3d

    • @AgainsaidBen
      @AgainsaidBen Рік тому +7

      @@flyingduck91 agreed, but it *feels* like extra dimensions, probably because as he stated in the video, we're used to looking at the problem from only one particular perspective, not all at once.

    • @drenz1523
      @drenz1523 Рік тому +1

      Now that I think about it, is a scale of the universe website with 3d models ever possible?

    • @Horbiflorbin
      @Horbiflorbin Рік тому

      ​@@drenz1523i guess? It's just replacing anything 2d with 3d models besides stuff like text and ui
      It would take AGES but would be possible

  • @RTOF
    @RTOF Рік тому +5

    I am really loving this method of visualization, it’s just one of the simplest

  • @javianwilliams7463
    @javianwilliams7463 Рік тому +3

    0:42 “None of these creatures can swim.”
    (Childhood Memories of Winter plays)

  • @patrickgh3
    @patrickgh3 Рік тому +4

    Love this visualization, that it generalizes to an arbitrary number of dinos, santas, and rafts, and that you can be confident you didn't miss any alternate solutions! :) Fantastic video!

  • @javianwilliams7463
    @javianwilliams7463 Рік тому +3

    1:17 “-in their journey, the Dinosaurs can’t help but eat the Santa, killing him.”
    (Childhood Memories of Winter plays)

  • @BladeTheGabite
    @BladeTheGabite Рік тому +7

    I would really love to see this with other bridge crossing problems like the lamp and torch one!

  • @Meowicat
    @Meowicat Рік тому +8

    Yoshis: flutterjump across the river
    Santas: use their sleigh to fly over the river
    Raft: :(

  • @CamOrSomething
    @CamOrSomething Рік тому +3

    move #1. move 2 dinos | move #2. move 2 santas | move #3. move the remaining santa and dino

  • @jdh9419
    @jdh9419 Рік тому +3

    1:30 He got tired of saying dinosaur and finally saved our souls

  • @matthewgoodman434
    @matthewgoodman434 Рік тому +4

    I've been working on a similar thing, making data visualizations for the puzzle "signpost". the terminology of graph types that you mentioned will definitely be useful to me. thanks!

  • @dunlopchop
    @dunlopchop Рік тому +1

    would never think to see so many tautologies of the river-crossing puzzle being fleshed out in one comfortable niche since this interpretation of the experiment would agree in every aspect

  • @Healion123
    @Healion123 Рік тому +3

    this is really satisfying to watch! seeing how you dissected the graph to show the solution was cool

    • @DPS-2004
      @DPS-2004 Рік тому

      i keep on forgetting that rdl members exist outside of rdl and being surprised

    • @wankadool2111
      @wankadool2111 Рік тому

      @@DPS-2004 i keep forgetting that rdl exists

  • @minebrandon95264
    @minebrandon95264 Рік тому +2

    Yeah this video makes it so much easier to understand than the ted ed video especially with the higher level crossings

  • @philyk.illagan3161
    @philyk.illagan3161 Рік тому +17

    I was thinking about the river puzzle quite recently. Nice to see a mathematical explanation behind it. I love math (except when I was taking soul-crushing classes in college)!
    Also, it's nice to be early for a video.

  • @jimgu2578
    @jimgu2578 Рік тому +3

    This is amazing! Especially the generalization part.

  • @brodiscool2752
    @brodiscool2752 Рік тому +1

    There's a variation on this puzzle I saw a while back that is probably easier.
    You are a farmer with a Wolf, Chicken, and bag of corn. You must cross a river with a boat that only you may paddle and may only hold one item.
    If the Wolf is ever left alone with the Chicken you die and if the Chicken is left with the Corn you die. The Wolf may never eat the Corn however. [Solution Below]
    The solution would be to row the chicken over first then come back with nothing, then to row the wolf over and come back with the chicken (the wolf doesn't eat the chicken since you are there) then take the corn immediately back to the wolf and go back then take the chicken across.

  • @Twin138956Productions2019
    @Twin138956Productions2019 Рік тому +1

    Happy 2023, Cary. That one is a nice puzzle there.

  • @sergodobro2569
    @sergodobro2569 Рік тому +2

    That is a very cool way to find the solution! And you mentioned the graphics library you used, thanks for that either!
    Thanks for the quality content!

  • @Bigman74066
    @Bigman74066 Рік тому +4

    Excellent video about an excellent solution 👍. I hope you will keep making videos like this!

  • @AngelGonzalez-bj6mo
    @AngelGonzalez-bj6mo Рік тому

    It is really interesting to see these type of videos after a semester in college full of classes with stuff like this

  • @winrg1234
    @winrg1234 Рік тому

    the whole of the universe tends towards entropy, and this is just one example. you're welcome. 10 points to me.

  • @johnchessant3012
    @johnchessant3012 Рік тому +1

    Very nice visualization and generalization!

  • @pixarinaimateinsanityyokai2984

    Happy 26th birthday Cary Huang!

  • @Kreypossukr
    @Kreypossukr Рік тому +4

    Insane visualization !! Great work !

  • @ItsAdamHere
    @ItsAdamHere Рік тому +1

    Happy birthday Cary!

  • @rumperman
    @rumperman Рік тому +1

    hey cary! im going into highschool soon and ive been watching your videos all throughout middle school! your videos got me interested in programming and ive been learning python! thanks for inspiring me so much and I want wait for the next upload!

  • @dolphin2.0.
    @dolphin2.0. Рік тому +3

    Yoshi: how do we get across this river
    Santa: I know graph theory
    Yoshi: why?
    Santa: I've solved the traveling salesman problem

  • @charlotteroot442
    @charlotteroot442 Рік тому +1

    This video was pretty interesting as I stuggled with the puzzle before, this video help me though. Very cool graphing from the origin

  • @matthewtosg
    @matthewtosg Рік тому +6

    I remember learning something like this in class one actually.

  • @floof.floofington.the.floo-rth

    Ted-ed is exactly why I know this! One of the first riddles I’ve learned AND solved actually!

  • @nonagonguy6121
    @nonagonguy6121 Рік тому +1

    You are the very last person I would expect a hazbin hotel reference from.
    Not complaining though

  • @tamsilwashere
    @tamsilwashere Рік тому +3

    I realized the Hazbin Hotel reference with Angeldust!

  • @ValeBridges
    @ValeBridges 11 місяців тому +1

    3:51 This bit reminds me of the part of jan Misali's video on regular polyhedra, specifically the part about zig-zag/skew polygons

  • @shieldgenerator7
    @shieldgenerator7 Рік тому

    i love how you expanded the problem

  • @jellyfish8771
    @jellyfish8771 Рік тому +1

    Happy late birthday Cary!!!!

  • @dreamer5959
    @dreamer5959 Рік тому +2

    Really cool visualization. I remember playing a game like that as a kid, except it was with sticks, wolves, goats and cabbages. I don't think it would be possible to make it into a similar graph if there are more than 2 kinds of creatures

    • @TheRabbitPoet
      @TheRabbitPoet Рік тому +2

      It can be done, but it gets harder to visualize because each new type of creature becomes its own axis (for example, the one you described would be a 4d graph)
      Numberphile did a visualization on the 1 wolf, 1 sheep and 1 cabbage version
      Edit: here's the link
      ua-cam.com/video/ZCVAGb1ee8A/v-deo.html

  • @rym36
    @rym36 Рік тому

    I didn't expect this to be coded in Processing . I knew it was capable but not that capable!+

  • @shinatham53
    @shinatham53 10 місяців тому +1

    *Yoshi is eating Santa*
    DEATH P.A.C.T. (Both Past and Present): Not on our watch

  • @Michael-YH
    @Michael-YH Рік тому +4

    Beautiful!

  • @daniellaizekemoe1967
    @daniellaizekemoe1967 14 днів тому +1

    7:23 😢 edge count
    I love graph theory

  • @fossposs6408
    @fossposs6408 Рік тому

    from the thumbnail i somehow thought this was a veritasium video until i was like “wait that sounds like cary!” lmao
    anyways that’s a pretty (and) elegant solution ngl, cool work!

  • @Controlly
    @Controlly Рік тому +1

    0:39 FIREY UNDERWEAR!? That’s my kidnapper!

  • @Crudely-Drawn-Cupcake
    @Crudely-Drawn-Cupcake Рік тому

    Oh look it’s yoshi! Hi yoshi!
    Anywho, this is a great visualization of the river crossing puzzle!

  • @Aelfraed26
    @Aelfraed26 Рік тому +1

    900 IQ way to tackle the problem

  • @RegularFantaTheBest
    @RegularFantaTheBest Рік тому +2

    1:23 the echo🤩🤩

  • @Elec-citrus
    @Elec-citrus Рік тому

    another day of carykh beating TED-Ed at problem solving :)

  • @AirNeat
    @AirNeat Рік тому +1

    wtf? kary KH science video again? finally!

  • @RennaTempest
    @RennaTempest Рік тому

    im just happy to see that you also use processing

  • @Celment
    @Celment Рік тому

    i really love the “comin to getcha moves”

  • @epsilon9669
    @epsilon9669 Рік тому

    thanks for the 3 am upload while I'm awake with covid, appreciate it my man

  • @mrs.willwood
    @mrs.willwood Рік тому

    I am so stupid I didn’t understand this but it was very entertaining to see you figure everything out!

  • @JoshuaDZ
    @JoshuaDZ Рік тому

    This is such a good way to visualize

  • @MightyElemental
    @MightyElemental Рік тому +2

    Never seen this version of the puzzle before. Think the only one I heard of was about a fox, a chicken, and some grain 🤔

  • @CaedmonOS
    @CaedmonOS Рік тому

    You just had to throw in the brief has Hazben Hotel referencesI love it

  • @oswack
    @oswack Рік тому

    This is a fantastic visualization! Cheers

  • @Lebensgott
    @Lebensgott Рік тому

    I love the visualization

  • @ristopoho824
    @ristopoho824 Рік тому +1

    The puzzle i heard of as a kid had a farmer, fox, chicken and a bag of corn. For some reason he wants to take the fox with him. And no it's not a pet trained fox it does want to eat the chicken. And oh boy the chicken eats fast so not leaving it with the corn.
    Also. The farmer needs to be on every trip, the fox is also not trained to control the raft.

  • @tanvach
    @tanvach Рік тому

    Love the video, nice use of visualization!

  • @MrSpartaa
    @MrSpartaa Рік тому +1

    no santas were harmed in the making of this

  • @AnIDFB
    @AnIDFB Рік тому

    Out of everything, you did Santas and dinosaurs.

  • @nell076
    @nell076 Рік тому

    your videos are always so cool i don't know what else to say

  • @TOSTCEM
    @TOSTCEM Рік тому

    Easy solution.
    Get trees from the forest (on fire so be careful!) and build a second raft.
    2 rafts that can carry 3 people.
    2 X 3 is 6 so everyone goes free!

  • @Nzargnalphabet
    @Nzargnalphabet 11 днів тому

    The fact he knows what hazbin hotel is is definitely new information

  • @Crasypickles_STINKS
    @Crasypickles_STINKS Рік тому +1

    0:40 this is the most cursed firey i have ever seen. Fire boiii

  • @qualia765
    @qualia765 Рік тому +3

    Me and my homies when we have 30 santas 30 dinosaurs but only 27 rafts: :(

  • @sixbeefydieXD
    @sixbeefydieXD Рік тому

    1:30 as a fellow yoshi im glad he showed us some respect

  • @quinn7894
    @quinn7894 Рік тому

    Clicked for the Yoshi, stayed for the graph theory.

  • @javianwilliams7463
    @javianwilliams7463 Рік тому

    6:54 “There’s ZERO Santas.”
    (Surprised trombone sound)

  • @burrito6352
    @burrito6352 Рік тому

    I never knew you conveniently had 3 dinosaurs and 3 santas!

  • @zoutig.4725
    @zoutig.4725 Рік тому

    Very glad the santa eating dinosaurs are extinct by now would have been disastrous for christmas.

  • @magfilms676
    @magfilms676 Рік тому +1

    "n Santas and n dinosaurs can cross iff we have n-2 rafts"
    ...that would imply 2 Santas and 2 dinosaurs can cross without any raft at all

    • @magfilms676
      @magfilms676 Рік тому

      or 1 Santa and 1 dinosaur can cross not only without any rafts, but with a tfar (negative raft)

  • @Kaikaku
    @Kaikaku Рік тому +1

    1:08 "The dinosaurs still have this biological urge to eat humans."
    -> Sorry, they don't. They had never the opportunity to develop such an urge 😉

  • @SherbetSketcher
    @SherbetSketcher Рік тому +1

    So confusing that it confused my house down

  • @ben9583_
    @ben9583_ Рік тому

    Graph theory gets a bad rap; this approach feels a lot more "right" than the guess-and-check method of searching. Also haha love the allegory

  • @j100j
    @j100j Рік тому

    I was playing with nice sounding chord progressions and I went to hooktheory to find if mine was already used.
    I proceeded to get distracted and I went to see what is the most common chord progression in A minor. I then found your more lasers and thought to myself that your profile picture was familiar. It seems I have seen some of your videos before and now I am here.

  • @LemonSoundLogos
    @LemonSoundLogos Рік тому

    0:41 cary reveals the actual reason why i stopped using cyshi

  • @dlog
    @dlog Рік тому

    The puzzle solution hurts my head even more

  • @norude
    @norude Рік тому

    I've always known this puzzle as wolf-sheep-cabbage puzzle. If wolf and sheep are left alone, wolf will eat the sheep. And sheep will eat the cabbage if they're alone. Farmer needs to get them from one side to the other. Raft supports 2 creatures and farmer is always 1 of them

    • @yellowmarkers
      @yellowmarkers Рік тому

      That is a different puzzle, although it does have some similarities and it could most likely be applied to one of these graphs, just with the vectors being (1,1,0,0), (1,0,1,0), and (1,0,0,1), as well as the legal positions being different. It would be difficult to visualise due to it being in four dimensions, though

  • @LUVVEOUS
    @LUVVEOUS Рік тому

    I like this MetaPerspective solving

  • @PearangeProductions
    @PearangeProductions Рік тому

    So this is what you've been doing since the Marker and Coiny plush vid...
    Jeez louise, Cary, the term "jack of all trades" barely scratches the SURFACE of your abilites.
    You can animate, voice act, program, teach...is there anything you CAN'T do?!

  • @Abladicus
    @Abladicus Рік тому

    I am always exited when he uploads

  • @hoppingiconcentral826
    @hoppingiconcentral826 Рік тому +1

    1:31 Cary accidentally said Yoshi

  • @FernTheRobot
    @FernTheRobot Рік тому +1

    I wonder what the state space will look like if the raft can contain three creature? My guess is it'll be very cluttered lol
    Also if we generalize the puzzle to include more types of creature that devour each other in a rock-paper-scissor like fashion does that mean we have to use a four dimensional graph? (which defeats the purpose of visualization but still)
    I have thought about this puzzle before but never increase the number of rafts. What a nice potential puzzle spaces you've explored, and it fits with the visualization very well as well!

  • @soapycanthandle
    @soapycanthandle Рік тому

    Noo!!! Now no one will have Christmas presents!

  • @atlantisportal249
    @atlantisportal249 Рік тому

    Huh, this very neat way seeing this puzzle.

  • @ZyperPL
    @ZyperPL Рік тому +9

    Hey! These are three YOSHIS! Not dinosaurs!

    • @linkharris4472
      @linkharris4472 3 місяці тому

      Totally true

    • @takivlogs9168
      @takivlogs9168 Місяць тому

      But yoshis are dinosaurs demselves😑😑😑😑😑