Solved

Use Bellman-Ford Algorithm to find least cost path

Posted on 1997-06-02
4
991 Views
Last Modified: 2013-12-26
The Bellman-Ford algorithm is descibed as a method for finding the least-cost path through a partially-connected network.  Using the C programming language, write a UNIX program which implements the Bellman-Ford algorithm to compute (i) the least-cost and (ii) the least cost path between any two nodes in a switched network.  Input data for your program will be stored in a text file which describes the link and link costs for all your nodes in the network (upto a maximum of 12 nodes).  The input has the following format:-  
Alternatively, the user may be prompted to input data into the program.

The output of the program should  display a table similar to:

 h     D2     Path     D3     Path     D4     Path     D5     Path     D6    Path

0
Comment
Question by:starmos
  • 2
4 Comments
 

Author Comment

by:starmos
ID: 1293166
Edited text of question
0
 

Author Comment

by:starmos
ID: 1293167
Please note that while I realise there are other questions to be answered, I would really appreciate an answer by Saturday 7 June.  Thanks in advance!
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1293168
Well, this is a homework, and that's a first problem.

Second problem is that you didn't request any advice, you just asked for the code, which is not exactly what this forum is intended for: IMHO, one should buy for a ready code.

I don't mean to be rude, just trying to give you some reasons.

As a personal suggestion, try to write the code yourself, then feel free to ask here for any problem you may face.

Rgds, julio
0
 
LVL 3

Accepted Solution

by:
mheacock earned 100 total points
ID: 1293169
Give me your professor's e-mail address...since I've got code
like this laying around and all I'd have to do is make minimal
changes, I'd like to submit it to him for a grade.

No sense you getting the grade since you didn't even attempt
the work.

I hope you fail out of your course, pal!  Maybe you should
attempt something easier...like Psychology or Political Science.
You'll also find it easier in those courses to buy papers and
such...
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 84
windows 10 how make picture as desktop background 2 62
WinWaitActive parameters 12 31
how to split multiple lines delimiter : 8 97
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now