function partial_digest_recur ( n, l )

%*****************************************************************************80
%
%% PARTIAL_DIGEST_RECUR uses recursion on the partial digest problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    28 November 2006
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Pavel Pevzner,
%    Computational Molecular Biology,
%    MIT Press, 2000,
%    ISBN: 0-262-16197-4,
%    LC: QH506.P47.
%
%  Parameters:
%
%    Input, integer N, the number of nodes.
%
%    Input, integer L((N*(N-1))/2), the distances between all pairs
%    of distinct nodes.
%

%
%  How long is L?
%
  l_length = ( n * ( n - 1 ) ) / 2;
%
%  Find WIDTH, the largest element of L, and move it to the last position.
%
  [ l, width ] = i4vec_max_last ( l_length, l );
%
%  Think of L as being 1 entry shorter.
%
  l_length = l_length - 1;
%
%  Using WIDTH, set the first two entries of X.
%
  x = zeros ( n, 1 );
  x(1) = 0;
  x(2) = width;
  x_length = 2;
%
%  Begin recursive operation.
%
  [ l_length, l, x_length, x ] = place ( l_length, l, x_length, x );

  return
end