{"id":6189,"date":"2016-03-26T00:51:18","date_gmt":"2016-03-26T07:51:18","guid":{"rendered":"https:\/\/www.tynker.com\/blog\/?p=6189"},"modified":"2023-03-06T18:07:10","modified_gmt":"2023-03-07T02:07:10","slug":"understanding-the-basic-algorithms-that-power-your-digital-life","status":"publish","type":"post","link":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/","title":{"rendered":"Understanding the Basic Algorithms that Power Your Digital Life"},"content":{"rendered":"<p>This is Part 2 of a series on algorithms. Part 1, How to Explain Algorithms to Kids, is available <a href=\"http:\/\/bit.ly\/1WxtiBT\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fe4a3dbcfd7\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #206be5;color:#206be5\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #206be5;color:#206be5\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fe4a3dbcfd7\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#Understanding_the_Basic_Algorithms_that_Power_Your_Digital_Life\" >Understanding the Basic Algorithms that Power Your Digital Life<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#Search_and_Recommendation_Algorithms\" >Search and Recommendation Algorithms<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#Sort_Algorithms\" >Sort Algorithms<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#Algorithms_in_Your_Life\" >Algorithms in Your Life<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Understanding_the_Basic_Algorithms_that_Power_Your_Digital_Life\"><\/span>Understanding the Basic Algorithms that Power Your Digital Life<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>Algorithms provide a series of instructions that the computer follows to arrive at an answer and they underlie all of our technology. The problem that the algorithm is solving might be sorting a list, compressing a file, or determining which Internet pages are most relevant to you when you search for something. Algorithms determine how traffic signals are scheduled, how postal services\u00a0can most efficiently deliver your mail, and much more.<\/p>\n<p>In the digital age, kids should do more than just use technology. They need to\u00a0explore the algorithms that power their phones, their social media sites, and their worlds so they can become fluent in coding, the language of technology, and take an active role in the creation of technology.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Search_and_Recommendation_Algorithms\"><\/span>Search and Recommendation Algorithms<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>When you type a search into Google, it uses a very sophisticated algorithm that determines which pages on the internet are relevant to your search and ranks them based on how relevant and reputable they are. At its core, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/PageRank\" target=\"_blank\" rel=\"noopener\">PageRank<\/a> algorithm takes into account how many other sites link to a given web page as well as the rank of the linking sites in order to determine the rank of that page. And it returns your results in less than a second!<\/p>\n<p>The\u00a0algorithm that recommends connections on social media (like the \u201cPeople You May Know\u201d recommendations on Facebook or Linkedin) works by calculating your degrees of separation from other users.\u00a0If you are friends with Amy and Amy is friends with Ben, Facebook assumes that you might know Ben as well and recommends him as a potential connection. But if Amy is friends with Ben and Ben is friends with Charlene and Charlene is friends with Daryl and Daryl is friends with Erin, Facebook is unlikely to recommend Erin as a connection. In fact, scientists have theorized that, because of how globally connected we all are, there are only <a href=\"https:\/\/en.wikipedia.org\/wiki\/Six_degrees_of_separation\" target=\"_blank\" rel=\"noopener\">six degrees of separation<\/a> between any two people on earth!<\/p>\n<p>And when you use Amazon or Netflix, they recommend purchases or other shows you might be interested in based on a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Collaborative_filtering\" target=\"_blank\" rel=\"noopener\">collaborative filtering algorithm<\/a> that tries to predict what users will like based on the choices of other users with similar taste profiles.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sort_Algorithms\"><\/span>Sort Algorithms<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You may not think about it when you are sorting things in real life, but you are following an algorithm! Computers need to sort lists with millions of values extremely quickly, so sorting algorithms are very important.<\/p>\n<p>Can you describe how you might sort ten books into alphabetical order? If you had to tell someone who didn\u2019t understand the process of sorting how to sort the books, what steps would you write out?<\/p>\n<p>You might start with one book, then add one book at a time, placing it in the proper place in your lineup. But imagine how many hours or years this would take if you had to do this with hundreds, thousands, or even millions of books! This algorithm is called Insertion Sort, and it works fine for small lists, but takes a lot of time for longer lists.<\/p>\n<p>Another way you could sort the ten books would be to arrange them in a random order, then go down the list comparing books that are next to each other. First you would compare the first and second books. If they are in the wrong order, you swap them. Then you compare the second and third books, and again decide whether to swap them. Whenever you reach the end of the list, you go back through the list again, each time only comparing books that are immediately next to each other. This is called the Bubble Sort Algorithm, and it is again reasonable for small lists, but very inefficient for longer lists.<\/p>\n<p>This project shows one way to implement a Bubble sort, with items in the list swapping to sort themselves:<\/p>\n<p style=\"text-align: center;\">\n<!-- iframe plugin v.6.0 wordpress.org\/plugins\/iframe\/ -->\n<iframe loading=\"lazy\" frameborder=\"0\" scrolling=\"no\" src=\"\/ide\/embedded?p=54ecf8ec84aafa9216000030&#038;controls=yes&#038;autostart=no\" width=\"100%\" height=\"500\" class=\"iframe-class\"><\/iframe>\n<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.tynker.com\/ide\/?p=54ecf8ec84aafa9216000030\" target=\"_blank\" rel=\"noopener\"><strong>Explore This Algorithm<\/strong><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Algorithms_in_Your_Life\"><\/span>Algorithms in Your Life<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Efficient algorithms for searching and sorting are crucial for building software that runs quickly. These and other basic algorithms underlie most of your technology, from the YouTube video\u00a0you stream to your phone, to the face detection on your camera.<\/p>\n<p>How does YouTube\u00a0stream\u00a0to your phone so fast and seamlessly? How does your camera search for faces, all of which look very different depending on the person, the lighting, and the distance?<\/p>\n<p>It might seem like your computer is making the kind of intelligent decisions that we normally think of as uniquely human, like making connections and educated guesses. But each of these is powered by a very complex algorithm that determines how to best accomplish the task using probability and logic.<\/p>\n<p>If your child can understand and write algorithms, this opens up a whole world of possibility. It allows them to not only use these algorithms more effectively, but also to start writing their own programs and algorithms and solve meaningful problems with code.<\/p>\n<p style=\"text-align: center;\"><a class=\"sf-button large accent standard \" href=\"https:\/\/www.tynker.com\/courses\/\" target=\"_blank\"><span class=\"text\">Explore Programming Courses<\/span><\/a>\n","protected":false},"excerpt":{"rendered":"<p>This is Part 2 of a series on algorithms. Part 1, How to Explain Algorithms to Kids, is available here. Understanding the Basic Algorithms that Power Your Digital Life Algorithms provide a series of instructions that the computer follows to arrive at an answer and they underlie all of our technology. The problem that the algorithm is solving might be [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6243,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,124],"tags":[20],"class_list":["post-6189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ideas-and-tips","category-learn-to-code-resource","tag-coding-for-kids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding the Basic Algorithms that Power Your Digital Life - Tynker Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding the Basic Algorithms that Power Your Digital Life - Tynker Blog\" \/>\n<meta property=\"og:description\" content=\"This is Part 2 of a series on algorithms. Part 1, How to Explain Algorithms to Kids, is available here. Understanding the Basic Algorithms that Power Your Digital Life Algorithms provide a series of instructions that the computer follows to arrive at an answer and they underlie all of our technology. The problem that the algorithm is solving might be [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/\" \/>\n<meta property=\"og:site_name\" content=\"Tynker Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Gotynker\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-26T07:51:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-07T02:07:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1140\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tynker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gotynker\" \/>\n<meta name=\"twitter:site\" content=\"@gotynker\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tynker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding the Basic Algorithms that Power Your Digital Life - Tynker Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/","og_locale":"en_US","og_type":"article","og_title":"Understanding the Basic Algorithms that Power Your Digital Life - Tynker Blog","og_description":"This is Part 2 of a series on algorithms. Part 1, How to Explain Algorithms to Kids, is available here. Understanding the Basic Algorithms that Power Your Digital Life Algorithms provide a series of instructions that the computer follows to arrive at an answer and they underlie all of our technology. The problem that the algorithm is solving might be [&hellip;]","og_url":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/","og_site_name":"Tynker Blog","article_publisher":"https:\/\/www.facebook.com\/Gotynker\/","article_published_time":"2016-03-26T07:51:18+00:00","article_modified_time":"2023-03-07T02:07:10+00:00","og_image":[{"width":1140,"height":360,"url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png","type":"image\/png"}],"author":"Tynker","twitter_card":"summary_large_image","twitter_creator":"@gotynker","twitter_site":"@gotynker","twitter_misc":{"Written by":"Tynker","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#article","isPartOf":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/"},"author":{"name":"Tynker","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/b63acd9ceebe78ea474bfcfbfdac7d57"},"headline":"Understanding the Basic Algorithms that Power Your Digital Life","datePublished":"2016-03-26T07:51:18+00:00","dateModified":"2023-03-07T02:07:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/"},"wordCount":895,"publisher":{"@id":"https:\/\/www.tynker.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#primaryimage"},"thumbnailUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png","keywords":["Coding for Kids"],"articleSection":["Ideas and Tips","Resources for Learning to Code"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/","url":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/","name":"Understanding the Basic Algorithms that Power Your Digital Life - Tynker Blog","isPartOf":{"@id":"https:\/\/www.tynker.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#primaryimage"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#primaryimage"},"thumbnailUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png","datePublished":"2016-03-26T07:51:18+00:00","dateModified":"2023-03-07T02:07:10+00:00","breadcrumb":{"@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#primaryimage","url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png","contentUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/2016-03-28-2.png","width":1140,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/www.tynker.com\/blog\/understanding-the-basic-algorithms-that-power-your-digital-life\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Coding for Kids","item":"https:\/\/www.tynker.com\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/www.tynker.com\/blog\/"},{"@type":"ListItem","position":3,"name":"Understanding the Basic Algorithms that Power Your Digital Life"}]},{"@type":"WebSite","@id":"https:\/\/www.tynker.com\/blog\/#website","url":"https:\/\/www.tynker.com\/blog\/","name":"Tynker Blog","description":"Tynker makes it fun and easy to learn computer programming. Get started today with Tynker&#039;s easy-to-learn, visual programming courses designed for young learners in grades K-12.","publisher":{"@id":"https:\/\/www.tynker.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tynker.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.tynker.com\/blog\/#organization","name":"Tynker - Coding for Kids","url":"https:\/\/www.tynker.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20220713063303\/appicon-120.png","contentUrl":"https:\/\/images.tynker.com\/blog\/wp-content\/uploads\/20220713063303\/appicon-120.png","width":120,"height":120,"caption":"Tynker - Coding for Kids"},"image":{"@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Gotynker\/","https:\/\/x.com\/gotynker","https:\/\/www.instagram.com\/tynkercoding\/","https:\/\/www.pinterest.com\/gotynker\/","https:\/\/www.linkedin.com\/company\/tynker"]},{"@type":"Person","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/b63acd9ceebe78ea474bfcfbfdac7d57","name":"Tynker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.tynker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e763a250a1fd5790919d1e588e78461c1f50971644d40baac7f6176d0a4ea007?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e763a250a1fd5790919d1e588e78461c1f50971644d40baac7f6176d0a4ea007?s=96&d=mm&r=g","caption":"Tynker"},"description":"Tynker enables children to learn computer programming in a fun and imaginative way. More than 60 million kids worldwide have started learning to code using Tynker.","url":"https:\/\/www.tynker.com\/blog\/author\/tynker\/"}]}},"_links":{"self":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/6189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/comments?post=6189"}],"version-history":[{"count":39,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/6189\/revisions"}],"predecessor-version":[{"id":32893,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/posts\/6189\/revisions\/32893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/media\/6243"}],"wp:attachment":[{"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/media?parent=6189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/categories?post=6189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tynker.com\/blog\/wp-json\/wp\/v2\/tags?post=6189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}