function perm1_inverse3_test ( )

%*****************************************************************************80
%
%% PERM1_INVERSE3_TEST tests PERM1_INVERSE3.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n = 7;
  p = [ 4, 3, 5, 1, 7, 6, 2 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'PERM1_INVERSE3_TEST\n' );
  fprintf ( 1, '  PERM1_INVERSE3 inverts a permutation of (1,...,N).\n' );

  perm1_print ( n, p, '  The original permutation:' );
 
  p_inv = perm1_inverse3 ( n, p );
 
  perm1_print ( n, p_inv, '  The inverted permutation:' );
 
  return
end
