title: A fast way to find an all zero answer
body: <p>For every array of length n+h-1 with values from 0 and 1, I would like to check if there exists another non-zero array of length n with values from -1,0,1 so that all the h inner products are zero.  My naive way to do this is</p>
  
  <pre><code>import numpy as np
  import itertools
  (n,h)= 4,3
  for longtuple in itertools.product([0,1], repeat = n+h-1):
      bad = 0
      for v in itertools.product([-1,0,1], repeat = n):
          if not any(v):
              continue
          if (not np.correlate(v, longtuple, 'valid').any()):
              bad = 1
              break
      if (bad == 0):
          print "Good"
          print longtuple
  </code></pre>
  
  <p>This is very slow if we set <code>n = 19</code> and <code>h = 10</code> which is what I would like to test.</p>
  
  <blockquote>
    <p>My goal is to find a single "Good" array of length <code>n+h-1</code>. Is there a
    way to speed this up so that <code>n = 19</code> and <code>h = 10</code> is feasible?</p>
  </blockquote>
  
  <p>The current naive approach takes 2^(n+h-1)3^(n) iterations, each one of which takes roughly n time. That is 311,992,186,885,373,952 iterations for <code>n = 19</code> and <code>h = 10</code> which is impossible.</p>
  
  <p><strong>Note 1</strong> Changed <code>convolve</code> to <code>correlate</code> so that the code considers <code>v</code> the right way round.</p>
  
  <hr>
  
  <p><strong>July 10 2015</strong></p>
  
  <p>The problem is still open with no solution fast enough for <code>n=19</code> and <code>h=10</code> given yet.</p>