Sie sind auf Seite 1von 4

EE 6340 Project 3 Disjoint Path Computation

Limin Tang lxt064000@utdallas.edu April 22, 2011

The subject of this project is to compute disjoint paths between pairs of nodes in a network topology. The network topology and the pairs of nodes will be given as part of the project assignment. The disjoint paths will have to be computed using two dierent approaches, so the project comprises two parts, each corresponds to one approach you need to implement both approaches.

Part I
In this part, you need to implement shortest path algorithm and compute two link-disjoint paths between given pairs of nodes based on the implementation. You can choose to implement either Dijkstras algorithm or Bellman-Fords algorithm. Optional: you may implement both for cross validation of your results.

Part II
In this part, you need to implement maximum ow algorithm (Ford-Fulkerson algorithm) to compute two link-disjoint paths between given pairs of nodes. You need to compare the obtained disjoint paths with the paths obtained in part I for each pair of nodes and draw your conclusion.

Implementation guidelines
You can use any programming language for the implementation. The implementation needs to satisfy the following requirements: the program reads the given network topology le as input (see below); the program takes two nodes as input, the rst is the source and the second is the destination you can use two integers to represent these two nodes; output of the program contains two paths from the source to the destination which are linkdisjoint you can represent each path as a sequence of integers, each integer represents a node: the rst integer represents the source and the last integer represents the destination. An example is shown below: The network topology is given as a matrix: 1

0 0 1 2 3 4 5 6 7 8 9 0 1 1 -1

1 1 0 1

9 10 11 12 13

1 -1 -1 -1 -1 -1 1

1 -1 -1 -1 -1 -1

1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1

0 -1 -1 0 1

1 -1

1 -1 -1 -1 -1 -1 0 1 1

-1 -1 -1 -1 -1

1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1

1 -1

0 -1

-1 -1 -1 -1

1 -1

0 -1

1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 0 -1 0 1 1 -1 -1 1 -1 0 1 1

-1 -1 -1 -1 -1

1 -1

0 -1 0 1

1 -1 -1 -1 -1 -1

1 -1 1

-1 -1 -1 -1 -1 -1 -1

10 -1 -1 -1

1 -1 -1 -1 -1 -1 -1 1

11 -1 -1 -1 -1 -1 -1 -1 -1 -1 12 -1 -1 -1 -1 -1

1 -1 0 1 1 0

1 -1 -1 -1 -1 -1

13 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1

1 -1

In the matrix above, the rst row and the rst column are node id, other numbers represent weight of the link between a pair of nodes. For example, there is a link with weight 1 between node pair (0, 1), a link with weight 1 between node pair (1, 2), and so on. Value 1 means no link exists between the node pair. For example, there is no link between node pair (0, 3). Of course, a link from a node to itself always has weight 0: such link can be considered as virtual, since it usually does not exist and is not shown in diagram of the network topology. The matrix represents an undirected graph, i.e. link (i, j) are (j, i) are the same link (e.g. link (1, 2) and (2, 1) are the same, and so on), when you implement algorithms computing linkdisjoint paths, keep this in your mind. For example, for a given node pair (s, d), two paths {s, . . . , i, . . . , j, . . . , d} and {s, . . . , j, . . . , i, . . . , d} are considered as sharing link (i, j), hence are not link-disjoint. You can copy the matrix above into a plain text le and test your program correctness by reading this le as input. If the pair of nodes given to you is (0, 11), your program should take integers 0 and 11 as input. The shortest path from 0 to 11 on the network above is 0 8 9 11, and the disjoint path is 0 1 3 10 11. Thus, output of your program should be {0, 8, 9, 11} and {0, 1, 3, 10, 11} (or {0, 2, 5, 12, 11}). 2

10 0

11 13

9
1 3 4 6 8 12 2 5 7

Figure 1: Sample network topology

Notes: You can use the sample network topology shown above to test you code; diagram of the sample topology is also shown in Fig. 1, which enables you to check correctness of your program manually. In the actual assignment, only a plain text le containing a matrix representing the network topology will be given to you. It is possible that disjoint paths cannot be found for a given pair of nodes, in this case, the program will write the single path found to the output.

Submission guidelines
You need to submit the source code and a readme le describing the necessary steps to run your program. You also need to submit a short document, which should include the following: disjoint paths computed for each pair of nodes specied if disjoint paths cannot be found for the pair, only include the single path found; comparison of results of part I and II for the same pair of nodes and your conclusion. Notes: Although you only need to show results for the specied pair of nodes, your program will be checked using dierent pairs of nodes for correctness. Your work should be fully original, any form of cheating is a serious violation of University policies and can lead to serious consequences. If you cooperate with another classmate in nishing the project, one submission is enough for both of you; if you prefer to submit separately, put your partners name on the report. 3

Include all your les in a zip le and send them by email using the email address noted under the title of the project (use [EE 6340]Project 3 Part I (II) as subject of the email). This projection description, the network topology le and the node pairs for which disjoint paths need to be computed can be downloaded from the following url: http://www.utdallas.edu/~lxt064000/EE6340/Project_3_files/Project3.zip Deadline for part I is 11:59pm, April 29th (one week from assignment) and deadline for part II is 11:59pm, May 6th (two weeks from assignment).

Das könnte Ihnen auch gefallen