{"id":107714,"date":"2021-10-19T12:20:24","date_gmt":"2021-10-19T16:20:24","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=107714"},"modified":"2022-11-21T09:48:34","modified_gmt":"2022-11-21T14:48:34","slug":"dijkstra-algorithm-part-i","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/","title":{"rendered":"Dijkstra Algorithm &#8211; Part I"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Start learning all about the Dijkstra algorithm for finding the shortest path. We briefly review the Kruskal algorithm, Prim algorithm, Johnson algorithm and Bellman algorithm as well. We&#8217;ll cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>What is the Dijkstra algorithm?<\/li><li>How does the Dijkstra algorithm work?<\/li><li>Pseudo code of Dijkstra algorithm<\/li><li>Dijkstra algorithm table<\/li><li>Dijkstra algorithm time complexity<\/li><li>When to use the Dijkstra algorithm?<\/li><li>Dijkstra algorithm vs Kruskal algorithm<\/li><li>Dijkstra algorithm vs Prim algorithm<\/li><li>Prim algorithm vs Kruskal algorithm<\/li><li>How to find the shortest path using the Dijkstra algorithm?<\/li><li>Why does the Dijkstra algorithm fail for negative weights?<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-dijkstra-algorithm\">What is the Dijkstra algorithm?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edsger W. Dijkstra (1930-2002)&nbsp;was an eminent physicist who made great advances in the world of distributed and concurrent computing and other fields of mathematics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The algorithm that bears his name finds the optimal solution to obtain the shortest path in a graph or net, although as we will see below there are improvements to the algorithm to enhance efficiency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Dijkstra algorithm belongs to the family of so-called greedy algorithms as it makes its decisions only considering the present moment without regard to how that decision may affect the future, i.e. it makes the best decision at a given moment without thinking about future consequences.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Greedy algorithms are typically used to solve optimization problems, such as selecting the shortest path or the best order to execute tasks on a computer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this context, the greedy algorithm selects the most promising segment or task at a given instant, without ever reconsidering whether that was the best decision later on. It is therefore a simple algorithm to implement since there is no need to control alternatives and no follow-up to undo previous decisions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Greedy algorithms such as Dijkstra algorithm, Kruskal algorithm or Prim algorithm are characterized by the following general properties:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Algorithms require solving a problem in an optimal way, where to construct the solution we have a set or list of candidates such as the edges of a graph, the tasks to plan, etc.<\/li><li>As the algorithm progresses, two sets are accumulated, one containing the candidates that have been evaluated and selected and the other containing the candidates that have been evaluated but rejected.<\/li><li>There is a function that checks whether a set of candidates form a solution to the problem, ignoring for the moment whether this is the optimal solution.<\/li><li>There is a second function that tests whether a given set of candidates is feasible, i.e. whether it is possible to reach a solution with other candidates to achieve the final solution. Again, it is ignored for the moment whether the solution is optimal.<\/li><li>There is a third function that selects the candidate that has neither been selected nor rejected and is the most promising candidate for the solution at a given point in time.<\/li><li>Finally, there is a fourth function called objective that returns the solution we have found, although it is strictly speaking not part of the greedy algorithm.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To solve the problem, we look for the set of candidates (first) that constitutes a solution and (second) that optimizes the value of the objective function. The greedy algorithms proceed step by step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Initially the set of selected candidates is empty and at each step the best candidate is considered to be added to this set by the selection function.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the new extended set of selected candidates is not feasible for a solution, optimal or not, the candidate is rejected.<\/li><li>If the extended set of candidates still forms a possible solution, optimal or not, the new candidate is added to the set of selected candidates.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In this way, we continue to advance step by step until we find a solution that must necessarily be optimal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we have said, these characteristics are common to the greedy algorithms although, as we will see later, the Dijkstra, Kruskal and Prim greedy algorithms have distinctive characteristics.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-the-dijkstra-algorithm-work\">How does the Dijkstra algorithm work?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Dijkstra algorithm solves the minimum path problem for a given graph.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Given a directed graph&nbsp;<strong>G = {N, E}&nbsp;<\/strong>where N is the set of nodes of G and E is the set of directed edges, each edge has a non-negative length, we can talk about weight or cost too, and one of the nodes is taken as the origin-node.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The problem is to determine the length of the minimum path from the origin to each of the other nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we have seen in the general characteristics of greedy algorithms, the Dijkstra algorithm uses two sets of nodes S and C. The set S holds the set of selected nodes and the distance to the origin-node of each node at a given time. The set C contains all candidate nodes that have not been selected and whose distance is not yet known.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From this we derive an&nbsp;<strong>invariant property N = S U C<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is, the set of nodes is equal to the union of the sets of selected nodes and unselected nodes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the first step of the algorithm the set S has only the node-origin and when the algorithm finishes it contains all the graph nodes with the cost of each edge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We talk about a special node if all the nodes involved in the path from the origin to it are within the set of selected nodes S. Dijkstra algorithm maintains a matrix D that is updated at each step with the lengths or weights of the shortest special path of each node of the set S.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a new &#8216;v&#8217; node is tried to be added to S, the shortest special path to &#8216;v&#8217; is also the shortest path to all other nodes (see demonstration in the reference book). When the algorithm is finished, all the nodes are in S and the matrix D contains all the special paths from the origin to any of the other nodes in the graph and thus the solution to our minimum path problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>In the next installment, Mario Pisa will discuss how the Dijkstra algorithm works in pseudo-code before looking at the Python implementation.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Visit QuantInsti for additional insight on this topic: <a href=\"https:\/\/blog.quantinsti.com\/dijkstra-algorithm\/\">https:\/\/blog.quantinsti.com\/dijkstra-algorithm\/<\/a><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.<\/p>\n","protected":false},"author":387,"featured_media":76940,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,350,341,344],"tags":[851,7257,10530,10526,10529,10527,10528],"contributors-categories":[13654],"class_list":["post-107714","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-python-development","category-ibkr-quant-news","category-quant-asia-pacific","category-quant-development","category-quant-regions","tag-algo-trading","tag-algorithmic-trading","tag-bellman-algorithm","tag-dijkstra-algorithm","tag-johnson-algorithm","tag-kruskal-algorithm","tag-prim-algorithm","contributors-categories-quantinsti"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Dijkstra Algorithm &#8211; Part I | IBKR Quant<\/title>\n<meta name=\"description\" content=\"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.\" \/>\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.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/107714\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dijkstra Algorithm - Part I | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-19T16:20:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:48:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mario Pisa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mario Pisa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Mario Pisa\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/f2bfe36ae4f6f088b98f90558d37ed12\"\n\t            },\n\t            \"headline\": \"Dijkstra Algorithm &#8211; Part I\",\n\t            \"datePublished\": \"2021-10-19T16:20:24+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:34+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/\"\n\t            },\n\t            \"wordCount\": 1030,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/02\\\/deep-machine-learning.jpg\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Algorithmic Trading\",\n\t                \"Bellman algorithm\",\n\t                \"Dijkstra algorithm\",\n\t                \"Johnson algorithm\",\n\t                \"Kruskal algorithm\",\n\t                \"Prim algorithm\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/\",\n\t            \"name\": \"Dijkstra Algorithm - Part I | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/02\\\/deep-machine-learning.jpg\",\n\t            \"datePublished\": \"2021-10-19T16:20:24+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:48:34+00:00\",\n\t            \"description\": \"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/dijkstra-algorithm-part-i\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/02\\\/deep-machine-learning.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2021\\\/02\\\/deep-machine-learning.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\n\t            \"caption\": \"Quant\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/f2bfe36ae4f6f088b98f90558d37ed12\",\n\t            \"name\": \"Mario Pisa\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/mariopisa\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dijkstra Algorithm &#8211; Part I | IBKR Quant","description":"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.","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.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/107714\/","og_locale":"en_US","og_type":"article","og_title":"Dijkstra Algorithm - Part I | IBKR Quant Blog","og_description":"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/","og_site_name":"IBKR Campus US","article_published_time":"2021-10-19T16:20:24+00:00","article_modified_time":"2022-11-21T14:48:34+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","type":"image\/jpeg"}],"author":"Mario Pisa","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mario Pisa","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/"},"author":{"name":"Mario Pisa","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/f2bfe36ae4f6f088b98f90558d37ed12"},"headline":"Dijkstra Algorithm &#8211; Part I","datePublished":"2021-10-19T16:20:24+00:00","dateModified":"2022-11-21T14:48:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/"},"wordCount":1030,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","keywords":["Algo Trading","Algorithmic Trading","Bellman algorithm","Dijkstra algorithm","Johnson algorithm","Kruskal algorithm","Prim algorithm"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/","name":"Dijkstra Algorithm - Part I | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","datePublished":"2021-10-19T16:20:24+00:00","dateModified":"2022-11-21T14:48:34+00:00","description":"The Dijkstra Algorithm finds the optimal solution to obtain the shortest path in a graph or net.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/dijkstra-algorithm-part-i\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","width":900,"height":550,"caption":"Quant"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/f2bfe36ae4f6f088b98f90558d37ed12","name":"Mario Pisa","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/mariopisa\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/02\/deep-machine-learning.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/107714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=107714"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/107714\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/76940"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=107714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=107714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=107714"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=107714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}