{"id":2477,"date":"2016-02-16T13:33:59","date_gmt":"2016-02-16T12:33:59","guid":{"rendered":"http:\/\/smart--grid.net\/?page_id=2477"},"modified":"2022-12-03T22:58:59","modified_gmt":"2022-12-03T21:58:59","slug":"parcours-darbres","status":"publish","type":"page","link":"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/","title":{"rendered":"Curso de \u00e1rbol"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"2477\" class=\"elementor elementor-2477\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-54ea711 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"54ea711\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3d9b8f7\" data-id=\"3d9b8f7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-72fcb56 elementor-tabs-view-horizontal elementor-widget elementor-widget-tabs\" data-id=\"72fcb56\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"tabs.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-tabs\">\n\t\t\t<div class=\"elementor-tabs-wrapper\" role=\"tablist\" >\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-1201\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-1201\" aria-expanded=\"false\">Libro #1<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t<div class=\"elementor-tabs-content-wrapper\" role=\"tablist\" aria-orientation=\"vertical\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-1201\" aria-expanded=\"false\">Libro #1<\/div>\n\t\t\t\t\t<div id=\"elementor-tab-content-1201\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-1201\" tabindex=\"0\" hidden=\"false\"><iframe style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/ws-eu.amazon-adsystem.com\/widgets\/q?ServiceVersion=20070822&#038;OneJS=1&#038;Operation=GetAdHtml&#038;MarketPlace=FR&#038;source=ss&#038;ref=as_ss_li_til&#038;ad_type=product_link&#038;tracking_id=mythscience-21&#038;language=fr_FR&#038;marketplace=amazon&#038;region=FR&#038;placement=6130355149&#038;asins=6130355149&#038;linkId=8789878aa3bdd5815e7c180d306e0cf8&#038;show_border=true&#038;link_opens_in_new_window=true\"><\/iframe><\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-531866b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"531866b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-2635c52\" data-id=\"2635c52\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d58162b elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"d58162b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Teor\u00eda de grafos<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-add722c\" data-id=\"add722c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ffc88af elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"ffc88af\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/es\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Pagina de inicio<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-64f7f64\" data-id=\"64f7f64\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d258cc9 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"d258cc9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/fr.wikipedia.org\/wiki\/Parcours_d%27arbre\" target=\"_blank\" rel=\"noopener\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Wiki<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-601abb1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"601abb1\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-30acc938\" data-id=\"30acc938\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-15b0e611 elementor-widget elementor-widget-text-editor\" data-id=\"15b0e611\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<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<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contenido<\/p>\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=\"Tabla de contenido alternativo\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Palanca<\/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-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/#Parcours-darbre\" >Curso de \u00e1rbol<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/#Parcours-en-largeur\" >Curso de ancho<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/#Parcours-en-profondeur-prefixe\" >Curso en profundidad: prefijo<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/#Parcours-en-profondeur-infixe\" >Tour en profundidad: infijo<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/curso-de-arbol\/#Parcours-en-profondeur-postfixe\" >Tour en profundidad: postfixe<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Parcours-darbre\"><\/span>Curso de \u00e1rbol<span class=\"ez-toc-section-end\"><\/span><\/h2><p>Para navegar por un <a href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/\">grafico<\/a>, primero construimos un <a href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/arboles-y-arboles\/\">\u00e1rbol<\/a> cubierta de este \u00faltimo. Luego hablaremos del recorrido del \u00e1rbol.<\/p><h2><span class=\"ez-toc-section\" id=\"Parcours-en-largeur\"><\/span>Curso de ancho<span class=\"ez-toc-section-end\"><\/span><\/h2><p>En el recorrido en ancho, se atraviesa aumentando la profundidad en la ra\u00edz.<\/p><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-2574 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/02\/arbre5.png\" alt=\"curso de \u00e1rbol\" width=\"291\" height=\"189\" title=\"\"><\/p><div style=\"padding: 3px; border: 2px dotted #a5a5a5; background-color: #f6f9fa;\"><pre><b>Ancho de ruta<\/b>(Gr\u00e1fico G, V\u00e9rtices): {f = CreerFile (); f. hilo (s); marcas);\n  <strong>tanto que<\/strong> no f.empty () s = f. to thread (); pantalla (s);\n     <strong> para<\/strong> cualquier vecino t de s en G\n           <strong>si<\/strong> t DO sin marcar f. hilo (t); marca (t);\n           <strong>terminara si<\/strong>\n     <strong> final para<\/strong>\n  <strong>terminar mientras<\/strong>       \n }<\/pre><\/div><h2><span class=\"ez-toc-section\" id=\"Parcours-en-profondeur-prefixe\"><\/span>Curso en profundidad: prefijo<span class=\"ez-toc-section-end\"><\/span><\/h2><p>los <a href=\"https:\/\/complex-systems-ai.com\/es\/teoria-de-grafos\/recorrido-de-grafos\/\">viaje en profundidad<\/a> son caminos recursivos. En el recorrido de prefijos, siempre recorremos el sub\u00e1rbol izquierdo antes de procesar el sub\u00e1rbol derecho.<\/p><p><img decoding=\"async\" class=\"aligncenter wp-image-2579 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/02\/arbre6.png\" alt=\"curso de \u00e1rbol\" width=\"198\" height=\"187\" title=\"\"><\/p><div style=\"padding: 3px; border: 2px dotted #a5a5a5; background-color: #f6f9fa;\"><pre><b>Prefijo de ruta<\/b>(Gr\u00e1fico G): {\n  <strong>si<\/strong> (G == NULL) volver; pantalla (ra\u00edz); PathPrefix (izquierda); RoutePrefix (derecha); }<\/pre><\/div><h2><span class=\"ez-toc-section\" id=\"Parcours-en-profondeur-infixe\"><\/span>Tour en profundidad: infijo<span class=\"ez-toc-section-end\"><\/span><\/h2><p>La ruta infija en profundidad consiste en ir lo m\u00e1s a la izquierda posible y mostrar las ramas de izquierda a derecha. Esto es equivalente a mostrar las diagonales \/ de abajo hacia arriba.<\/p><p><img decoding=\"async\" class=\"aligncenter wp-image-2585 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/02\/arbre7.png\" alt=\"curso de \u00e1rbol\" width=\"193\" height=\"196\" title=\"\"><\/p><div style=\"padding: 3px; border: 2px dotted #a5a5a5; background-color: #f6f9fa;\"><pre><b> CourseInfix<\/b>(Gr\u00e1fico G): {\n  <strong>si<\/strong> (G == NULL) volver; PathPrefix (izquierda); pantalla (ra\u00edz); RoutePrefix (derecha); }<\/pre><\/div><h2><span class=\"ez-toc-section\" id=\"Parcours-en-profondeur-postfixe\"><\/span>Tour en profundidad: postfixe<span class=\"ez-toc-section-end\"><\/span><\/h2><p>Es una ruta diagonal de arriba a abajo.<\/p><p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2592 size-full\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2016\/02\/arbre8.png\" alt=\"curso de \u00e1rbol\" width=\"209\" height=\"190\" title=\"\"><\/p><div style=\"padding: 3px; border: 2px dotted #a5a5a5; background-color: #f6f9fa;\"><pre><b> Sufijo<\/b>(Gr\u00e1fico G): {\n  <strong>si<\/strong> (G == NULL) volver; PathPrefix (izquierda); RoutePrefix (derecha); pantalla (ra\u00edz); }<\/pre><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Libro #1 Libro #1 Teor\u00eda de grafos P\u00e1gina de inicio Wiki Recorrido de \u00e1rboles Para recorrer un gr\u00e1fico, primero construimos un \u00e1rbol de expansi\u00f3n del mismo. \u2026 <\/p>","protected":false},"author":1,"featured_media":0,"parent":2204,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2477","page","type-page","status-publish","hentry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/pages\/2477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/comments?post=2477"}],"version-history":[{"count":4,"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/pages\/2477\/revisions"}],"predecessor-version":[{"id":18409,"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/pages\/2477\/revisions\/18409"}],"up":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/pages\/2204"}],"wp:attachment":[{"href":"https:\/\/complex-systems-ai.com\/es\/wp-json\/wp\/v2\/media?parent=2477"}],"curies":[{"name":"gracias","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}