# Aligned Induction

## Properties of the sample

MNIST - handwritten digits/Properties of the sample

All pixels

Averaged pixels

### All pixels

The training sample has a size of 60,000. We shall take every eighth event from the sample to make a more convenient size of 7,500. First load the training sample $A$ (see History and HistoryRepa),

:l NISTDev

(uu,hrtr) <- nistTrainIO

let digit = VarStr "digit"
let vv = uvars uu
let vvl = sgl digit
let vvk = vv minus vvl

card $hrvars hrtr 785 hrsize hrtr 60000  Now take a subset, let hr = hrev [i | i <- [0 .. hrsize hrtr - 1], i mod 8 == 0] hrtr hrsize hr 7500  The system is$U$. The sample substrate variables are$V = \mathrm{vars}(A)$, the label variables are$V_{\mathrm{l}} = \{\mathrm{digit}\}$, and the query variables form the remainder,$V_{\mathrm{k}} = V \setminus V_{\mathrm{l}}$. The query variable valency is 256,$\{|U_w| : w \in V_{\mathrm{k}}\} = \{256\}$, rp$ llqq [u | w <- qqll vvk, let u = vol uu (sgl w)]
"{256}"


The label variable valency is $|U_{\mathrm{digit}}| = 10$,

vol uu vvl
10

rpln $aall$ araa uu $hr hrred vvl "({(digit,0)},743 % 1)" "({(digit,1)},822 % 1)" "({(digit,2)},738 % 1)" "({(digit,3)},745 % 1)" "({(digit,4)},746 % 1)" "({(digit,5)},720 % 1)" "({(digit,6)},707 % 1)" "({(digit,7)},767 % 1)" "({(digit,8)},754 % 1)" "({(digit,9)},758 % 1)"  We can image any event by creating a bitmap. There are several utility functions in NISTDev for creating and manipulating bitmaps from a HistoryRepa. For example, this generates bitmaps of the first 25 events placed in a row: let file = "NIST.bmp" bmwrite file$ bmhstack $map (bmborder 1 . hrbm 28 1 256)$ [hrev [i] hr' | let hr' = hr hrhrred vvk, i <- [0..24]]



The entire history can be averaged together, $\hat{A}\%V_{\mathrm{k}}$,

bmwrite file $bmborder 1$ hrbm 28 3 256 $hr hrhrred vvk  The pixel variables can be bucketed to reduce the valency from 256 to 2, by partitioning at 128, (uu,hrtr) <- nistTrainBucketedIO 2 let digit = VarStr "digit" let vv = uvars uu let vvl = sgl digit let vvk = vv minus vvl hrsize hrtr 60000 let hr = hrev [i | i <- [0 .. hrsize hrtr - 1], i mod 8 == 0] hrtr hrsize hr 7500  The query variable valency is 2,$\{|U_w| : w \in V_{\mathrm{k}}\} = \{2\}$, rp$ llqq [u | w <- qqll vvk, let u = vol uu (sgl w)]
"{2}"


The first 25 events placed in a row now look slightly coarser,

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 1 2) $[hrev [i] hr' | let hr' = hr hrhrred vvk, i <- [0..24]]  Again, the entire history can be averaged together,$\hat{A}\%V_{\mathrm{k}}$, let hrbmav = hrbm 28 3 2$ hr hrhrred vvk

bmwrite file $bmborder 1$ hrbmav



We can show the average image for each digit, $\{\hat{B}\%V_{\mathrm{k}} : S \in V_{\mathrm{l}}^{\mathrm{CS}},~B = A * \{S\}^{\mathrm{U}}\}$,

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 2 2) [hr hrhrsel hrs hrhrred vvk | ss <- qqll (cart uu vvl), let hrs = aahr uu (single ss 1)]  Now consider how highly aligned variables might be grouped together. See Entropy and alignment. We will use the tupler to group together highly aligned variables in the substrate,V$. Create a shuffled sample,$A_{\mathrm{r}}$, let hrr = historyRepasShuffle_u hr 1 hrsize hrr 7500 bmwrite file$ bmborder 1 $hrbm 28 3 2$ hrr hrhrred vvk



The average shuffle looks exactly the same as the average sample, but individual events are, in fact, randomised,

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 1 2) [hrev [i] hr' | let hr' = hrr hrhrred vvk, i <- [0..24]]  Now optimise the shuffle content alignment with the tuple set builder,I_{P,U,\mathrm{B,ns,me}}$, $\{(\mathrm{algn}(A\%K)-\mathrm{algn}(A_{\mathrm{r}}\%K),~K) : ((K,\cdot,\cdot),\cdot) \in I_{P,U,\mathrm{B,ns,me}}^{ * }((V,~\emptyset,~A,~A_{\mathrm{r}}))\}$ let buildtup xmax omax bmax uu vv xx xxrr = reverse$ sort $map (\((kk,_),_) -> (algn (araa uu (xx hrred kk)) - algn (araa uu (xxrr hrred kk)), kk))$ parametersSystemsBuilderTupleNoSumlayerMultiEffectiveRepa_u xmax omax bmax 1 uu vv fudEmpty xx (hrhx xx) xxrr (hrhx xxrr)

