• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1007
  • Last Modified:

Use Bellman-Ford Algorithm to find least cost path

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
starmos
Asked:
starmos
  • 2
1 Solution
 
starmosAuthor Commented:
Edited text of question
0
 
starmosAuthor Commented:
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
 
julio011597Commented:
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
 
mheacockCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now