What's an algorithm? - David J. Malan

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2013
  • View full lesson: ed.ted.com/lessons/your-brain-...
    An algorithm is a mathematical method of solving problems both big and small. Though computers run algorithms constantly, humans can also solve problems with algorithms. David J. Malan explains how algorithms can be used in seemingly simple situations and also complex ones.
    Lesson by David J. Malan, animation by enjoyanimation.

ความคิดเห็น • 1K

  • @alfredolinguine5907
    @alfredolinguine5907 8 ปีที่แล้ว +2572

    great now I can count how many people are in a room

  • @EslamMohamedX
    @EslamMohamedX 9 ปีที่แล้ว +737

    David J. Malan is one of the GREATEST professors u may see throughout ur whole life !

    • @helloimran
      @helloimran 8 ปีที่แล้ว +5

      +Eslam Mohamed agreed!

    • @kunalcs5079
      @kunalcs5079 6 ปีที่แล้ว +1

      Agree

    • @diwangislucky
      @diwangislucky 6 ปีที่แล้ว +3

      Yes. There are a lot of great profs out there though, like Marvin Minsky, Andrew Appel, Manuel Blum, Peter Ramadge, Richard Murray, etc.

    • @fritzhopper5145
      @fritzhopper5145 5 ปีที่แล้ว +25

      Yeah, his cs50 makes me fall in love with computer science.

    • @29rohitkr
      @29rohitkr 5 ปีที่แล้ว +1

      @@fritzhopper5145 yes bro. Loved it

  • @thedarkinone
    @thedarkinone 7 ปีที่แล้ว +1059

    my school uses your videos to teach us and as notes :) that's how good you are

    • @archimagirus27
      @archimagirus27 7 ปีที่แล้ว +21

      this is a company ya dum dum

    • @feelsokayman3959
      @feelsokayman3959 6 ปีที่แล้ว +33

      tbh it's not that hard to explain something better than your average highschool teacher

    • @moocow3780
      @moocow3780 6 ปีที่แล้ว +19

      Technically they are a nonprofit organization the difference is companies are created with the goal of creating profit and organization are created with the main function of doing something for humanity/animals/or something else.

    • @Animakozak
      @Animakozak 6 ปีที่แล้ว +20

      Well, he's a Harvard professor, after all.

    • @zygmuntthecacaokakistocrat6589
      @zygmuntthecacaokakistocrat6589 5 ปีที่แล้ว +5

      It's not hard to make your average person understand better than the average highschool student, what, with all those hormones fogging your brain and everything.

  • @olashoretijesunimi6039
    @olashoretijesunimi6039 2 ปีที่แล้ว +99

    Wow...Wow... This is one of the simplest and easy to watch videos I have watched on Algorithms. It passed the understanding of algorithms so clearly and the animations also helped to understand it greatly... Thanks so much for this video!

    • @Grassmpl
      @Grassmpl 10 หลายเดือนก่อน +2

      Simple is good if it was correct.
      The counting by pairs algorithms in incorrect.
      The concept of a "pair" is misused.
      Eg. For 3 people there are 3 pairs.
      For n people, n choose 2 pairs.
      Thus algorithm actually grossly undercounts.

    • @nsadegcmlf2116
      @nsadegcmlf2116 9 หลายเดือนก่อน

      ​@@Grassmpl😂🤣🤣🤣🤣🤣🤣🤣🤣🤣

    • @ProgrammerPenguin
      @ProgrammerPenguin 7 หลายเดือนก่อน

      then you may like the free online courses he still teaches called cs50

  • @shreydixit2690
    @shreydixit2690 6 ปีที่แล้ว +161

    And this is CS50

  • @fredcode89
    @fredcode89 5 ปีที่แล้ว +10

    thank you prof david, you made me learn programming and really getting in depth of what programming is all about

  • @ezx_00
    @ezx_00 5 ปีที่แล้ว +19

    NB: The word 'algorithm' has its roots in Latinizing the name of Muhammad ibn Musa al-Khwarizmi in a first step to algorismus. He was a Persian mathematician, astronomer, geographer, and scholar in the House of Wisdom in Baghdad, whose name means 'the native of Khwarazm', a region that was part of Greater Iran and is now in Uzbekistan.
    About 825, al-Khwarizmi wrote an Arabic language treatise on the Hindu-Arabic numeral system, which was translated into Latin during the 12th century under the title Algoritmi de numero Indorum. This title means "Algoritmi on the numbers of the Indians", where "Algoritmi" was the translator's Latinization of Al-Khwarizmi's name.[15] Al-Khwarizmi was the most widely read mathematician in Europe in the late Middle Ages, primarily through another of his books, the Algebra.[16] In late medieval Latin, algorismus, English 'algorism', the corruption of his name, simply meant the "decimal number system". In the 15th century, under the influence of the Greek word ἀριθμός 'number' (cf. 'arithmetic'), the Latin word was altered to algorithmus, and the corresponding English term 'algorithm' is first attested in the 17th century; the modern sense was introduced in the 19th century

  • @Atomos_tech
    @Atomos_tech ปีที่แล้ว +7

    I really like the way you create your content, the animation and the simplicity it makes the content easy to consume and interesting

  • @GAROmx
    @GAROmx 4 ปีที่แล้ว +74

    This comes extra handy now that we have the COVID-19 when everyone is home schooled

  • @OCDTraci
    @OCDTraci 9 ปีที่แล้ว +94

    My "understanding" of algorithms was very muddled until I happened on this video. Thank you so very much.

  • @yashakadarkknight2872
    @yashakadarkknight2872 6 ปีที่แล้ว +1

    Anything having David Malan involved in it will always be the best

  • @nottomention
    @nottomention 3 ปีที่แล้ว +1

    Always love to hear your lectures whether it’s on ocw or anywhere else!

  • @nilanjanmukhopadhyay8369
    @nilanjanmukhopadhyay8369 4 ปีที่แล้ว +3

    I watched the video earlier. And today I am at the very end of finishing CS50. When I watched this video I didn't know who David J. Malan is. But now I know he is my favorite teacher of all time. Love for David and CS50. ❤️❤️❤️❤️❤️❤️ And thanks to the TH-cam algorithm for bringing me back to the video.

  • @tbuzz7753
    @tbuzz7753 4 ปีที่แล้ว +38

    Love David Malan, his teaching method is so easy to follow!

    • @Grassmpl
      @Grassmpl 10 หลายเดือนก่อน +2

      Except it's misleading.
      The counting by pairs algorithms in incorrect.
      The concept of a "pair" is misused.
      Eg. For 3 people there are 3 pairs.
      For n people, n choose 2 pairs.
      Thus algorithm actually grossly overcounts.

    • @nsadegcmlf2116
      @nsadegcmlf2116 9 หลายเดือนก่อน

      ​@@Grassmpl🤣😂😂😂😂😂😂😂😂

  • @rna6070
    @rna6070 4 ปีที่แล้ว +2

    Guys, please keep uploading more such content. It really helps people like me find answers to our problems.

  • @tundesanusi572
    @tundesanusi572 2 ปีที่แล้ว +1

    This is fantastic and I love the way the animation simplifies this!

  • @henrybachman9898
    @henrybachman9898 5 ปีที่แล้ว +9

    I love how these videos are short and still better than a lot of longer videos about the same subject out there.

    • @Grassmpl
      @Grassmpl 10 หลายเดือนก่อน +1

      The longer videos are more accurate.
      The counting by pairs algorithms in incorrect.
      The concept of a "pair" is misused.
      Eg. For 3 people there are 3 pairs.
      For n people, n choose 2 pairs.
      Thus algorithm actually grossly overcounts.

    • @nsadegcmlf2116
      @nsadegcmlf2116 9 หลายเดือนก่อน

      ​@@Grassmpl😂🤣🤣🤣🤣🤣🤣🤣🤣🤣アルゴリズムだ❗規則正しく同じ言葉を繰り返している❗

    • @Grassmpl
      @Grassmpl 9 หลายเดือนก่อน

      @@nsadegcmlf2116 私は日本語が話せません、英語を使う必要があります

  • @dackgibson3505
    @dackgibson3505 6 ปีที่แล้ว +27

    3:30 That one third wheel.

  • @toyosisalami6453
    @toyosisalami6453 2 ปีที่แล้ว

    This video was so fun and educative, thank you! Will check out more of your work

  • @maishaprice5907
    @maishaprice5907 8 ปีที่แล้ว

    Perfect examples for my understanding. Thank you

  • @zac1976
    @zac1976 6 ปีที่แล้ว +57

    Muḥammad ibn Mūsā al-Khwārizmī[note 1] (Arabic: محمد بن موسى الخوارزمی‎‎; c. 780 - c. 850), formerly Latinized as Algoritmi,[note 2] was a Persian[3][4] scholar in the House of Wisdom in Baghdad who produced works in mathematics, astronomy, and geography during the Abbasid Caliphate.
    In the 12th century, Latin translations of his work on the Indian numerals introduced the decimal positional number system to the Western world.[5] Al-Khwārizmī's The Compendious Book on Calculation by Completion and Balancing presented the first systematic solution of linear and quadratic equations in Arabic. Because he is the first to teach algebra as an independent discipline and introduced the methods of "reduction" and "balancing" (the transposition of subtracted terms to the other side of an equation, that is, the cancellation of like terms on opposite sides of the equation), he has been described as the father[6][7][8] or founder[9][10] of algebra.
    He revised Ptolemy's Geography and wrote on astronomy and astrology.
    Some words reflect the importance of al-Khwārizmī's contributions to mathematics. "Algebra" is derived from al-jabr, one of the two operations he used to solve quadratic equations. Algorism and algorithm stem from Algoritmi, the Latin form of his name.[11] His name is also the origin of (Spanish) guarismo[12] and of (Portuguese) algarismo, both meaning digit.

    • @Alusnovalotus
      @Alusnovalotus 4 ปีที่แล้ว +2

      Zac eagle the more you know

    • @khalidelangouri963
      @khalidelangouri963 4 ปีที่แล้ว +1

      So cool

    • @leeled8024
      @leeled8024 3 ปีที่แล้ว +1

      Thank you for providing additional knowledge.
      Now I have to do more research on Al Kwarizmi and his works too,coz I'm in need of a headache!🥰

    • @siphonnn1639
      @siphonnn1639 3 ปีที่แล้ว

      didn’t reas

  • @ChellePayne1976
    @ChellePayne1976 8 ปีที่แล้ว +7

    Great video, going to show this to my students as an overview to algorithms. Thanks :)

    • @sagittarian21
      @sagittarian21 7 ปีที่แล้ว

      Nice how Teachers are incorporation hybrid learning. Web, Online HW, assignments in ADDITION to classroom, weekly quizzes, seminars, exams, presentations so students do the spend the holiday worrying about marks and the dreaded Spring semester.

  • @tundesanusi572
    @tundesanusi572 2 ปีที่แล้ว

    This is fantastic and I love the way the animation simplifies algorithm!

  • @defydog
    @defydog 11 ปีที่แล้ว

    Your analogy just blew my mind.
    Thank you very much for that.

  • @ayaanmishra7520
    @ayaanmishra7520 3 ปีที่แล้ว +3

    Thank you 🙏 now I understood algorithm easily and never forget it in my life

  • @zaylanseals3212
    @zaylanseals3212 6 ปีที่แล้ว +40

    Thank you sooo much I’m going to start getting a BS in the fall of 2020 and I hear everyone saying algorithms are hard but watching you make it look basic just makes me feel a lot more confident to take on Computer science

    • @AliRaza_jjj
      @AliRaza_jjj 2 ปีที่แล้ว +13

      its been 3 years I think now your answer would have been changed 😂😂😂 if you are really studying computer science 🤣🤣

    • @giztherapper7708
      @giztherapper7708 2 ปีที่แล้ว +2

      @@AliRaza_jjj 😂

    • @7sneves
      @7sneves ปีที่แล้ว

      ​@@giztherapper7708violation😂

    • @7sneves
      @7sneves ปีที่แล้ว

      How are you fairing on?

    • @kareemalarefi7817
      @kareemalarefi7817 ปีที่แล้ว +1

      @@7sneves bro must have quit life after seeing that algorithms weren’t just to count the number of people in a room

  • @memegold3004
    @memegold3004 3 ปีที่แล้ว

    Very easy to understand from the way you explained it, thank you!

  • @intersuccessive
    @intersuccessive 8 หลายเดือนก่อน

    Very intuirivie, creative and simple way to explain things. Just awesome!

  • @harshalgajjar
    @harshalgajjar 10 ปีที่แล้ว +17

    That 8bit tune was awesome! :D

  • @lauren710
    @lauren710 8 ปีที่แล้ว +4

    Very helpful, thank you!

  • @abanoubsameh6608
    @abanoubsameh6608 7 ปีที่แล้ว +2

    You guys are really great, you showed that math is useful and you gave me some hints for programming.

  • @toladeeadeliyi7381
    @toladeeadeliyi7381 2 ปีที่แล้ว

    Simple but great explanation. Thank you!!!

  • @ahmedabubakar7972
    @ahmedabubakar7972 ปีที่แล้ว +3

    This has to be the simplest, well-explained, and fun tutrorial I've come across😂

    • @Grassmpl
      @Grassmpl 10 หลายเดือนก่อน

      Yes. Now it needs to be **accurate**
      The counting by pairs algorithms in incorrect.
      The concept of a "pair" is misused.
      Eg. For 3 people there are 3 pairs.
      For n people, n choose 2 pairs.
      Thus algorithm actually grossly overcounts.

    • @ProgrammerPenguin
      @ProgrammerPenguin 7 หลายเดือนก่อน

      you may like the free online courses he still teaches called cs50

  • @brianmeehan9440
    @brianmeehan9440 7 ปีที่แล้ว +30

    I know Dave from CS50!

  • @alvinkatojr
    @alvinkatojr 10 ปีที่แล้ว +2

    Malan really is an amazing teacher! You can't but love CS after listening to this guy teach!

  • @antonija2602
    @antonija2602 8 หลายเดือนก่อน

    Great video and a simple explanation as well! Thank you!!!

  • @HeyDevz
    @HeyDevz 11 ปีที่แล้ว +5

    They actually changed the title now to the better "What is an algorithm?" I think it's previous title was how the human body could perform algorithms or something like that. Hope this sheds light on things.

    • @ClickbaiterZ
      @ClickbaiterZ 2 ปีที่แล้ว

      Woah, ancient comment

  • @EverlastingLuigi
    @EverlastingLuigi 8 ปีที่แล้ว +62

    I came here because I was bored but it ended up helping me understand MATLAB a little better for school

    • @IzayoiMeiHigu
      @IzayoiMeiHigu 7 ปีที่แล้ว

      Emilio Couchee school?

    • @HarshSharma-jd4cc
      @HarshSharma-jd4cc 5 ปีที่แล้ว

      MATLAB means "means" U know hindi ?

    • @humanbeing1429
      @humanbeing1429 4 ปีที่แล้ว

      In Hindi, the word "matlab" means "MEANS" 😎😎😎

    • @indrajitsinhchudasama739
      @indrajitsinhchudasama739 3 ปีที่แล้ว

      Guys the matlab like in a library for python!

    • @xynyde0
      @xynyde0 2 ปีที่แล้ว

      @@indrajitsinhchudasama739 matlab is a language not a library

  • @AmazeWebs
    @AmazeWebs 10 ปีที่แล้ว +1

    @David Lim, It's a set of procedural steps and conditions that allow a condition to turn from unresolved to resolved. It's a map pointing to treasure, It's a method developed to form the same solution under any condition of the parameter.

  • @hilarryhenry
    @hilarryhenry 3 ปีที่แล้ว +1

    THEY WAY HE EXPLAIN STUFF IS JUST AMAZING

  • @alishba.21
    @alishba.21 7 ปีที่แล้ว +4

    Oh Gosh! This is the video by the guy who teaches CS50!! Amazing teacher!

  • @mihaelzubak7321
    @mihaelzubak7321 6 ปีที่แล้ว +3

    This really helped me cause I was sick the day we learned this so thanks.

    • @ritujoseph2924
      @ritujoseph2924 2 ปีที่แล้ว

      Same thing happened here 😁😁

  • @jamesbedukodjograham5508
    @jamesbedukodjograham5508 2 ปีที่แล้ว +2

    Thank you Dr David Malan for making this Computer Video for all of us to use.

  • @rodolfoadonaicoronamoya8694
    @rodolfoadonaicoronamoya8694 3 ปีที่แล้ว

    very good explanation and examples, thanks for the information

  • @halfnwhole751
    @halfnwhole751 5 ปีที่แล้ว +17

    Imagine sorting algorithms being personified and Gravity sort just does magic tricks

    • @nanamacapagal8342
      @nanamacapagal8342 4 ปีที่แล้ว

      Wait till you see Counting Sort and Pigeonhole Sort

  • @abhayh924
    @abhayh924 7 ปีที่แล้ว +16

    1. Set yourself to watch this video
    2. If you liked it, press the Like button

  • @ashutoshsingh5568
    @ashutoshsingh5568 5 ปีที่แล้ว

    awesome way to explain algorithms. Loved it.

  • @meanshape101
    @meanshape101 ปีที่แล้ว +1

    Gotta love the people in this animation and the way he teaches.

  • @cobycole23
    @cobycole23 2 ปีที่แล้ว +8

    David.j.malan, so good with his explanations, I'm taking his cs50 course right now, and I can say he is the best professor ever!

  • @Stranger--
    @Stranger-- 5 ปีที่แล้ว +18

    That's literally introduction to programming

  • @thabob1267
    @thabob1267 7 ปีที่แล้ว

    This is a great video. Puts a lot of things into perspective.

  • @Miles09
    @Miles09 ปีที่แล้ว +1

    Awesome breakdown.

  • @burt591
    @burt591 8 ปีที่แล้ว +76

    but in order to know if there is a pair the program has to count one by one, so how is faster the second algorithm than the first?

    • @wertyuiop221
      @wertyuiop221 8 ปีที่แล้ว +9

      You count a pair. A pair. 1 pair.

    • @trioct
      @trioct 8 ปีที่แล้ว +14

      +Murariu Ciprian A computer could only know it's a pair by counting each person in the pair. Our brain does this for us so we don't have to count that there are two people in the pair.

    • @veryvery30
      @veryvery30 8 ปีที่แล้ว

      Read the last comment from me, you're right.

    • @savagenative959
      @savagenative959 5 ปีที่แล้ว

      Thats what we call a catch 22

    • @hung804
      @hung804 4 ปีที่แล้ว +2

      @@Ferrolune counting eyes is obvious, we told the computer to count the number of people and multiply by two. (btw this doesn't work if there is a pirate in the room). But there aren't any magic labels that group every 2 persons into a pair. We have to count each individual person to know.

  • @syedamahwishalizaidi1149
    @syedamahwishalizaidi1149 3 ปีที่แล้ว +12

    brain : what are u doing
    me : trying to study
    brain : why
    me : to be success full in my life
    brain: then why are you learning to count people in a room

    • @michaelng1869
      @michaelng1869 3 ปีที่แล้ว +1

      😄 feels like time waisting activity

    • @m05n_
      @m05n_ 3 ปีที่แล้ว +1

      same bro

  • @usmanibraheem
    @usmanibraheem 4 ปีที่แล้ว

    THANKS ALOT FOR THIS VIDEO. I REALLY NEEDED IT. Was about to take a course just to understand it. Now i do.

  • @guiltyguildleader
    @guiltyguildleader 11 ปีที่แล้ว +1

    That depends on the language and the context its used in. Some languages have the = operator as assignment operators, some have = as comparation operator,and others may have both and the context decides how it is interpreted

  • @luckingk2537
    @luckingk2537 7 ปีที่แล้ว +79

    After learning some python, this video became easy stuff.

    • @p_null
      @p_null 6 ปีที่แล้ว +18

      you learned stuff about a snake?

    • @iammsatrio1951
      @iammsatrio1951 4 ปีที่แล้ว

      I learn R

    • @victorlotz3457
      @victorlotz3457 4 ปีที่แล้ว +13

      Did you seriously need to learn python to learn how to count?

    • @iman2020
      @iman2020 4 ปีที่แล้ว

      Same here

    • @aaronkhoo5348
      @aaronkhoo5348 4 ปีที่แล้ว +1

      High five bro

  • @speedrocks2
    @speedrocks2 8 ปีที่แล้ว +3

    if you use a for loop for this, you would have to know how many people are in the room to begin with. Maybe this should say "while a person is uncounted"?

    • @FirstLast-ws7zw
      @FirstLast-ws7zw 8 ปีที่แล้ว +1

      +speedrocks2
      while(person != counted)
      {
      *Algorithm here* //Love while loops!
      }

  • @ennylee9381
    @ennylee9381 9 หลายเดือนก่อน

    This video is the best video I have watched on algorithms. Very understandable.

  • @lebaptoumetrage6396
    @lebaptoumetrage6396 ปีที่แล้ว

    Very nice presentation !

  • @AristeeSV
    @AristeeSV 9 ปีที่แล้ว +8

    A recommander à tout étudiant en BTS SIO informatique !

  • @807pranavghandade8
    @807pranavghandade8 5 ปีที่แล้ว +3

    4:39 how to always get your comment on top.

  • @GeneraleF
    @GeneraleF 11 ปีที่แล้ว

    I love this guy and all of his courses :)

  • @JohnMcCullough97
    @JohnMcCullough97 10 ปีที่แล้ว

    Awesome. I've been looking for material like this to help introduce programming to children.

  • @carltonseymour869
    @carltonseymour869 7 ปีที่แล้ว +5

    Have been trying to learn coding since a year. This 4 and a half minute video has helped me understand coding. I am excited to get back to learning. Thank You David

    • @capitaldd3693
      @capitaldd3693 ปีที่แล้ว

      How did you translate this video into coding......?

    • @ProgrammerPenguin
      @ProgrammerPenguin 7 หลายเดือนก่อน

      you may like the free online courses he still teaches called cs50

  • @lordhammad
    @lordhammad 3 ปีที่แล้ว +5

    I took a Computer Science course taught by the narrator, a HarvardX course. He's a great teacher

  • @twistedkeys1
    @twistedkeys1 11 ปีที่แล้ว

    Very well explained. Really really clear. Simple topic, but it's essential.

    • @Grassmpl
      @Grassmpl 10 หลายเดือนก่อน

      But it's incorrectly explained.
      The counting by pairs algorithms in incorrect.
      The concept of a "pair" is misused.
      Eg. For 3 people there are 3 pairs.
      For n people, n choose 2 pairs.
      Thus algorithm actually grossly overcounts.

  • @MichaelOzoro
    @MichaelOzoro 11 หลายเดือนก่อน

    Wow...I love this, so simple and straight forward...

  • @comb528491
    @comb528491 8 ปีที่แล้ว +116

    Thank you for developing this, Mohammed ibn Musa al-Khwarizmi, aka Algoritmi.

    • @brownpeoplegetup1243
      @brownpeoplegetup1243 7 ปีที่แล้ว +23

      Algebra, Alchemy. it's good to remember who made these contributions to the world~

    • @yuval6508
      @yuval6508 7 ปีที่แล้ว +21

      oh fuck off

    • @peek_yew9369
      @peek_yew9369 7 ปีที่แล้ว +21

      i can't tell if you consumed salt, or if salt consumed you

    • @kavehramzanzad
      @kavehramzanzad 6 ปีที่แล้ว +6

      you forgot to mention his nationality .. by the way he was persian(iranian) and trough history iranian always been educated and smart . no matter what he believes because we aren't into his mind .. i am iranian as well but you arab muslim no nothing but lowing your self up and killing innocents that is your religion

    • @Masardirasa
      @Masardirasa 5 ปีที่แล้ว +3

      Yes my brother our scientist 😍😍 Mohamed abo jaafar khawarizmi thank you inchallah the janaa

  • @JacksonMerg
    @JacksonMerg 9 ปีที่แล้ว +48

    or you can skip the algorithem and say:
    n=amount of people in room

    • @oreki1996
      @oreki1996 5 ปีที่แล้ว +2

      what if the number of people is dynamic

    • @bscorvin
      @bscorvin 4 ปีที่แล้ว +10

      Same energy as
      if(goingToCrashIntoEavhOther)
      { dont( ) ; }

    • @AxeAR
      @AxeAR 4 ปีที่แล้ว +3

      Now _this_ is efficient

    • @gunjchowwiwat8357
      @gunjchowwiwat8357 4 ปีที่แล้ว +11

      If you don't even know the amount of people in room
      !
      How could you tell that n = amount of people in room?
      It's like asking someone "How many people in the room? and your answer is "How many".

    • @gunjchowwiwat8357
      @gunjchowwiwat8357 4 ปีที่แล้ว

      @@AxeAR No! It's not.

  • @computingatschoolTV
    @computingatschoolTV 8 ปีที่แล้ว +1

    Added to our favourites playlist :)

  • @cactusjack2264
    @cactusjack2264 3 ปีที่แล้ว +1

    Excellently explained!

  • @jindra1238
    @jindra1238 9 ปีที่แล้ว +21

    N = 0; foreach (dozen people in room) {N += 12}if (N != 0) {N = N + N%12}; how about this?

    • @420praiseit2
      @420praiseit2 9 ปีที่แล้ว +1

      Tomáš Fuk Here it is in the programming language ruby, it works (:
      def count(people)
      n = 0
      loop do
      if people >= 12
      people -= 12
      n += 12
      elsif n != 0
      people -= n % 12
      n += people % 12
      end
      break if people == 0
      end
      puts n
      end
      people = gets.chomp.to_i
      count(people)

    • @jindra1238
      @jindra1238 9 ปีที่แล้ว

      crestfallenllama Really interesting :) Personally, I've never used Ruby, but being C# person myself, I always found it really confusing when you don't use braces for your code.. But if you like it, more power to you! Where did you learn it?

    • @420praiseit2
      @420praiseit2 9 ปีที่แล้ว +1

      Tomáš Fuk In Ruby I think it's faster to write code, and get something done at least it's easier to understand while looking at it, so as a starting language it's perfect, and for smaller programs like this it's perfect, but the speed is not the best and I think the c languages is more optimal when making larger things like games.
      I started learning it at codeacademy, but after that I thought to myself: "What can I actually do in Ruby?", and then I took all the lessons from Rubymonk, these are more advanced and I learned a ton. I wanted to learn Ruby because rpg maker vx ace uses that language. After I'm done with my game there I will probably try unity, I'm already beginning to learn c++.

    • @bingbonghafu
      @bingbonghafu 6 ปีที่แล้ว

      you don need each

    • @Multibe150
      @Multibe150 6 ปีที่แล้ว

      I'm years late, but you can check if N!=0 just by writing *if N*, because 0 equals false, so it will return true in every other case

  • @sandhyabhosale6328
    @sandhyabhosale6328 3 ปีที่แล้ว +3

    This algorithm is wrong,John Cena is sleeping on the bed but he isn't counted

  • @raihanakram530
    @raihanakram530 6 ปีที่แล้ว +1

    Last music was just awesome!

  • @glanced9684
    @glanced9684 5 ปีที่แล้ว

    A set of step by step instructions to do / achieve / solve something.

  • @tanutchankasem8781
    @tanutchankasem8781 6 ปีที่แล้ว +6

    Algorithms are a set of of instructions to solve problems that executed by computers or human. Then, am I programmed to wrote this comment to solve the problem that I wanted to do so by typing this on the keyboard ? What if we were written with a super complex algorithm. the code is so complex and it is infinite. So, who wrote that set of instruction?

    • @bobgustavsonn4306
      @bobgustavsonn4306 5 ปีที่แล้ว

      yeah evolution just happened to create such intelligent organisms

    • @thevinhmac7560
      @thevinhmac7560 5 ปีที่แล้ว

      It's a bug in Nature's algorithm that we, human beings, can have consciousness and eventually have conversations like this.

  • @NavnikBHSilver
    @NavnikBHSilver 8 ปีที่แล้ว +10

    This reminds me of the time I programmed an algorithm that can generate a perfectly connected random jigsaw puzzle.
    And this was before I knew about recursive code, which would probably have made it a lot easier.

  • @ainoaguy
    @ainoaguy 11 ปีที่แล้ว

    Very simple way teach a subject that can get complicated to your average student, very good!

  • @hikodzu
    @hikodzu 2 ปีที่แล้ว

    Thanks for the quick programming lesson dude

  • @abdulrehman-xw3jo
    @abdulrehman-xw3jo 3 ปีที่แล้ว +3

    The word "algorithm" comes from 8th century *Muslim mathematician, Al Khwarizmi.* he is the inventor of algorithm.

    • @suvamjitmishra7597
      @suvamjitmishra7597 4 วันที่ผ่านมา

      No man he borrowed from India's mathematics.

  • @matttrophy1
    @matttrophy1 7 ปีที่แล้ว +9

    Sounds like basic computer language

  • @maninangcathym.6683
    @maninangcathym.6683 3 ปีที่แล้ว

    what a cute presentation, I really appreciate it. I fully understand now what algorithm is. Thank you. It helps a lot.

  • @hemayetkabir1331
    @hemayetkabir1331 6 ปีที่แล้ว

    wonderful presentation.

  • @Nicoder6884
    @Nicoder6884 7 ปีที่แล้ว +12

    At 4:39, My answer is that I would solve a rubik's cube.

    • @NelKarlsonMercado
      @NelKarlsonMercado 7 ปีที่แล้ว

      Nicolino Will Same 😂😂

    • @catlynya
      @catlynya 7 ปีที่แล้ว

      Syed Mohammed Habeeburehman YEAH

  • @lamarmclemore3166
    @lamarmclemore3166 10 ปีที่แล้ว +3

    Words are algorithms connected to comprehension

  • @loveafinni
    @loveafinni ปีที่แล้ว

    So easy to understand! Thank you!!

  • @mohammedal-hammadi5085
    @mohammedal-hammadi5085 4 ปีที่แล้ว

    Thank you so much, it's awesome explanation

  • @ajj7794
    @ajj7794 8 ปีที่แล้ว +4

    is it not simple to say
    set N =0
    count number of people
    put number of people into N. how would you go about implementing this.?

    • @micahelthegreat1
      @micahelthegreat1 8 ปีที่แล้ว

      +xganh zu count number of people would still require a loop because you still have to go through say N people so even if you wanted to use this you are simply still going to need a loop and after that you are just copying the value from one location to another
      this is called a funciton.

    • @ajj7794
      @ajj7794 8 ปีที่แล้ว

      +Michael Chen OK thanks : ) I wanted the use to enter the number of people but it's simpler to use a loop.

    • @HS-fb9tw
      @HS-fb9tw 8 ปีที่แล้ว

      +xganh zu you ruined my understanding.. D:

    • @ajj7794
      @ajj7794 8 ปีที่แล้ว

      not me if you are interested research livecode, it is a coding language which uses english. :) i do not understand programming either.

  • @0ShadowG0
    @0ShadowG0 9 ปีที่แล้ว +5

    Agortihm at the end is wrong. it works for pairs but not for x=3,4,5,..., 10. Becasue it would not add anything if there are between 2 and x and ony in cases where there is one person left in the room it would add him/her.

    • @stephaniekarunwi4955
      @stephaniekarunwi4955 9 ปีที่แล้ว

      Yes! was wondering if anyone else noticed!!

    • @burt591
      @burt591 8 ปีที่แล้ว +3

      +0ShadowG0 but it says "for each pair of people in room" so if lets say it is 9 people in the room it will count 4 pairs, and then add the one person left... right?

    • @Minecrafter20006
      @Minecrafter20006 8 ปีที่แล้ว

      +burt591 you could do any number when you do it like this :
      if x is number of people add x to N
      if x-1 is number of people add x-1
      if x-2 is......

    • @Gottenhimfella
      @Gottenhimfella 6 ปีที่แล้ว +2

      (sigh) it will do any number just as it is, as burt591 illustrated.
      Your solution is recursive: it requires you to know the number of people in the room before you start counting them.

    • @TheSeannik
      @TheSeannik 5 ปีที่แล้ว

      @@burt591 in any group of 3 people there are 6 possible pairs......

  • @alihodroj9559
    @alihodroj9559 6 ปีที่แล้ว

    Very useful and straight to the point. :)

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 4 ปีที่แล้ว

    Great explanation tq for explaining clearly what's an algorithm is no body explained like this

  • @humanbeing1429
    @humanbeing1429 4 ปีที่แล้ว +4

    Does that mean I can use algorithm to study algorithm?

    • @bryanleow5024
      @bryanleow5024 4 ปีที่แล้ว +4

      Lesson 2: what is recursion

  • @thattrollagen
    @thattrollagen 9 ปีที่แล้ว +49

    i made a algorithm for love because my girlfriend broke up with me and she was cheating on me...

    • @creator-link
      @creator-link 8 ปีที่แล้ว +1

      Can I see it

    • @thattrollagen
      @thattrollagen 8 ปีที่แล้ว +1

      If I can find it. I posted it on some forum. I made it in JavaScript a while ago. Its really bad.

    • @creator-link
      @creator-link 8 ปีที่แล้ว +4

      ok

    • @ZeroArtsMade
      @ZeroArtsMade 8 ปีที่แล้ว +1

      +ron thattrollagen (troll) What iz it lellelelelell

    • @thattrollagen
      @thattrollagen 8 ปีที่แล้ว +1

      yjae magno yummy yummy tapeworms

  • @lfnavas
    @lfnavas 6 ปีที่แล้ว

    Hace falta estos vídeos en distintos idiomas, son una excelente herramienta.

  • @mohakgoyal9114
    @mohakgoyal9114 6 ปีที่แล้ว

    Thanks , you simplified the terms .

  • @juanmartindomingo5911
    @juanmartindomingo5911 ปีที่แล้ว +4

    wow i become smart

    • @kaizetam6931
      @kaizetam6931 หลายเดือนก่อน

      😂😂😂

  • @liltoaster7308
    @liltoaster7308 5 ปีที่แล้ว +3

    Wouldn't this just be illogical because of how uselessly complex it is.

  • @vipinritik781
    @vipinritik781 3 ปีที่แล้ว +1

    What a perfect teaching. Awesome

  • @begumciftci6518
    @begumciftci6518 4 ปีที่แล้ว

    Today I learned what an algorithm is. Thanks for the simple explanation.