rpln buildtup (2^2) 10 10 uu vv hr hrr "(2292.2815160591927,{<13,9>,<14,9>})" "(2233.012036338092,{<14,9>,<15,9>})" "(2188.031695004327,{<14,8>,<15,8>})" "(2170.9278646040475,{<12,9>,<13,9>})" "(2137.518853393034,{<23,11>,<23,12>})" "(2134.735654658769,{<23,12>,<23,13>})" "(2132.4501082092684,{<12,10>,<13,10>})" "(2130.122516232521,{<15,9>,<16,9>})" "(2123.706836400408,{<24,12>,<24,13>})" "(2123.460469219186,{<17,20>,<18,20>})" let ll = buildtup (2^12) 10 10 uu vv hr hrr rpln ll "(23436.877679734192,{<10,10>,<10,11>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<14,9>,<14,10>})" "(23274.21784395763,{<10,9>,<10,10>,<10,11>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<14,9>})" "(23232.752272709135,{<10,10>,<10,11>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<13,11>,<14,9>})" "(23232.169432601415,{<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<13,11>,<14,9>,<14,10>,<14,11>})" "(23201.26418245857,{<10,10>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<13,11>,<14,9>,<14,10>})" "(23184.294304054132,{<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<13,11>,<14,9>,<14,10>,<15,9>})" "(23170.794157965698,{<10,11>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<13,11>,<14,9>,<14,10>})" "(23146.79351844896,{<10,10>,<10,11>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<14,9>,<15,9>})" "(23086.94962868454,{<10,10>,<10,11>,<10,12>,<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<14,9>})" "(23080.549929231824,{<11,9>,<11,10>,<11,11>,<12,9>,<12,10>,<12,11>,<13,9>,<13,10>,<14,9>,<14,10>,<15,9>,<15,10>})"  Let us image the most highly aligned tuple, $Q_1~=~\{\mathrm{<10,10>},\dots,~\mathrm{<14,10>}\}$ let qqhr d uu vv qq = aahr uu (single (llss ([(v, ValInt (d-1)) | v <- qqll qq] ++ [(v, ValInt 0) | v <- qqll (vv minus qq)])) 1) let qq1 = snd head ll

bmwrite file $bmborder 1$ hrbm 28 3 2 $qqhr 2 uu vvk qq1  Note that the coordinates <x,y> are defined so that the x coordinate increases from top row 1 to bottom row 28, and the y coordinate runs from left column 1 to right column 28. Showing it overlaid on the average, bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq1  Showing it overlaid on the average for each digit, bmwrite file$ bmhstack $map (\av -> bmborder 1 (bmmax (hrbm 28 2 2 av) 0 0 (hrbm 28 2 2 (qqhr 2 uu vvk qq1))))$ [hr hrhrsel hrs hrhrred vvk | ss <- qqll (cart uu vvl), let hrs = aahr uu (single ss 1)]



We can see that this substrate tuple appears in the top loop where a three would differ from an eight.

Now let’s image the first 20 states ordered by size descending, $\mathrm{top}(20)(A\%Q_1)$,

let pp = take 20 $reverse$ sort $map (\(a,b) -> (b,a))$ aall $araa uu$ hr hrred qq1

map numerator $fst$ unzip pp
[2656,317,175,146,123,114,111,94,92,90,89,85,83,73,72,72,68,65,63,60]

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 1 2) $[hr' hrhrsel hrs | let hr' = hr hrhrred vvk, (_,ss) <- pp, let hrs = aahr uu (single ss 1)]  The first state is the largest slice. In this case all of the pixels of the tuple are background, so it includes all images where this region is blank. The remaining states all have at least one foreground pixel in this region, for which there are images for most digits except one. Now optimise again having removed the top tuple from the substrate, and $\{(\mathrm{algn}(A\%K)-\mathrm{algn}(A_{\mathrm{r}}\%K),~K) : ((K,\cdot,\cdot),\cdot) \in I_{P,U,\mathrm{B,ns,me}}^{ * }((V \setminus Q_1,~\emptyset,~A,~A_{\mathrm{r}}))\}$ let ll = buildtup (2^12) 10 10 uu (vv minus qq1) hr hrr rpln ll "(22975.09671273167,{<21,10>,<21,11>,<21,12>,<21,13>,<22,10>,<22,11>,<22,12>,<22,13>,<23,10>,<23,11>,<23,12>,<23,13>})" "(22955.22994752979,{<21,10>,<21,11>,<22,10>,<22,11>,<22,12>,<23,10>,<23,11>,<23,12>,<23,13>,<24,11>,<24,12>,<24,13>})" "(22918.537058146852,{<21,10>,<21,11>,<22,9>,<22,10>,<22,11>,<22,12>,<23,10>,<23,11>,<23,12>,<23,13>,<24,12>,<24,13>})" "(22845.04074482481,{<22,10>,<22,11>,<22,12>,<23,10>,<23,11>,<23,12>,<23,13>,<23,14>,<24,11>,<24,12>,<24,13>,<24,14>})" "(22838.5273227061,{<21,10>,<21,11>,<22,10>,<22,11>,<22,12>,<22,13>,<23,10>,<23,11>,<23,12>,<23,13>,<24,12>,<24,13>})" "(22812.956894269897,{<21,10>,<21,11>,<21,12>,<22,9>,<22,10>,<22,11>,<22,12>,<22,13>,<23,10>,<23,11>,<23,12>,<23,13>})" "(22805.291225676185,{<22,9>,<22,10>,<22,11>,<22,12>,<22,13>,<23,10>,<23,11>,<23,12>,<23,13>,<24,11>,<24,12>,<24,13>})" "(22802.779936122715,{<21,10>,<21,11>,<21,12>,<22,10>,<22,11>,<22,12>,<23,10>,<23,11>,<23,12>,<23,13>,<24,12>,<24,13>})" "(22786.280375971393,{<21,10>,<22,9>,<22,10>,<22,11>,<22,12>,<23,10>,<23,11>,<23,12>,<23,13>,<24,11>,<24,12>,<24,13>})" "(22773.7718687649,{<22,10>,<22,11>,<22,12>,<22,13>,<23,10>,<23,11>,<23,12>,<23,13>,<24,10>,<24,11>,<24,12>,<24,13>})" let qq2 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq2



