Quantcast
Channel: MATLAB Central Newsreader - tag:"arc"
Viewing all articles
Browse latest Browse all 15

Re: Forming an adjacency matrix

$
0
0
"H " <mesta2000@hotmail.com> wrote in message <hhsomp$1nj$1@fred.mathworks.com>...
> I'm trying to form an adjacency matrix of a three-dimensional evenly spaced network(graph) where one can move to every neighboring node except the ones directly above, beneath and behind the node in question. I.e. movement in forward,sideways and diagonally up and down is accepted. My graph would be quite large (about 100,000 nodes representing a space of 100x100x10) so what I really need some kind of algorithm to build the adjacency matrix. Is there any ready solutions for this problem?
>
> I can of course consider a different approach if there is any.
>
> My ultimate goal is to solve a routing problem with some weight matrix, but I cant get to it without a representation of the space.
>
> I searched the forum but I couldn't find an answer so any help would be greatly appreciated.
------------------------------------------------------------

You can store a graph(network,adjacency matrix) which has n nodes
and m arcs in about 2m+n words(boxes). With n = 10^5 and m = 24*10^5,
this gives a total of about 5 M boxes = 40 MB if there are 8 bytes/box.

Alternatively, a simple list of arcs, where each arc is represented by
a triple (i,j,val), requires about 3m boxes.

Here is Richard Varga (Matrix Iterative Analysis, Prentice-Hall, 1962,
pages 1 and 2.) talking about sparse matrices and iterative methods
in 1960:

"As an example of the magnitude of problems that have been
successfully solved on digital computers by cyclic iterative
methods, the Bettis Atomic Power Laboratory of the Westinghouse
Electric Corporation had in daily use in 1960 a two-dimensional
program that could treat as a special case, Laplacian-type matrix
equations of order 20,000."

He adds this footnote:

"This program, called PDQ-4, was specifically written for the
Philco-2000 computer with 32,000 words of core storage. Even more
staggering is Bettis' use of a three-dimensional program,
TNT-1, which treats coupled matrix equations of order 108,000. "


Varga's comments show that large sparse problems were being solved
routinely on small computers (128 KB core) over 50 years ago.
Hence, sparse matrix techniques have been around for a long time,
even though it took linear programmers and Matlab-ers until
the 1980s and 90s to discover this.

Derek O'Connor

Viewing all articles
Browse latest Browse all 15

Trending Articles