function A = risk_transition_matrix ( )

%*****************************************************************************80
%
%% risk_transition_matrix() returns the RISK transition matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 January 2020
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    real A(42,42), the transition matrix.
%
  A = risk_adjacency_matrix ( );

  [ m, n ] = size ( A );

  for i = 1 : m
    rowsum = sum ( A(i,:) );
    if ( rowsum == 0.0 )
      A(i,:) = 1.0 / n;
    else
      A(i,:) = A(i,:) / rowsum;
    end
  end

  return
end