This second substrate tuple is nearly as highly aligned as the first. Again it is located where a three would differ from an eight, but now appears in the bottom loop.

Again, let’s image the first 20 states ordered by size descending,

let pp = take 20 $reverse$ sort $map (\(a,b) -> (b,a))$ aall $araa uu$ hr hrred qq2

map numerator $fst$ unzip pp
[2518,230,220,166,142,129,105,105,100,97,93,85,82,79,79,76,75,73,70,68]

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 1 2) $[hr' hrhrsel hrs | let hr' = hr hrhrred vvk, (_,ss) <- pp, let hrs = aahr uu (single ss 1)]  The first state is the largest slice. In this case also, all of the pixels of the tuple are background, so it includes all images where this region is blank. It resembles a non-oblique nine. Continuing on, let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2) hr hrr rpln ll "(23011.1811072602,{<17,20>,<18,19>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>})" "(22879.335116168455,{<17,20>,<17,21>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>})" "(22780.385544374076,{<17,20>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>,<22,19>})" "(22780.36943821011,{<17,19>,<18,19>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>})" "(22745.02629997328,{<17,20>,<18,19>,<18,20>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>,<22,19>})" "(22739.154007140343,{<17,19>,<17,20>,<18,19>,<18,20>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>})" "(22725.709724299384,{<17,20>,<17,21>,<18,19>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<21,19>,<21,20>})" "(22651.541904709375,{<17,20>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<20,21>,<21,19>,<21,20>,<21,21>})" "(22630.679931470084,{<17,19>,<17,20>,<18,19>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<21,19>,<21,20>})" "(22629.81021650106,{<17,20>,<18,19>,<18,20>,<18,21>,<19,19>,<19,20>,<19,21>,<20,19>,<20,20>,<21,19>,<21,20>,<22,19>})" let qq3 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq3



Again, the third substrate tuple is as highly aligned as the first two. It is located where a five would differ from a two in the bottom loop.

Imaging the first 20 states ordered by size descending,

let pp = take 20 $reverse$ sort $map (\(a,b) -> (b,a))$ aall $araa uu$ hr hrred qq3

map numerator $fst$ unzip pp
[2693,249,244,160,136,120,93,93,89,80,79,78,76,75,71,70,69,65,64,59]

bmwrite file $bmhstack$ map (bmborder 1 . hrbm 28 1 2) $[hr' hrhrsel hrs | let hr' = hr hrhrred vvk, (_,ss) <- pp, let hrs = aahr uu (single ss 1)]  let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3) hr hrr rpln ll "(16178.865805790956,{digit,<10,18>,<10,19>,<11,18>,<11,19>,<12,18>,<12,19>,<13,18>,<13,19>})" "(16102.671528899547,{digit,<10,19>,<11,18>,<11,19>,<12,18>,<12,19>,<13,18>,<13,19>,<14,18>})" "(16071.750779434426,{digit,<10,19>,<11,19>,<12,18>,<12,19>,<13,18>,<13,19>,<14,18>,<14,19>})" "(16048.253316818988,{digit,<10,19>,<11,18>,<11,19>,<12,18>,<12,19>,<13,18>,<13,19>,<14,19>})" "(16040.078810291008,{digit,<10,19>,<11,18>,<11,19>,<11,20>,<12,18>,<12,19>,<12,20>,<13,19>})" "(16030.85158783264,{digit,<10,19>,<11,18>,<11,19>,<11,20>,<12,18>,<12,19>,<13,18>,<13,19>})" "(15980.493550725612,{digit,<10,19>,<10,20>,<11,18>,<11,19>,<11,20>,<12,18>,<12,19>,<13,19>})" "(15969.701495503503,{digit,<10,19>,<11,19>,<11,20>,<12,18>,<12,19>,<12,20>,<13,18>,<13,19>})" "(15953.852976397857,{digit,<10,19>,<11,18>,<11,19>,<12,18>,<12,19>,<12,20>,<13,18>,<13,19>})" "(15924.575899591051,{digit,<10,19>,<10,20>,<11,19>,<11,20>,<12,18>,<12,19>,<13,18>,<13,19>})"  Now, in the fourth tuple we see that digit has appeared. let qq4 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk (qq4 minus vvl)



This fourth substrate tuple is not as highly aligned as the first three. It is located within the top loop at the bottom.

Imaging the first 20 states ordered by size descending,

let pp = take 20 $reverse$ sort $map (\(a,b) -> (b,a))$ aall $araa uu$ hr hrred qq4

let sat ss v = fromJust $statesVarsValue ss v rp [(numerator a, ss sat digit) | (a,ss) <- pp] "[(666,1),(399,5),(382,6),(328,0),(205,3),(199,7),(165,9),(154,4),(138,2),(123,2),(116,4),(81,6),(78,8),(74,0),(66,9),(62,4),(59,3),(52,9),(52,8),(52,6)]" bmwrite file$ bmhstack $map (bmborder 1 . hrbm 28 1 2)$ [hr hrhrsel hrs hrhrred vvk | (_,ss) <- pp, let hrs = aahr uu (single ss 1)]



In this case, the images are each associcated with a digit value.

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4) hr hrr

