title: Algorithm generation
body: <p>I have a rather large(not too large but possibly 50+) set of conditions that must be placed on a set of data(or rather the data should be manipulated to fit the conditions).</p>
  
  <p>For example, Suppose I have the a sequence of binary numbers of length n,</p>
  
  <p>if n = 5 then a element in the data might be {0,1,1,0,0} or {0,0,0,1,1}, etc...</p>
  
  <p>BUT there might be a set of conditions such as</p>
  
  <ol>
  <li>x_3 + x_4 = 2</li>
  <li>sum(x_even) &lt;= 2</li>
  <li>x_2*x_3 = x_4 mod 2</li>
  </ol>
  
  <p>etc...</p>
  
  <p>Because the conditions are quite complex in that they come from experiment(although they can be written down in logic form) and are hard to diagnose I would like instead to use a large sample set of valid data. i.e., Data I know satisfies the conditions and is a pretty large set. i.e., it is easier to collect the data then it is to deduce the conditions that the data must abide by.</p>
  
  <p>Having said that, basically what I'm doing is very similar to neural networks. The difference is, I would like an actual algorithm, in some sense optimal, in some form of code that I can run instead of the network.</p>
  
  <p>It might not be clear what I'm actually trying to do. What I have is a set of data in some raw format that is unique and unambiguous but not appropriate for my needs(in a sense the amount of data is too large).</p>
  
  <p>I need to map the data into another set that actually is ambiguous to some degree but also has certain specific set of constraints that all the data follows(certain things just cannot happen while others are preferred).</p>
  
  <p>The unique constraints and preferences are hard to figure out. That is, the mapping from the non-ambiguous set to the ambiguous set is hard to describe(which is why it is ambiguous). The goal, actually, is to have an unambiguous map by supplying the right constraints if at all possible.</p>
  
  <p>So, on the vein of my initial example, I'm given(or supply) a set of elements and need some way to derive a list of constraints similar to what I've listed.</p>
  
  <p>In a sense, I simply have a set of valid data and train it very similar to neural networks.</p>
  
  <p>Then, after this "Training" I'm given the mapping function I can then use on any element in my dataset and it will produce a new element satisfying the constraint's, or if it can't, will give as close as possible an unambiguous result.</p>
  
  <p>The main difference between neural networks and what I'm trying to achieve is I'd like to be able to use have an algorithm to code to be used instead of having to run a neural network. The difference here is the algorithm would probably be a lot less complex, not need potential retraining, and a lot faster.</p>
  
  <p>Here is a simple example.</p>
  
  <p>Suppose my "training set" are the binary sequences and mappings</p>
  
  <p>01000 => 10000
  00001 => 00010
  01010 => 10100
  00111 => 01110</p>
  
  <p>then from the "Magical Algorithm Finder"(tm) I would get a mapping out like</p>
  
  <p>f(x) = x rol 1  (rol = rotate left)</p>
  
  <p>or whatever way one would want to express it.</p>
  
  <p>Then I could simply apply f(x) to any other element, such as x = 011100 and could apply f to generate a hopefully unambiguous output.</p>
  
  <p>Of course there are many such functions that will work on this example but the goal is to supply enough of the dataset to narrow it down to hopefully a few functions that make the most sense(at the very least will always map the training set correctly).</p>
  
  <p>In my specific case I could easily convert my problem into mapping the set of binary digits of length m to the set of base B digits of length n. The constraints prevents some numbers from having an inverse. e.g., the mapping is injective but not surjective. </p>
  
  <p>My algorithm could be a simple collection if statements acting on the digits if need be.</p>