function perm1_inverse_test ( )

%*****************************************************************************80
%
%% perm1_inverse_test() tests perm1_inverse();
%
%  Licensing:
%
%    This code is distributed under the MIT 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