rpln ll
"(22275.212143169832,{<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,13>,<14,14>,<14,15>,<14,16>,<15,13>,<15,14>,<15,15>})"
"(22166.753255547927,{<12,15>,<12,16>,<13,13>,<13,14>,<13,15>,<13,16>,<14,13>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>})"
"(22078.817340598478,{<12,14>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>,<15,16>})"
"(22077.265195860236,{<12,14>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,13>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>})"
"(22042.66798735359,{<12,15>,<13,13>,<13,14>,<13,15>,<13,16>,<14,13>,<14,14>,<14,15>,<14,16>,<15,13>,<15,14>,<15,15>})"
"(22036.275524003177,{<13,13>,<13,14>,<13,15>,<13,16>,<14,13>,<14,14>,<14,15>,<14,16>,<15,13>,<15,14>,<15,15>,<15,16>})"
"(22029.966792075178,{<11,16>,<12,14>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>})"
"(22028.413553626342,{<11,15>,<11,16>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>})"
"(22026.690602542018,{<11,16>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,14>,<14,15>,<14,16>,<15,14>,<15,15>,<15,16>})"
"(22008.279075414976,{<12,14>,<12,15>,<12,16>,<13,14>,<13,15>,<13,16>,<14,14>,<14,15>,<14,16>,<15,13>,<15,14>,<15,15>})"

let qq5 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 qqhr 2 uu vvk qq5  The fifth substrate tuple, qq5, has slightly lower alignment than the first three, but higher than the fourth, qq4. let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5) hr hrr rpln ll "(20878.329981278253,{<10,20>,<11,20>,<11,21>,<12,20>,<12,21>,<13,20>,<13,21>,<14,19>,<14,20>,<15,19>,<15,20>,<16,20>})" "(20855.713802772072,{<10,20>,<11,20>,<12,20>,<12,21>,<13,20>,<13,21>,<14,19>,<14,20>,<14,21>,<15,19>,<15,20>,<16,20>})" "(20750.789352785985,{<10,20>,<11,20>,<12,20>,<13,20>,<13,21>,<14,19>,<14,20>,<14,21>,<15,19>,<15,20>,<15,21>,<16,20>})" "(20663.751070455546,{<10,20>,<11,20>,<12,20>,<12,21>,<13,20>,<13,21>,<14,19>,<14,20>,<15,19>,<15,20>,<16,19>,<16,20>})" "(20631.894394328505,{<10,20>,<11,20>,<11,21>,<12,20>,<12,21>,<13,20>,<14,19>,<14,20>,<15,19>,<15,20>,<16,19>,<16,20>})" "(20626.36311045546,{<10,20>,<10,21>,<11,20>,<11,21>,<12,20>,<12,21>,<13,20>,<14,19>,<14,20>,<15,19>,<15,20>,<16,20>})" "(20607.96562172127,{<10,20>,<11,20>,<12,20>,<13,20>,<13,21>,<14,19>,<14,20>,<14,21>,<15,19>,<15,20>,<16,19>,<16,20>})" "(20589.080650660817,{<10,20>,<11,20>,<11,21>,<12,20>,<12,21>,<13,20>,<14,19>,<14,20>,<14,21>,<15,19>,<15,20>,<16,20>})" "(20546.598600924262,{<10,20>,<11,20>,<12,20>,<13,20>,<14,19>,<14,20>,<14,21>,<15,19>,<15,20>,<15,21>,<16,19>,<16,20>})" "(20535.30581799583,{<10,20>,<11,20>,<12,20>,<12,21>,<13,20>,<13,21>,<14,19>,<14,20>,<15,19>,<15,20>,<15,21>,<16,20>})" let qq6 = snd head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq6



let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6) hr hrr

rpln ll
"(21783.431050990985,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>,<18,9>})"
"(21652.508020148773,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>,<18,8>})"
"(21620.743967537495,{<13,8>,<14,8>,<15,7>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>})"
"(21579.283500079197,{<13,8>,<14,8>,<15,8>,<15,9>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>,<18,8>,<18,9>})"
"(21548.238691220504,{<12,8>,<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>})"
"(21518.45426088917,{<13,8>,<14,8>,<15,8>,<15,9>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>,<18,9>,<18,10>})"
"(21516.40862981805,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<16,11>,<17,8>,<17,9>,<17,10>})"
"(21497.093097859324,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<18,8>,<18,9>})"
"(21480.23188336933,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>,<18,10>})"
"(21479.019454862653,{<13,8>,<14,8>,<15,8>,<15,9>,<15,10>,<16,7>,<16,8>,<16,9>,<16,10>,<17,8>,<17,9>,<17,10>})"

let qq7 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq7  The seventh substrate tuple, qq7, resembles the first substrate tuple, qq1. When adding them together we obtain, bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk (qq1 union qq7)  let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7) hr hrr rpln ll "(20845.369537783077,{<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>,<20,17>})" "(20832.764015826226,{<15,17>,<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>})" "(20608.417374454184,{<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>,<20,17>,<20,18>})" "(20557.67921254835,{<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>,<20,18>})" "(20550.2407579201,{<15,18>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>,<20,17>,<20,18>})" "(20545.02772552971,{<14,18>,<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>})" "(20511.45542399987,{<14,18>,<15,17>,<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,18>})" "(20486.703095425386,{<15,18>,<16,17>,<16,18>,<16,19>,<17,16>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>})" "(20475.98333646508,{<15,18>,<16,17>,<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,16>,<18,17>,<18,18>,<19,17>,<19,18>})" "(20460.397208891693,{<16,18>,<16,19>,<17,17>,<17,18>,<17,19>,<18,17>,<18,18>,<19,17>,<19,18>,<20,17>,<20,18>,<21,17>})" let qq8 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq8



Continuing on,

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8) hr hrr

