# arduino_rfid_controller / ThreeWireMatrix / rl.txt

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48``` ```The goal is to find the set of (a:h) values that results in the largest deviation between all values in the set (k01:k12). This problem is a bit simplified, as the real set of possible values for (a:h) is closer to 1200 values. For this case, the (a:h) can be any of the following values (duplicates allowed): (1,1.1,1.2,1.3,1.5,1.6,1.8,2.0,2.2,2.4,2.7,3.0,3.3,3.6,3.9,4.3,4.7,5.1,5.6,6.2,6.8,7.5,8.2,9.1) k[] = (a+b)/(a+b+d+e+f+g+h) k[] = (a+b+c)/(a+b+c+h) k[] = (a+b+c)/(a+b+c+g+h) k[] = (a+b+c)/(a+b+c+e+f+g+h) k[] = (a+c)/(a+c+d+e+f+g+h) k[] = (a)/(a+h) k[] = (a)/(a+g+h) k[] = (a)/(a+e+f+g+h) k[] = (a+b)/(a+b+f+g+h) k[] = (a+b+c)/(a+b+c+d+e+h) k[] = (a+b+c)/(a+b+c+d+e+g+h) k[] = (a+b+c)/(a+b+c+d+f+g+h) mean = http://pastebin.com/pZE2gtqH The goal is to find the set of (a:h) values that results in the largest minimum difference between all values in the set (k01:k12). This problem is a bit simplified, as the real set of possible values for (a:h) is closer to 1200 values. For this case, the (a:h) can be any of the following values (duplicates allowed): (1,1.1,1.2,1.3,1.5,1.6,1.8,2.0,2.2,2.4,2.7,3.0,3.3,3.6,3.9,4.3,4.7,5.1,5.6,6.2,6.8,7.5,8.2,9.1) The calculations for (k01:k12) are: k01 = (a+b)/(a+b+d+e+f+g+h) k02 = (a+b+c)/(a+b+c+h) k03 = (a+b+c)/(a+b+c+g+h) k04 = (a+b+c)/(a+b+c+e+f+g+h) k05 = (a+c)/(a+c+d+e+f+g+h) k06 = (a)/(a+h) k07 = (a)/(a+g+h) k08 = (a)/(a+e+f+g+h) k09 = (a+b)/(a+b+f+g+h) k10 = (a+b+c)/(a+b+c+d+e+h) k11 = (a+b+c)/(a+b+c+d+e+g+h) k12 = (a+b+c)/(a+b+c+d+f+g+h) Other than brute force, how can I optimize this problem? Right now, I'm generating all permutations, and for each permutation solving for each kN,then finding the minimum difference in the resulting (k:kN) set. 46 [1000, 1200, 10000, 1500, 4700, 8200, 1800, 2200] ```