1 / 7

Drumuri minime si drumuri maxime intr -un graf

Drumuri minime si drumuri maxime intr -un graf. Consideram un graf orientat G=(V,U) cu n varfuri,in care fiecarui arc, ii asociem un cost (nr. intreg ) , semnificatia acestui cost poate fi de exemplu : costul deplasarii unui autoturism ..;

Download Presentation

Drumuri minime si drumuri maxime intr -un graf

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Drumuriminimesidrumurimaximeintr-un graf

  2. Consideram un graforientat G=(V,U) cu n varfuri,in care fiecarui arc, ii asociem un cost (nr. intreg) , semnificatiaacestui cost poatefi de exemplu: costuldeplasariiunuiautoturism..; Matriceacosturiloreste o matrice A cu n liniisi m coloane care poateavea 2 forme: c, dacaexista arc de cost c>0 de la i la j; A= 0, dacai=j; +∞,daca nu exista arc; F1

  3. F2 c, dacaexista arc de cost de la i la j; A= 0, dacai=j; -∞, daca nu exista arc de cost de la i la j;

  4. V={(1,2) (1,4) (2,4) (3,2) (3,4)} u1 u2 u3 u4 u5 u1=7; u3=4; u5=2; u2=3; u4=6; 0 7 +∞ 3 A= +∞ 0 +∞ 4 +∞ 6 0 2 +∞ +∞ +∞ 0 1 2 3 4

  5. Un drum este minim atuncicandlungimealuiesteceamaimica si se numeste drum de cost minim. Un drum este maxim candlungimealuiesteceamai mare si se numeste drum de cost maxim. Exista 3 posibilitati de a determinadrumuloptim: -sursasigura, destinatieunica (intre 2 noduri date); -sursaunica , destinatiemultipla (Dijkstra); -sursamultipla, destinatiemultipla (Roy-Floyd);

  6. V={(1,2)(1,4)(2,3)(3,2)(4,3)(5,1)} u1 u2 u3 u4 u5 u6 u1= 4; u2=6; u3=9; u4=1 ; u5=7; u6=3; 1 2 5 4 3

  7. 0 4 +∞ 6 +∞ +∞ 0 1 +∞ +∞pentrudrumuri A= +∞ 9 0 7 +∞ minime +∞ +∞ +∞ 0 +∞ 3 +∞ +∞ +∞ 0 0 4 -∞ 6 -∞ pentrudrumuri -∞ 0 1 -∞ -∞ maxime A= -∞ 9 0 7 -∞ -∞ -∞ -∞ 0 -∞ 3 -∞ -∞ -∞ 0

More Related