function [selections success coverage] = collect(n, trials, limit)
  if nargin < 3
    limit = inf;
    if nargin < 2
      trials = 1;
    end
  end
  selections = 0;
  coverage = 0;
  success = 0;
  for t = 1:trials
    count = 0;
    marks = 0;
    used(1:n) = false;
    while count < limit && marks < n
      count = count + 1;
      pick = ceil(rand(1)*n);
      if ~used(pick)
          used(pick) = true;
          marks = marks + 1;
      end
    end
    selections = selections + count;
    coverage = coverage + marks;
    if marks == n
      success = success + 1;
    end
  end
  selections = selections / trials;
  success = success / trials;
  coverage = coverage / trials;
