function hw056 ( )

  E1 = [ 1, 1, 2, 2, 2, 2, 3, 5;
         2, 3, 3, 4, 5, 6, 4, 6];

  A1 = edge_to_adjacency ( E1 );
  A1
  spy ( A1 );

  pause


  E2 = [ 1, 2, 1, 3, 2, 3, 2, 4, 2, 5, 2, 6, 3, 4, 5, 6;
         2, 1, 3, 1, 3, 2, 4, 2, 5, 2, 6, 2, 4, 3, 6, 5];
  A2 = edge_to_adjacency ( E2 );
  A2
  spy ( A2 );

  return
end

function A = edge_to_adjacency ( E )

  [ two, edge_num ] = size ( E );

  n = max ( max ( E ) );

  A = zeros ( n, n );

  for edge = 1 : edge_num
    i = E(1,edge);
    j = E(2,edge);
    A(i,j) = 1;
    A(j,i) = 1;
  end

  return
end

