type t = A0 | A1 | ⋯ | An−1 let f = function | A0 -> 0 | A1 -> 1 ⋯ | An−1 -> n−1
s2ii = s2i−1i = A, sji = _ otherwise. |
s2k+1n+1 = A, s2kn+1 = B. |
type t = A | B let f = function | A,A,_,_,_,_,_,_ -> 1 | _,_,A,A,_,_,_,_ -> 2 | _,_,_,_,A,A,_,_ -> 3 | _,_,_,_,_,_,A,A -> 4 | A,B,A,B,A,B,A,B -> 5
bii = B, bji = _ otherwise |
V1 = | ⎛ ⎜ ⎝ |
| ⎞ ⎟ ⎠ | , Vn = | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ |
type t = A | B let f = function | A,A,A,_,_,_ -> 1 | B,_,_,A,A,_ -> 2 | _,B,_,B,_,A -> 3 | _,_,B,_,B,B -> 4This series is a real challenge to pattern matching compilers, especially to those that target decision trees: whatever column is selected, compilation will produce code of exponential size.
|
type t = A | B let f = function | A,A,A,A -> 1 | B,B,B,B -> 1 | _,A,A,A -> 2 | _,B,B,B -> 2 | _,_,A,A -> 3 | _,_,B,B -> 3 | _,_,_,A -> 4 | _,_,_,B -> 4This series yields exponential behavior of naive compilation (along first column) to decisions trees.