rpln ll
"(22341.597123332398,{<18,14>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>,<21,16>})"
"(22155.40724854413,{<18,14>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,13>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(22083.02080595367,{<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,13>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>,<21,16>})"
"(22082.130029471875,{<18,15>,<18,16>,<19,13>,<19,14>,<19,15>,<19,16>,<20,13>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(22062.742184575553,{<17,15>,<18,14>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(22024.075862773665,{<17,15>,<17,16>,<18,14>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<21,14>,<21,15>})"
"(22023.176379640623,{<17,15>,<17,16>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(22019.780203420556,{<17,16>,<18,14>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(22011.614728583183,{<18,14>,<18,15>,<18,16>,<19,13>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>})"
"(21973.620646332893,{<17,16>,<18,15>,<18,16>,<19,14>,<19,15>,<19,16>,<20,14>,<20,15>,<20,16>,<21,14>,<21,15>,<21,16>})"

let qq9 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq9  let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9) hr hrr rpln ll "(21156.69974273265,{<6,12>,<6,13>,<6,14>,<6,15>,<7,11>,<7,12>,<7,13>,<7,14>,<7,15>,<8,11>,<8,12>,<8,13>})" "(20892.15406651666,{<6,12>,<6,13>,<6,14>,<6,15>,<7,11>,<7,12>,<7,13>,<7,14>,<7,15>,<8,10>,<8,11>,<8,12>})" "(20826.463439115603,{<22,15>,<22,16>,<22,17>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20816.036859972482,{<6,11>,<6,12>,<6,13>,<6,14>,<6,15>,<7,11>,<7,12>,<7,13>,<7,14>,<7,15>,<8,11>,<8,12>})" "(20803.281775035102,{<22,16>,<22,17>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" "(20755.76592698853,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20701.741710050366,{<6,12>,<6,13>,<6,14>,<6,15>,<6,16>,<7,11>,<7,12>,<7,13>,<7,14>,<7,15>,<8,11>,<8,12>})" "(20693.38377428647,{<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" "(20672.2231620883,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<25,14>})" "(20669.38990640306,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<24,11>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" let qq10 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq10



let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10) hr hrr

rpln ll
"(21413.804689507066,{<16,11>,<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<18,11>,<18,12>,<18,13>})"
"(21312.156855999605,{<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<17,15>,<18,11>,<18,12>,<18,13>})"
"(21244.05767484347,{<16,12>,<16,13>,<16,14>,<16,15>,<17,12>,<17,13>,<17,14>,<17,15>,<18,12>,<18,13>,<19,12>,<19,13>})"
"(21218.041717893524,{<16,11>,<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<17,15>,<18,12>,<18,13>})"
"(21207.321040218907,{<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<18,11>,<18,12>,<18,13>,<19,12>})"
"(21099.822038557955,{<16,11>,<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<17,15>,<18,11>,<18,12>})"
"(21072.12769174378,{<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<18,11>,<18,12>,<18,13>,<19,11>})"
"(21009.484731817083,{<16,11>,<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<18,12>,<18,13>,<19,12>})"
"(20969.383179330696,{<16,12>,<16,13>,<16,14>,<16,15>,<17,12>,<17,13>,<17,14>,<18,11>,<18,12>,<18,13>,<19,12>,<19,13>})"
"(20965.63549083451,{<16,12>,<16,13>,<16,14>,<16,15>,<17,11>,<17,12>,<17,13>,<17,14>,<18,12>,<18,13>,<19,12>,<19,13>})"

let qq11 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq11  let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11) hr hrr rpln ll "(20826.463439115603,{<22,15>,<22,16>,<22,17>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20803.281775035102,{<22,16>,<22,17>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" "(20755.76592698853,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20693.38377428647,{<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" "(20672.2231620883,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<25,14>})" "(20669.38990640306,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<24,11>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20622.80386694959,{<22,18>,<23,14>,<23,15>,<23,16>,<23,17>,<23,18>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" "(20600.248759519392,{<22,14>,<22,15>,<22,16>,<23,14>,<23,15>,<23,16>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<25,15>})" "(20599.691512665893,{<22,14>,<22,15>,<22,16>,<22,17>,<23,14>,<23,15>,<23,16>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>})" "(20592.98908195017,{<22,14>,<22,15>,<23,14>,<23,15>,<23,16>,<23,17>,<24,12>,<24,13>,<24,14>,<24,15>,<24,16>,<24,17>})" let qq12 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq12



Having removed 12 tuples, there is plenty of alignment in the remaining substrate. The union of the 12 tuples is

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk (qq1 union qq2 union qq3 union qq4 union qq5 union qq6 union qq7 union qq8 union qq9 union qq10 union qq11 union qq12 minus vvl)



We can continue in this way,

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12) hr hrr

let qq13 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq13 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq13) hr hrr let qq14 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq14

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq13 minus qq14) hr hrr

let qq15 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq15 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq13 minus qq14 minus qq15) hr hrr let qq16 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq16

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16) hr hrr

let qq17 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq17 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17) hr hrr rpln ll "(19820.65239757364,{<20,18>,<21,18>,<21,21>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,18>,<24,19>})" "(19539.81867588329,{<20,18>,<21,18>,<21,21>,<21,22>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,18>})" "(19518.87254378562,{<20,18>,<21,17>,<21,18>,<21,21>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,18>})" "(19512.985036130944,{<20,18>,<21,17>,<21,18>,<22,18>,<22,19>,<22,20>,<23,18>,<23,19>,<23,20>,<24,17>,<24,18>,<24,19>})" "(19471.80974950829,{<20,18>,<21,18>,<21,21>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,17>,<24,18>})" "(19465.866754705872,{<20,18>,<21,18>,<21,21>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<23,21>,<24,18>})" "(19444.622703231304,{<20,18>,<21,18>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<23,21>,<24,18>,<24,19>})" "(19440.703144773594,{<20,18>,<21,17>,<21,18>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,18>,<24,19>})" "(19424.908999583487,{<20,18>,<21,18>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,17>,<24,18>,<24,19>})" "(19420.152751294787,{<20,18>,<21,18>,<22,18>,<22,19>,<22,20>,<22,21>,<23,18>,<23,19>,<23,20>,<24,18>,<24,19>,<24,20>})" let qq18 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq18



