Vedel by mi prosím niekto poradiť s riešením nasledovnej úlohy?
Výstupom Dijkstrovho algoritmu je aj pole, v ktorom si pre jednotlivé vrcholy grafu pamätáme predchodcu na nájdenej najkratšej ceste.
Uvažujme, že pole predchodcov p obsahuje informáciu o najkratšej ceste v grafe s piatimi vrcholmi označenými 1..5.
Z informácie uloženej v poli zrekonštruujte príslušnú najkratšiu cestu z vrcholu 4 do vrcholu 5.
Prikladám aj obrázok.
Rada by som vedela aj postup, aj riešenie.
Ďakujem pekne
Are you looking for informatika tutoring? Find the right informatika tutor for online or in-person tutoring near you.
We access the information stored on your device for this website to function properly. This includes, for example, cookies or local browser cache. We use this to store the data necessary for the functioning of the website, data used for analytical purposes, or data stored by third parties.
If this information is essential for the operation of this website, we store it automatically. For everything else, we need your consent, which you can choose to give below. Your consent is valid for 12 months. Should you refuse, we will ask you for consent again in 6 months, but you are free to change your mind at any time. For more information, please see our GDPR and Terms of Use.