{"id":215,"date":"2014-05-25T21:35:33","date_gmt":"2014-05-26T04:35:33","guid":{"rendered":"http:\/\/mostlymental.com\/?p=215"},"modified":"2014-05-25T23:31:48","modified_gmt":"2014-05-26T06:31:48","slug":"algorithms","status":"publish","type":"post","link":"http:\/\/mostlymental.com\/?p=215","title":{"rendered":"Algorithms"},"content":{"rendered":"<p>Hello everyone!<\/p>\n<p>Sorry for missing last week's post.\u00a0 I was a bit busy graduating.\u00a0 It shouldn't happen again.<\/p>\n<p>I mentioned back in my first post that one of my interests is algorithm design.\u00a0 This week, I'd like to talk a bit about what that means.\u00a0 The word \"algorithm\" gets thrown around a lot in TV shows, movies, and science journalism, and quite often, it's horribly misused.\u00a0 So let's define our terms before we go further: an algorithm is a sequence of steps which can be followed to turn one form of data into another.<\/p>\n<p>That's kind of an abstract definition, though, so let's dive in with an example.\u00a0 Let's say we have a list of numbers, and we'd like to know which is the largest.\u00a0 How might we go about this?\u00a0 One way to do this is to just walk through the list and keep track of the largest number we've seen.\u00a0 So in the list below, we start by saying the <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_eccbc87e4b5ce2fe28308fd9f2a7baf3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> is the largest number.\u00a0 Next, we check the <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_aab3238922bcc25a6f606eb525ffdc56.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> and see that it's larger than <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_eccbc87e4b5ce2fe28308fd9f2a7baf3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>, so it's the largest so far.\u00a0 We then check the <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_9bf31c7ff062936a96d3c8bd1f8f2ff3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> and see that it's even larger.\u00a0 Finally, we see that the <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_45c48cce2e2d7fbdea1afc51c7c6ad26.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> isn't larger, so <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_9bf31c7ff062936a96d3c8bd1f8f2ff3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> is still the largest we've seen.<a href=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-224 aligncenter\" src=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_1-260x300.png\" alt=\"alg_1\" width=\"260\" height=\"300\" srcset=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_1-260x300.png 260w, http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_1.png 344w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p>The solution above is good, but there are other ways to solve the problem.\u00a0 Another approach we might take is to check if each element is the largest.\u00a0 To do so, we compare each element against every other element, and if nothing is larger, we declare it the largest.\u00a0 So in the example below, we compare <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_eccbc87e4b5ce2fe28308fd9f2a7baf3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> with every other element and find that there's something larger (namely <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_aab3238922bcc25a6f606eb525ffdc56.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>).\u00a0 Then we compare <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_aab3238922bcc25a6f606eb525ffdc56.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> against every other element and find that <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_9bf31c7ff062936a96d3c8bd1f8f2ff3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> is larger.\u00a0 Then we compare <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_9bf31c7ff062936a96d3c8bd1f8f2ff3.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> against everything and see that it is the largest.\u00a0 We could stop there, but for the sake of completeness, we also check to see that <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_45c48cce2e2d7fbdea1afc51c7c6ad26.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> isn't the largest.<a href=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-232 aligncenter\" src=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_21-121x300.png\" alt=\"alg_2\" width=\"121\" height=\"300\" srcset=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_21-121x300.png 121w, http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_21.png 163w\" sizes=\"auto, (max-width: 121px) 100vw, 121px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Both of the algorithms described above can find the largest element of a list.\u00a0 If all that mattered was getting the answer, we might say they were equally good.\u00a0 But if we want to use these in the real world, we also need to take speed into account, particularly when the list gets very long.\u00a0 So how do we quantify speed?\u00a0 One way we could do it to just run the two algorithms on a computer with some test data.\u00a0 We would get curves like the ones below for the time taken.<a href=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_simple_graph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-227 aligncenter\" src=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_simple_graph.png\" alt=\"alg_simple_graph\" width=\"300\" height=\"222\" \/><\/a>But this can be very misleading.\u00a0 How do we know the trends we see with small data sets continue when the data set gets larger.\u00a0 In other words, how do we know that the graph above isn't just a part of the graph below?<a href=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_strange_graph.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-228 aligncenter\" src=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_strange_graph-300x266.png\" alt=\"alg_strange_graph\" width=\"300\" height=\"266\" srcset=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_strange_graph-300x266.png 300w, http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_strange_graph.png 416w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>We answer this by counting the number of steps taken for each algorithm.\u00a0 In general, an algorithm that takes more steps needs more time to run, so we want to use as few steps as possible.\u00a0 Let's say our list has length <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>.\u00a0 The first algorithm compares each element of the list against the largest we've seen thus far.\u00a0 That's one comparison for each element, for a total of <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> comparisons.\u00a0 The second algorithm compares each pair of elements of our list, but doesn't compare each element with itself.\u00a0 There are <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_e664c55ff7e0f2bc060f9b14940201b1.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> such pairs that we can make, so the second algorithm takes at most <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_e664c55ff7e0f2bc060f9b14940201b1.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> steps.<\/p>\n<p>Generally speaking, it's not necessary to get the exact number of steps needed.\u00a0 What's more important is how the number of steps scales as the problem size increases.\u00a0 For instance, what happens if we double the length of the list?\u00a0 For the first algorithm, we need at most <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> steps, and doubling <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> doubles the time needed.\u00a0 However, for the second, we need <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_e664c55ff7e0f2bc060f9b14940201b1.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>, which is approximately <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_ec4ad94a9be87109217fcd9d10ebcd52.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> steps, and doubling <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> quadruples <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_ec4ad94a9be87109217fcd9d10ebcd52.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>, so the time needed quadruples.\u00a0 We can see this below: doubling <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> doubles the area of the first green rectangle (<span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>) but quadruples the area of the second (<span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_ec4ad94a9be87109217fcd9d10ebcd52.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>).<a href=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_double.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-234 aligncenter\" src=\"http:\/\/mostlymental.com\/wp-content\/uploads\/2014\/05\/alg_double.png\" alt=\"alg_double\" width=\"188\" height=\"234\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>It turns out the most useful measure of how an algorithm scales is the largest power of <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> in the number of steps, which we denote with an O (pronounced Big-Oh).\u00a0 There's a more rigorous definition, but for now, this will do.\u00a0 The largest power of <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> in <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> is <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>, so we say that the first algorithm is <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_33697ce7dfa48ba80980d298c8089378.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> .\u00a0 The largest power in <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_e664c55ff7e0f2bc060f9b14940201b1.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> is <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_ec4ad94a9be87109217fcd9d10ebcd52.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>, so the second algorithm is <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8e9c5fee65a4f32abccd0e83ff203e39.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script>.\u00a0 The lowest powers of <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> scale better as <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8d9c307cb7f3c4a32822a51922d1ceaa.gif' style='vertical-align: middle; border: none; padding-bottom:1px;' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> gets large, so an <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_33697ce7dfa48ba80980d298c8089378.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> algorithm is generally faster with large data sets than an <span class='MathJax_Preview'><img src='http:\/\/mostlymental.com\/wp-content\/plugins\/latex\/cache\/tex_8e9c5fee65a4f32abccd0e83ff203e39.gif' style='vertical-align: middle; border: none; ' class='tex' alt=\"\" \/><\/span><script type='math\/tex'><\/script> algorithm.\u00a0 Thus, we would call the first algorithm better than the second.\u00a0 This method, known as asymptotic analysis, is really the cornerstone for the study of algorithms.\u00a0 I'll explain this in a lot more detail in future posts, so don't worry if you didn't get it here.<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=http%3A%2F%2Fmostlymental.com&amp;t=Algorithms&amp;s=100&amp;p[url]=http%3A%2F%2Fmostlymental.com&amp;p[images][0]=http%3A%2F%2Fmostlymental.com%2Fwp-content%2Fuploads%2F2014%2F05%2Falg_1-260x300.png&amp;p[title]=Algorithms\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=http%3A%2F%2Fmostlymental.com&amp;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"https:\/\/www.reddit.com\/submit?url=http%3A%2F%2Fmostlymental.com&amp;title=Algorithms\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/reddit.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-pinterest nolightbox\" data-provider=\"pinterest\" target=\"_blank\" rel=\"nofollow\" title=\"Pin it with Pinterest\" href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=http%3A%2F%2Fmostlymental.com&amp;media=http%3A%2F%2Fmostlymental.com%2Fwp-content%2Fuploads%2F2014%2F05%2Falg_1-260x300.png&amp;description=Algorithms\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"pinterest\" title=\"Pin it with Pinterest\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/pinterest.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=http%3A%2F%2Fmostlymental.com&amp;title=Algorithms\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Algorithms&amp;body=Hey%20check%20this%20out:%20http%3A%2F%2Fmostlymental.com\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/mail.png\" \/><\/a><a class=\"synved-social-credit\" target=\"_blank\" rel=\"nofollow\" title=\"WordPress Social Media Feather\" href=\"http:\/\/synved.com\/wordpress-social-media-feather\/\" style=\"color:#444;text-decoration:none;font-size:8px;margin-left:5px;vertical-align:10px;white-space:nowrap\"><span>by <\/span><img loading=\"lazy\" decoding=\"async\" style=\"display: inline;margin:0;padding:0;width:16px;height:16px\" width=\"16\" height=\"16\" alt=\"feather\" src=\"http:\/\/mostlymental.com\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/icon.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>Hello everyone! Sorry for missing last week's post.\u00a0 I was a bit busy graduating.\u00a0 It shouldn't happen again. I mentioned back in my first post that one of my interests is algorithm design.\u00a0 This week, I'd like to talk a bit about what that means.\u00a0 The word \"algorithm\" gets thrown around a lot in TV &hellip; <a href=\"http:\/\/mostlymental.com\/?p=215\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Algorithms<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-215","post","type-post","status-publish","format-standard","hentry","category-algorithms","category-computer-science"],"_links":{"self":[{"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/posts\/215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mostlymental.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=215"}],"version-history":[{"count":10,"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/posts\/215\/revisions"}],"predecessor-version":[{"id":235,"href":"http:\/\/mostlymental.com\/index.php?rest_route=\/wp\/v2\/posts\/215\/revisions\/235"}],"wp:attachment":[{"href":"http:\/\/mostlymental.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mostlymental.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mostlymental.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}