Now the alignments are beginning to decrease and the clusters of pixels are less round.

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18) hr hrr

let qq19 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq19 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19) hr hrr let qq20 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq20

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20) hr hrr

let qq21 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq21 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21) hr hrr let qq22 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq22



Now the tuples tend to be located around the periphery.

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22) hr hrr

rpln ll
"(14977.746849732315,{<12,17>,<13,17>,<13,23>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<15,23>,<16,16>,<17,15>,<17,16>})"
"(14850.547162153118,{<12,17>,<12,23>,<13,17>,<13,23>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<16,16>,<17,15>,<17,16>})"
"(14724.3481495799,{<12,17>,<13,17>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<15,23>,<15,24>,<16,16>,<17,15>,<17,16>})"
"(14694.637140807843,{<12,17>,<13,17>,<13,22>,<13,23>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<16,16>,<17,15>,<17,16>})"
"(14669.459029120844,{<11,23>,<12,17>,<12,23>,<13,17>,<13,23>,<14,17>,<14,18>,<15,16>,<15,17>,<16,16>,<17,15>,<17,16>})"
"(14625.31652953853,{<12,17>,<13,17>,<14,17>,<14,18>,<14,23>,<14,24>,<15,16>,<15,17>,<15,23>,<16,16>,<17,15>,<17,16>})"
"(14618.409135971351,{<12,17>,<12,23>,<13,17>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<15,23>,<16,16>,<17,15>,<17,16>})"
"(14599.846077212673,{<12,17>,<12,23>,<13,17>,<13,22>,<13,23>,<14,17>,<14,18>,<15,16>,<15,17>,<16,16>,<17,15>,<17,16>})"
"(14591.823506121247,{<12,17>,<13,17>,<13,23>,<14,17>,<14,18>,<14,23>,<14,24>,<15,16>,<15,17>,<16,16>,<17,15>,<17,16>})"
"(14576.681402161907,{<12,17>,<13,17>,<13,22>,<14,17>,<14,18>,<14,23>,<15,16>,<15,17>,<15,23>,<16,16>,<17,15>,<17,16>})"

let qq23 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq23  The union of the first 23 tuples is bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk (qq1 union qq2 union qq3 union qq4 union qq5 union qq6 union qq7 union qq8 union qq9 union qq10 union qq11 union qq12 union qq14 union qq15 union qq16 union qq17 union qq18 union qq19 union qq20 union qq21 union qq22 union qq23 minus vvl)  let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23) hr hrr let qq24 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq24

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24) hr hrr

let qq25 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq25 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24 minus qq25) hr hrr let qq26 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq26

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24 minus qq25 minus qq26) hr hrr

let qq27 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq27 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24 minus qq25 minus qq26 minus qq27) hr hrr let qq28 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq28

let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24 minus qq25 minus qq26 minus qq27 minus qq28) hr hrr

let qq29 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 28 3 2 $qqhr 2 uu vvk qq29 let ll = buildtup (2^12) 10 10 uu (vv minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9 minus qq10 minus qq11 minus qq12 minus qq14 minus qq15 minus qq16 minus qq17 minus qq18 minus qq19 minus qq20 minus qq21 minus qq22 minus qq23 minus qq24 minus qq25 minus qq26 minus qq27 minus qq28 minus qq29) hr hrr rpln ll "(8880.090350884573,{<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,5>,<10,6>,<11,6>})" "(8869.269672126837,{<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,5>,<11,6>})" "(8841.548488548702,{<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,5>,<9,6>,<9,7>,<10,6>,<11,6>})" "(8811.666737187988,{<5,10>,<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>})" "(8792.207908629527,{<6,7>,<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>})" "(8771.51758510567,{<6,8>,<6,9>,<7,6>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>})" "(8740.400156745367,{<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,5>,<10,6>,<11,5>,<11,6>})" "(8733.872056226115,{<5,9>,<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>})" "(8717.620830479595,{<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>,<12,5>})" "(8704.861816530327,{<6,8>,<6,9>,<7,7>,<7,8>,<8,6>,<8,7>,<8,8>,<9,6>,<9,7>,<10,6>,<11,6>,<23,21>})" let qq30 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk qq30



Now, after 30 tuples, the alignments are much decreased and the union is

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 28 3 2$ qqhr 2 uu vvk (qq1 union qq2 union qq3 union qq4 union qq5 union qq6 union qq7 union qq8 union qq9 union qq10 union qq11 union qq12 union qq14 union qq15 union qq16 union qq17 union qq18 union qq19 union qq20 union qq21 union qq22 union qq23 union qq24 union qq25 union qq26 union qq27 union qq28 union qq29 union qq30 minus vvl)



### Averaged pixels

The pixel variables can be averaged as well as bucketed to reduce the dimension from 28x28 to 9x9. Here 3x3 square regions are bucketed to have 8 values,

(uu,hrtr) <- nistTrainBucketedAveragedIO 8 9 0

let digit = VarStr "digit"
let vv = uvars uu
let vvl = sgl digit
let vvk = vv minus vvl

let hr = hrev [i | i <- [0 .. hrsize hrtr - 1], i mod 8 == 0] hrtr

hrsize hr
7500


The query variable valency is 8, $\{|U_w| : w \in V_{\mathrm{k}}\} = \{8\}$,

rp $llqq [u | w <- qqll vvk, let u = vol uu (sgl w)] "{8}"  The first 25 events placed in a row now look blurrier, bmwrite file$ bmhstack $map (bmborder 1 . hrbm 9 3 8)$ [hrev [i] hr' | let hr' = hr hrhrred vvk, i <- [0..24]]



