assign4 - endpoint endpoint flow endpoint endpoint flow ......

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment 4: Max Flow (Due: Friday, December 5th, 11:59pm) Part A: Max Flow prgram Write a Java program that computes the max flow in a weighted directed graph. You should use Edmonds Karp to solve the problem. The input graph to your program is described by a text file named graph.txt and the results from your program should be stored in another text file named flow.txt. The format of graph.txt and flow.txt is described below. Create your own graph.txt to test your program. Part B: Details a. The format of graph.txt: (See example below.) num_of_vertices num_of_edges source vertex number sink vertex number endpoint endpoint capacity endpoint endpoint capacity endpoint endpoint capacity ... (list of edges in the graph) b. The format of flow.txt: (See example below.) total_flow endpoint endpoint flow
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: endpoint endpoint flow endpoint endpoint flow ... (list of edges of the flow) c. The vertices in the graph are named as follows: V1, V2, V3, V4, V5 so on and so forth. The weights of the edges are integers. d. In hw4.txt file, state the following: 1. Which data structure do you use to store the graph in your program? 2. The typescript that shows your compile and execute commands. Example graph.txt: 3 3 1 3 1 2 10 1 3 2 2 3 5 Example flow.txt: 7 1 2 5 2 3 5 1 3 2 Part C: Submit your work A brief text file, hw4.txt, must be submitted that shows all executions (Typescript) and also contains the explanations as stated in Part B above. Here is a checklist of the files you should submit: hw4flow.java hw4.txt graph.txt (your example graph) flow.txt (the results for your graph.txt)...
View Full Document

This note was uploaded on 03/28/2009 for the course CSE 120A taught by Professor Healey during the Spring '08 term at UC Irvine.

Page1 / 2

assign4 - endpoint endpoint flow endpoint endpoint flow ......

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online