{"id":1619,"date":"2015-09-01T13:40:18","date_gmt":"2015-09-01T11:40:18","guid":{"rendered":"http:\/\/www.blue.pri.ee\/ttu\/?page_id=1619"},"modified":"2024-06-14T15:11:17","modified_gmt":"2024-06-14T13:11:17","slug":"introduction-to-algorithms-and-uml","status":"publish","type":"page","link":"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/","title":{"rendered":"Introduction to algorithms and UML"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" 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: #999;color:#999\" 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><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#What_is_an_algorithm\" >What is an algorithm?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#What_is_UML\" >What is\u00a0UML?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#Shapes_used\" >Shapes used<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#ArgoUML\" >ArgoUML<\/a><ul class='ez-toc-list-level-6' ><li class='ez-toc-heading-level-6'><ul class='ez-toc-list-level-6' ><li class='ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#Creating_a_new_activity_diagram\" >Creating a new activity diagram<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-6'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/#Exporting_graphics_from_UML_for_your_documentation\" >Exporting graphics from UML (for your documentation)<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"What_is_an_algorithm\"><\/span>What is an algorithm?<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p data-select-like-a-boss=\"1\">The simplest way to describe a purpose of an\u00a0algorithm is to say is that it&#8217;s a step-by-step guide to do something. Algorithms may be used to describe the behavior of real world objects and processes e.g. how to tie shoelaces, wash your hair or make an omelet. However most commonly algorithms can be found in the fields of mathematics and computer science. Some of the things that can be described with an algorithm include searching, finding the lowest or the highest values, sorting, converting between numeral systems (radix)\u00a0etc.<\/p>\n<p data-select-like-a-boss=\"1\">The most important thing about an algorithm is that it successfully completes the task at hand. However since things can be done in numerous ways, the next on the list becomes how effective it is &#8211; how much time it takes to solve a problem? How much does the time increase when the problem increases in size (e.g. how does the time taken increase when going from sorting 10 digits to 10 billion digits?)<\/p>\n<p data-select-like-a-boss=\"1\">During the course we&#8217;ll cover some simpler algorithms, how to present them in pseudocode and using modelling tools.<\/p>\n<p><strong>An algorithm must be language independent &#8211;\u00a0You should be able to use the same algorithm in\u00a0a variety of languages, meaning you can&#8217;t use any specific code within the algorithm itself.<\/strong><\/p>\n<h4><span class=\"ez-toc-section\" id=\"What_is_UML\"><\/span>What is\u00a0UML?<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>UML (<em>universal modeling language<\/em>), as the name stands, is used for modelling various and in fact, quite\u00a0a large variety of things. We&#8217;ll introduce you to activity diagrams, which is only a small fraction of what UML is capable of. This will be used to visualize algorithms and processes that the programs we create can and will do. Other types of algorithms may be covered in various courses in the future or past.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Shapes_used\"><\/span>Shapes used<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<table style=\"height: 224px;\" width=\"350\">\n<thead>\n<tr>\n<th>Symbol<\/th>\n<th width=\"250\">DESCRIPTION<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1467\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-algus.png\" alt=\"uml algus\" width=\"50\" height=\"46\" \/><\/td>\n<td style=\"vertical-align: middle;\">Initial node<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1468\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-lopp.png\" alt=\"uml lopp\" width=\"50\" height=\"51\" \/><\/td>\n<td style=\"vertical-align: middle;\">End node<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-tegevus.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1536\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-tegevus.png\" alt=\"uml tegevus\" width=\"150\" height=\"43\" \/><\/a><\/td>\n<td style=\"vertical-align: middle;\">Action<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1471\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-tingimus.png\" alt=\"uml tingimus\" width=\"50\" height=\"49\" \/><\/td>\n<td style=\"vertical-align: middle;\">Decision node<\/p>\n<p>Join node<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1534\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-kommentaar.png\" alt=\"uml kommentaar\" width=\"174\" height=\"84\" \/><\/td>\n<td style=\"vertical-align: middle;\">Comment<\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1469 size-thumbnail\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-paralleel-algus-150x74.png\" alt=\"uml paralleel algus\" width=\"150\" height=\"74\" \/><\/td>\n<td style=\"vertical-align: middle;\">Fork node (for parallel activities)<br \/>\n<em>Activities must not depend on each other!<\/em><\/td>\n<\/tr>\n<tr style=\"background-color: #ffffff;\">\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1470 size-thumbnail\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/uml-paralleel-lopp-150x65.png\" alt=\"uml paralleel lopp\" width=\"150\" height=\"65\" \/><\/td>\n<td style=\"vertical-align: middle;\">Join\u00a0node (for parallel activities)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><span class=\"ez-toc-section\" id=\"ArgoUML\"><\/span>ArgoUML<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h6><span class=\"ez-toc-section\" id=\"Creating_a_new_activity_diagram\"><\/span>Creating a new activity diagram<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p><a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/09\/argo_eng.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1622\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/09\/argo_eng.png\" alt=\"argo_eng\" width=\"1071\" height=\"596\" srcset=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/09\/argo_eng.png 1071w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/09\/argo_eng-300x167.png 300w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/09\/argo_eng-1024x570.png 1024w\" sizes=\"auto, (max-width: 1071px) 100vw, 1071px\" \/><\/a><\/p>\n<h6><span class=\"ez-toc-section\" id=\"Exporting_graphics_from_UML_for_your_documentation\"><\/span>Exporting graphics from UML (for your documentation)<span class=\"ez-toc-section-end\"><\/span><\/h6>\n<p><a href=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/argo_export.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1540\" src=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/argo_export.png\" alt=\"argo_export\" width=\"430\" height=\"498\" srcset=\"https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/argo_export.png 430w, https:\/\/blue.pri.ee\/ttu\/wp-content\/uploads\/2015\/08\/argo_export-259x300.png 259w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is an algorithm? The simplest way to describe a purpose of an\u00a0algorithm is to say is that it&#8217;s a step-by-step guide to do something. Algorithms may be used to describe the behavior of real world objects and processes e.g. how to tie shoelaces, wash your hair or make an omelet. However most commonly algorithms &hellip; <a href=\"https:\/\/blue.pri.ee\/ttu\/resources\/introduction-to-algorithms-and-uml\/\" class=\"more-link\">Loe edasi <span class=\"screen-reader-text\">Introduction to algorithms and UML<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1439,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"page-templates\/code-width.php","meta":{"footnotes":""},"class_list":["post-1619","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/1619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/comments?post=1619"}],"version-history":[{"count":0,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/1619\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/pages\/1439"}],"wp:attachment":[{"href":"https:\/\/blue.pri.ee\/ttu\/wp-json\/wp\/v2\/media?parent=1619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}