function perm1_inverse_test ( )

%*****************************************************************************80
%
%% PERM1_INVERSE_TEST tests PERM1_INVERSE;
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 June 2015
%
%  Author:
%
%    John Burkardt
%
  n = 7;
  p1 = [ 4, 3, 5, 1, 7, 6, 2 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'PERM1_INVERSE_TEST\n' );
  fprintf ( 1, '  PERM1_INVERSE inverts a permutation of (1,...,N);\n' );
  fprintf ( 1, '\n' );

  perm1_print ( n, p1, '  The original permutation:' );
 
  p2 = perm1_inverse ( n, p1 );
 
  perm1_print ( n, p2, '  The inverted permutation:' );
 
  return
end
