[CSE2304] [progress]

Practical #4, semester 1, 2000
Group A: week 10, 8 May...
Group B: week 11, 15 May...

Write a C program to read a directed graph from standard input. The vertices are weighted. Each vertex has a name; you can assume this is less than 20 characters long and you can truncate any longer name. Each vertex also has a non-negative integer weight, e.g. a duration.

Vertices are given one per line. There is then a blank line, followed by the edges of the graph. Each edge consists of two vertices, `vi vj', which represents an edge from vi to vj. e.g.

   foundations 10
   frame 6
   roof 3
   bricks 4
    ... etc.
   plaster 5

   foundations frame        -- i.e. frame must follow foundations
   frame roof
    ... etc.

Total: [6 marks]

Your solution will be needed for the [next prac'].

© 2000, L. Allison, Comp. Sci. & SWE, Monash University, Australia