Again, the entire history can be averaged together, $\hat{A}\%V_{\mathrm{k}}$,

let hrbmav = hrbm 9 (3*3) 8 $hr hrhrred vvk bmwrite file$ bmborder 1 $hrbmav  We can show the average image for each digit,$\{\hat{B}\%V_{\mathrm{k}} : S \in V_{\mathrm{l}}^{\mathrm{CS}},~B = A * \{S\}^{\mathrm{U}}\}$, bmwrite file$ bmhstack $map (bmborder 1 . hrbm 9 (2*3) 8)$ [hr hrhrsel hrs hrhrred vvk | ss <- qqll (cart uu vvl), let hrs = aahr uu (single ss 1)]



Again, consider how highly aligned variables might be grouped together. Create a shuffled sample, $A_{\mathrm{r}}$,

let hrr = historyRepasShuffle_u hr 1

hrsize hrr
7500


Now optimise the shuffle content alignment with the tuple set builder, $I_{P,U,\mathrm{B,ns,me}}$, $\{(\mathrm{algn}(A\%K)-\mathrm{algn}(A_{\mathrm{r}}\%K),~K) : ((K,\cdot,\cdot),\cdot) \in I_{P,U,\mathrm{B,ns,me}}^{ * }((V,~\emptyset,~A,~A_{\mathrm{r}}))\}$

let buildtup xmax omax bmax uu vv xx xxrr = reverse $sort$ map (\((kk,_),_) -> (algn (araa uu (xx hrred kk)) - algn (araa uu (xxrr hrred kk)), kk)) $parametersSystemsBuilderTupleNoSumlayerMultiEffectiveRepa_u xmax omax bmax 1 uu vv fudEmpty xx (hrhx xx) xxrr (hrhx xxrr) rpln$ buildtup (8^2) 10 10 uu vvk hr hrr
"(1776.1172125281591,{<5,3>,<6,3>})"
"(1545.8573948188132,{<5,8>,<6,8>})"
"(1507.5649470190838,{<4,3>,<5,3>})"
"(1452.0630556805627,{<6,7>,<7,7>})"
"(1421.1282539067906,{<8,3>,<8,4>})"
"(1247.7813479567485,{<7,7>,<8,7>})"
"(1200.1703380912804,{<6,8>,<7,8>})"
"(1188.7902099063358,{<5,7>,<6,7>})"
"(1175.2736813378651,{<4,8>,<5,8>})"
"(1171.2449428311447,{<8,4>,<8,5>})"

let ll = buildtup (8^4) 10 10 uu vvk hr hrr

rpln ll
"(5705.540324840418,{<5,3>,<5,8>,<6,3>,<6,8>})"
"(5583.217843046474,{<4,3>,<5,3>,<5,8>,<6,3>})"
"(5341.973726252629,{<5,3>,<5,8>,<6,3>,<7,3>})"
"(5294.712842043013,{<4,3>,<5,3>,<6,3>,<6,8>})"
"(5280.452073191616,{<4,8>,<5,3>,<5,8>,<6,3>})"
"(5157.719449275057,{<4,3>,<5,3>,<6,3>,<7,3>})"
"(5130.214215739274,{<5,3>,<6,3>,<6,8>,<7,3>})"
"(5094.733149115389,{<5,8>,<6,3>,<6,8>,<7,3>})"
"(5029.909759006136,{<4,3>,<5,3>,<5,7>,<6,3>})"
"(5004.033909756206,{<4,3>,<4,4>,<5,3>,<6,3>})"

let ll = buildtup (8^5) 10 10 uu vvk hr hrr

rpln ll
"(8104.741491017787,{<4,3>,<5,3>,<5,8>,<6,3>,<6,8>})"
"(8009.148902931618,{<5,3>,<5,8>,<6,3>,<6,8>,<7,3>})"
"(7789.983742761848,{<4,8>,<5,3>,<5,8>,<6,3>,<6,8>})"
"(7788.850798522242,{<5,3>,<5,8>,<6,3>,<6,8>,<7,8>})"
"(7703.103655342755,{<4,3>,<4,8>,<5,3>,<5,8>,<6,3>})"
"(7584.881419085439,{<4,8>,<5,3>,<5,8>,<6,3>,<7,3>})"
"(7541.137140903713,{<5,3>,<5,7>,<5,8>,<6,3>,<6,8>})"
"(7470.02043815628,{<4,3>,<5,3>,<5,8>,<6,3>,<7,3>})"
"(7443.429731564436,{<5,8>,<6,3>,<6,8>,<7,3>,<7,8>})"
"(7435.267678433767,{<5,3>,<5,8>,<6,3>,<6,7>,<6,8>})"


Let us image the most highly aligned tuple,

let qq1 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq1  The first tuple is split into two clusters on the left and right of the averaged image. Now let’s image the first 20 states ordered by size descending,$\mathrm{top}(20)(A\%Q_1)$, let pp = take 20$ reverse $sort$ map (\(a,b) -> (b,a)) $aall$ araa uu $hr hrred qq1 map numerator$ fst $unzip pp [3165,177,154,125,108,95,94,87,72,69,49,44,42,41,40,35,33,31,27,27] bmwrite file$ bmhstack $map (bmborder 1 . hrbm 9 3 8)$ [hr' hrhrsel hrs | let hr' = hr hrhrred vvk, (_,ss) <- pp, let hrs = aahr uu (single ss 1)]



Now optimise again having removed the top tuple from the substrate,

let ll = buildtup (8^5) 10 10 uu (vvk minus qq1) hr hrr

