function [ x, know ] = p05_sol ( m, know )

%*****************************************************************************80
%
%% p05_sol returns known solutions for problem 5.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 February 2012
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Harald Niederreiter, Kevin McCurley,
%    Optimization of functions by quasi-random search methods,
%    Computing,
%    Volume 22, Number 2, 1979, pages 119-123.
%
%  Input:
%
%    integer M, the order of the problem.
%
%    integer KNOW, 0, or the index of the previously returned solution.
%
%  Output:
%
%    real X(M), the solution.
%
%    integer KNOW, 0 if there are no more solutions, or it is the
%    index of the next solution.
%
  if ( know == 0 )
    know = 1;
    x(1:m,1) = [ ...
       3.0 / 11.0, ...
       6.0 / 13.0, ...
      12.0 / 23.0, ...
       8.0 / 37.0 ]';
  else
    know = 0;
    x = zeros ( m, 1 );
  end

  return
end
