MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of MATLAB Mathematics - SERC - Index of

serc.iisc.ernet.in
from serc.iisc.ernet.in More from this publisher
15.11.2014 Views

6 Sparse Matrices of the rows and columns of the adjacency matrix, which can have a significant effect on both the time and storage requirements for sparse matrix computations. Graphing Using Adjacency Matrices The MATLAB gplot function creates a graph based on an adjacency matrix and a related array of coordinates. To try gplot, create the adjacency matrix shown above by entering A = [0 1 0 1; 1 0 1 0; 0 1 0 1; 1 0 1 0]; The columns of gplot’s coordinate array contain the Cartesian coordinates for the corresponding node. For the diamond example, create the array by entering xy = [1 3; 2 1; 3 3; 2 5]; This places the first node at location (1,3), the second at location (2,1), the third at location (3,3), and the fourth at location (2,5). To view the resulting graph, enter gplot(A,xy) The Bucky Ball One interesting construction for graph analysis is the Bucky ball. This is composed of 60 points distributed on the surface of a sphere in such a way that the distance from any point to its nearest neighbors is the same for all the points. Each point has exactly three neighbors. The Bucky ball models four different physical objects: • The geodesic dome popularized by Buckminster Fuller • The C 60 molecule, a form of pure carbon with 60 atoms in a nearly spherical configuration • In geometry, the truncated icosahedron • In sports, the seams in a soccer ball The Bucky ball adjacency matrix is a 60-by-60 symmetric matrix B. B has three nonzero elements in each row and column, for a total of 180 nonzero values. This matrix has important applications related to the physical objects listed earlier. For example, the eigenvalues of B are involved in studying the chemical properties of C 60 . 6-18

Adjacency Matrices and Graphs To obtain the Bucky ball adjacency matrix, enter B = bucky; At order 60, and with a density of 5%, this matrix does not require sparse techniques, but it does provide an interesting example. You can also obtain the coordinates of the Bucky ball graph using [B,v] = bucky; This statement generates v, a list of xyz-coordinates of the 60 points in 3-space equidistributed on the unit sphere. The function gplot uses these points to plot the Bucky ball graph. gplot(B,v) axis equal 0.8 0.6 0.4 0.2 0 −0.2 −0.4 −0.6 −0.8 −1 −0.5 0 0.5 1 It is not obvious how to number the nodes in the Bucky ball so that the resulting adjacency matrix reflects the spherical and combinatorial symmetries of the graph. The numbering used by bucky.m is based on the pentagons inherent in the ball’s structure. 6-19

6 Sparse Matrices<br />

<strong>of</strong> the rows and columns <strong>of</strong> the adjacency matrix, which can have a significant<br />

effect on both the time and storage requirements for sparse matrix<br />

computations.<br />

Graphing Using Adjacency Matrices<br />

The <strong>MATLAB</strong> gplot function creates a graph based on an adjacency matrix<br />

and a related array <strong>of</strong> coordinates. To try gplot, create the adjacency matrix<br />

shown above by entering<br />

A = [0 1 0 1; 1 0 1 0; 0 1 0 1; 1 0 1 0];<br />

The columns <strong>of</strong> gplot’s coordinate array contain the Cartesian coordinates for<br />

the corresponding node. For the diamond example, create the array by entering<br />

xy = [1 3; 2 1; 3 3; 2 5];<br />

This places the first node at location (1,3), the second at location (2,1), the<br />

third at location (3,3), and the fourth at location (2,5). To view the resulting<br />

graph, enter<br />

gplot(A,xy)<br />

The Bucky Ball<br />

One interesting construction for graph analysis is the Bucky ball. This is<br />

composed <strong>of</strong> 60 points distributed on the surface <strong>of</strong> a sphere in such a way that<br />

the distance from any point to its nearest neighbors is the same for all the<br />

points. Each point has exactly three neighbors. The Bucky ball models four<br />

different physical objects:<br />

• The geodesic dome popularized by Buckminster Fuller<br />

• The C 60 molecule, a form <strong>of</strong> pure carbon with 60 atoms in a nearly spherical<br />

configuration<br />

• In geometry, the truncated icosahedron<br />

• In sports, the seams in a soccer ball<br />

The Bucky ball adjacency matrix is a 60-by-60 symmetric matrix B. B has three<br />

nonzero elements in each row and column, for a total <strong>of</strong> 180 nonzero values.<br />

This matrix has important applications related to the physical objects listed<br />

earlier. For example, the eigenvalues <strong>of</strong> B are involved in studying the chemical<br />

properties <strong>of</strong> C 60 .<br />

6-18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!