function ev = full_deck_expected ( card_num )

%*****************************************************************************80
%
%% full_deck_expected() returns the expected value of the full deck problem.
%
%  Discussion:
%
%    The expected value, given a deck of N distinct cards, is n*Hn, where
%    Hn is the n-th harmonic number.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 May 2022
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Herbert Wilf,
%    Some New Aspects of the Coupon Collector's Problem,
%    SIAM Review,
%    Volume 48, Number 3, September 2006, pages 549-565.
%
%  Input:
%
%    integer card_num: the number of cards in the deck.
%
%  Output:
%
%    real ev: the expected number of cards that must be collected in order
%    to acquire at least one of every kind.
%
  ev = 0.0;
  for i = 1 : card_num
    ev = ev + card_num / i;
  end

  return
end
