Find Jobs
Hire Freelancers

Directed Graph

max $5 USD

Закрито
Опублікований over 19 years ago

max $5 USD

Оплачується при отриманні
Let *G = (V, E)* be a directed graph, where *V* is the set of vertices and *E* is the set of edges. All the edges have attached integer weights (*Attention:* the weights may be also negative!). Assuming the graph is sparse, write a program finding the shortest paths from a given source vertex *S* to all the other vertices. Implement your algorithm such that if there is more than one shortest path from *S* to some vertex *v,* a path with the fewest number of edges will be chosen. * Note*: You may need to implement more than one shortest-path algorithm to ensure the efficiency, and decide which algorithm is better suited for your problem only after reading the input data about the graph. **Reading** **the data ** The graph information is read from a file *[login to view URL]*, where each line contains the name of a vertex (which is a string or an array of char’s1) followed by the names of their adjacent vertices and the weights of the arcs incident to them. For instance, the content of the file for the graph in Figure 1 is: A : B 8 D 4 F 5 B : D 1 E 3 G 6 C : A 4 F 2 D : C 9 E -7 F -1 G 4 E : G 5 F : G : F 10 1You may assume that the characters are only letters and digits. **Output ** For each vertex in the graph except *S*, print a shortest path with fewest edges from *S* to the vertex (print the names of the vertices on the path) together with its length. *Attention:* in case of negative cycles, the shortest path may not be defined. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Windows XP Unix
ID проекту: 3442847

Про проект

6 пропозицій(-ї)
Дистанційний проект
Активність 19 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
6 фрілансерів(-и) готові виконати цю роботу у середньому за $4 USD
Аватарка користувача
See private message.
$4,25 USD за 10 дні(-в)
4,9 (122 відгуки(-ів))
6,9
6,9
Аватарка користувача
See private message.
$4,25 USD за 10 дні(-в)
3,8 (8 відгуки(-ів))
3,2
3,2
Аватарка користувача
See private message.
$4,25 USD за 10 дні(-в)
4,9 (12 відгуки(-ів))
2,6
2,6
Аватарка користувача
See private message.
$3,40 USD за 10 дні(-в)
5,0 (2 відгуки(-ів))
0,0
0,0
Аватарка користувача
See private message.
$4,25 USD за 10 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
See private message.
$4,25 USD за 10 дні(-в)
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор UNITED STATES
United States
5,0
4
На сайті з лист. 9, 2003

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.