function perm_inv_test ( )

%*****************************************************************************80
%
%% PERM_INV_TEST tests PERM_INV.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    23 December 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'PERM_INV_TEST\n' );
  fprintf ( 1, '  PERM_INV computes an inverse permutation,\n' );

  p = [ 3, 1, 2, 4 ];
  perm_print ( n, p, '  The permutation P:' );

  q = perm_inv ( n, p );

  perm_print ( n, q, '  The inverse permutation Q:' );

  r = perm_mul ( n, p, q );

  perm_print ( n, r, '  The product R = P * Q:' );

  return
end
