View Single Post
  #4  
Old 04-18-2013, 05:41 PM
Michael Reach Michael Reach is offline
Senior Member
 
Join Date: Apr 2013
Location: Baltimore, Maryland, USA
Posts: 71
Default Re: A little puzzle

Ah - not the first time today I was tripped up by the rule that we only need to find a single set of xns with the maximum shattering. I keep forgetting and looking for some set of xns which doesn't.

So here's a method that will work for any N, and I don't even need all of your hypotheses; it's enough just to use the set of H's where n=2^k.
H0=+1 for 1,3,5,7,...
H1=+1 for 1,2,5,6,9,10,...
H2=+1 for 1,2,3,4,9,10,11,12,17,18,19,20,...
H3=+1 for 1,2,3,4,5,6,7,8,17,18,19,...

The easy way to see it is to use binary notation.
H0=+1 for any n with the last digit=1
H1=+1 for any n with the second-to-last digit=1
H2=+1 for any n with the third-to-last digit=1 etc.

Now gH(N)=2^N. Here's how we build our set of x1,...,xN that we can shatter.

For N, take the set Z of every combination of N 1s and 0s and use them to build our x1,...,xN. They will be very big numbers indeed, with 2^N digits or so.
The first digit of xi, call it xi1, is the ith digit of the first element of Z. If that is 000000...0 (N 0s), the ith digit will be zero as well, so all of the numbers x1,...,xN will start with 0.
If the second element of Z is 000000..01, might as well keep them in order, the next digit of x1,...,xN will be 0, 0, ..., 0, and 1 respectively. And so forth, for all 2^N digits.

These N binary numbers are shattered by H0 through H(2^N-1), as each of those H(i)s picks out the ith digit of our numbers, and the digits cover every possibility in Z.

Way to go - this is a neat problem.
Reply With Quote