function toms515_test05 ( )

%*****************************************************************************80
%
%% toms515_test05() tests comb() by generating 10 random 10-subsets of a 100 set.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 March 2016
%
%  Author:
%
%    John Burkardt
%
  n = 100;
  k = 10;
  lmax = binom ( n, k );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'toms515_test05():\n' );
  fprintf ( 1, '  comb() generates 10 random K-subsets of an N set.\n' );
  fprintf ( 1, '  K = %d\n', k );
  fprintf ( 1, '  N = %d\n', n );
  fprintf ( 1, '  LMAX = %d\n', lmax );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Note that this function is already\n' );
  fprintf ( 1, '  failing because LMAX is negative.\n' );
  fprintf ( 1, '  The combinatorial coefficient C(100,10)\n' );
  fprintf ( 1, '  is too large to store in an integer.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Although the program continues to give\n' );
  fprintf ( 1, '  results, they cannot be relied on!\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10
    l = randi ( [ 1, lmax ], 1 );
    c = comb ( n, k, l );
    fprintf ( 1, '  %6d:  ', l );
    for j = 1 : k
      fprintf ( 1, '  %6d', c(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end

