next up previous contents
Next: Design Issues Up: NetWorKs Previous: Contents

Introduction

Graphs and networks arise in the modeling and analysis of a variety of systems. These include computer networks, transportation systems, electrical circuits, and distribution systems. In general, a graph G is mathematical construct typically defined as G=(V,E) where tex2html_wrap_inline908 is a set of vertices, and tex2html_wrap_inline910 is a set of undirected edges. The edge tex2html_wrap_inline912 is incident with its vertices, tex2html_wrap_inline914 and tex2html_wrap_inline916. The degree of vertex tex2html_wrap_inline914 is the number of edges which are incident with tex2html_wrap_inline914. If G represents a directed graph, then tex2html_wrap_inline924 and the edge tex2html_wrap_inline926 is directed from tex2html_wrap_inline914 to tex2html_wrap_inline916. The edge tex2html_wrap_inline932 is said to be incident from tex2html_wrap_inline914, and incident to tex2html_wrap_inline916. The out-degree of vertex tex2html_wrap_inline914 is the number of edges incident from tex2html_wrap_inline914. The in-degree of vertex tex2html_wrap_inline916 is the number of edges incident to tex2html_wrap_inline916. Some graphs are defined to allow multi-edges, but graphs defined as above contain at most one tex2html_wrap_inline946 edge. G is called simple if it has no loops, tex2html_wrap_inline950. A network G is a graph (V,E) in which quantitative information is associated with the vertices and/or edges. A vertex tex2html_wrap_inline914 may have a demand tex2html_wrap_inline958, and an edge tex2html_wrap_inline912 or tex2html_wrap_inline946 may have a cost (weight) tex2html_wrap_inline964, and a flow tex2html_wrap_inline966. There may also be lower bounds (minima) tex2html_wrap_inline968 and upper bounds (capacities) tex2html_wrap_inline970 on flows. Frequently, the networks attributes are integers, i.e. tex2html_wrap_inline972, and we will make this assumption here as well. One of the appeals of using graphs (and networks) for modeling is in providing a concise visual representation of a system: whether it is a configuration of computers, a city street system, or a sequence of moves in a board game. As a part of this representation, vertices and edges may be colored. These colors are typically denoted as natural numbers in the mathematical construct.

Not only do graphs provide a clearly grasped representation of certain problems, but this representation often affords a more efficient means of solving a given problem. For example, shortest paths are more easily found by applying an algorithm (a finite sequence of operations which accomplish a specific task) to the underlying network itself than by applying the techniques of linear programming. Since textbook descriptions of a network algorithm are sometimes overly terse or abstract, there is definite virtue in visually illustrating such an algorithm by a series of operations on the network itself. In this way, the computer animated illustration of graph and network algorithms promises to be a valuable teaching tool.

The objective of this project was to design and implement a graphically oriented computer program which provides an environment for illustrating/animating graph and network theoretic algorithms. In particular the environment should allow users to create and manipulate graphs, and to then request that an algorithm be performed on the resulting graph. In addition to a graphical user interface (GUI), the environment should provide a rich set of instructions available to programmers for writing algorithms, and it should provide a simple mechanism for adding new algorithms to the environment. The current project includes several algorithms to test the GUI, to demonstrate how algorithms may be added, and to assess the instruction set available for writing algorithms.

The programming language Java was selected to implement this project for several reasons. First, Java is object oriented, and the object oriented paradigm is pervasive among GUI based programs. Java includes a abstract window toolkit package called the awt, which includes ready made buttons, checkboxes, menus, etc. Also, Java offers the opportunity to develop platform independent programs, and Java applets--special limited programs--may be placed on a web page and run over the Internet. This certainly makes the project more accessible.

The remainder of this document describes a set of Java classes--templates for objects--and an application called NetWorKs which satisfies the project objectives. NetWorKs includes a Java applet that can run on a web page and may be used over the Internet. The application provides text based file I/O, and a small future modification to the applet will allow users to read files. Applets are not generally permitted to write to files because of security related issues. The NetWorKs applet may be viewed via http://www.math.clemson.edu/tex2html_wrap_inline974kellyw . The algorithms currently available are:

The following sections discuss project design issues, the graphical user interface and data structures. They also provide an overview of the various classes with an emphasis on graph algorithms, followed by a more detailed discussion of each class accompanied by its listing.


next up previous contents
Next: Design Issues Up: NetWorKs Previous: Contents

Kelly Waters
Mon Oct 27 18:18:15 EST 1997