rpln ll
"(6572.6547679746145,{<2,6>,<7,3>,<7,4>,<8,3>,<8,4>})"
"(6488.3042785712005,{<3,3>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6395.7932020613425,{<5,7>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6354.816586886205,{<3,7>,<7,3>,<7,4>,<8,3>,<8,4>})"
"(6328.2316907764,{<2,4>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6313.35657709419,{<3,3>,<3,4>,<7,7>,<7,8>,<8,7>})"
"(6238.528984816963,{<3,4>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6205.672198558159,{<6,7>,<7,3>,<7,7>,<7,8>,<8,7>})"
"(6172.896596761955,{<6,7>,<7,7>,<7,8>,<8,7>,<8,8>})"
"(6104.923863975762,{<2,6>,<3,7>,<7,3>,<8,3>,<8,4>})"

let qq2 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq2  Again, let’s image the first 20 states ordered by size descending, let pp = take 20$ reverse $sort$ map (\(a,b) -> (b,a)) $aall$ araa uu $hr hrred qq2 map numerator$ fst $unzip pp [2034,242,131,127,115,82,82,75,71,55,55,45,41,34,29,23,22,22,20,19] bmwrite file$ bmhstack $map (bmborder 1 . hrbm 9 3 8)$ [hr' hrhrsel hrs | let hr' = hr hrhrred vvk, (_,ss) <- pp, let hrs = aahr uu (single ss 1)]



Continuing on,

let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2) hr hrr

rpln ll
"(6488.3042785712005,{<3,3>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6395.7932020613425,{<5,7>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6328.2316907764,{<2,4>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6313.35657709419,{<3,3>,<3,4>,<7,7>,<7,8>,<8,7>})"
"(6238.528984816963,{<3,4>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6172.896596761955,{<6,7>,<7,7>,<7,8>,<8,7>,<8,8>})"
"(6060.136427505366,{<2,5>,<6,7>,<7,7>,<7,8>,<8,7>})"
"(6018.961715466963,{<3,3>,<3,4>,<6,7>,<7,7>,<8,7>})"
"(5943.431729848828,{<2,4>,<3,3>,<7,7>,<7,8>,<8,7>})"
"(5905.2733534884355,{<2,4>,<3,4>,<7,7>,<7,8>,<8,7>})"

let qq3 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq3  We can continue in this way, let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3) hr hrr rpln ll let qq4 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 9 (3*3) 8$ qqhr 8 uu vvk qq4

let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4) hr hrr

rpln ll

let qq5 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq5 let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4 minus qq5) hr hrr rpln ll let qq6 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 9 (3*3) 8$ qqhr 8 uu vvk qq6

let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6) hr hrr

rpln ll

let qq7 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq7 let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7) hr hrr rpln ll "(2143.66264664146,{<3,6>,<4,6>,<5,6>,<6,6>,<9,4>})" "(2118.4376825965483,{<3,6>,<4,6>,<5,6>,<6,6>,<9,3>})" "(2104.8979422774164,{<3,6>,<4,6>,<5,6>,<6,6>,<9,8>})" "(2103.539781824804,{<3,2>,<3,6>,<4,6>,<5,6>,<6,6>})" "(2103.194294433093,{<3,6>,<4,6>,<5,6>,<6,6>,<9,7>})" "(2100.8651522076125,{<3,6>,<4,1>,<4,6>,<5,6>,<6,6>})" "(2099.9437463645263,{<3,6>,<4,6>,<5,6>,<6,6>,<9,9>})" "(2099.89495619852,{<3,6>,<4,6>,<5,6>,<6,6>,<7,1>})" "(2099.5562997076604,{<3,6>,<4,6>,<5,6>,<6,6>,<9,2>})" "(2097.84368553738,{<3,6>,<4,6>,<5,1>,<5,6>,<6,6>})" let qq8 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 9 (3*3) 8$ qqhr 8 uu vvk qq8



Now the alignment has decreased significantly.

let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8) hr hrr

rpln ll

let qq9 = snd $head ll bmwrite file$ bmborder 1 $bmmax hrbmav 0 0$ hrbm 9 (3*3) 8 $qqhr 8 uu vvk qq9 let ll = buildtup (8^5) 10 10 uu (vvk minus qq1 minus qq2 minus qq3 minus qq4 minus qq5 minus qq6 minus qq7 minus qq8 minus qq9) hr hrr rpln ll "(836.6038538031753,{<2,7>,<2,8>,<4,5>,<7,5>,<8,2>})" "(778.1487164161663,{<2,7>,<2,8>,<7,5>,<8,2>,<9,3>})" "(757.7250531224563,{<2,7>,<2,8>,<2,9>,<7,5>,<8,2>})" "(750.3849735902622,{<7,5>,<7,9>,<8,8>,<9,7>,<9,8>})" "(746.8050492020193,{<1,7>,<2,7>,<2,8>,<7,5>,<8,2>})" "(746.3037210041439,{<2,7>,<2,8>,<7,5>,<8,2>,<9,2>})" "(741.0944619696747,{<2,7>,<2,8>,<4,5>,<8,2>,<9,3>})" "(737.8425886507466,{<1,6>,<2,7>,<2,8>,<7,5>,<8,2>})" "(734.0971770242686,{<1,7>,<2,7>,<2,8>,<4,5>,<7,5>})" "(729.5423314803847,{<2,7>,<2,8>,<2,9>,<4,5>,<7,5>})" let qq10 = snd$ head ll

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 9 (3*3) 8$ qqhr 8 uu vvk qq10



Now, after 10 tuples, the alignments are much decreased and the union is

bmwrite file $bmborder 1$ bmmax hrbmav 0 0 $hrbm 9 (3*3) 8$ qqhr 8 uu vvk (qq1 union qq2 union qq3 union qq4 union qq5 union qq6 union qq7 union qq8 union qq9 union qq10)



top