diff --git a/README.md b/README.md index 51cb0fd..8c04a72 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A combinatorics library for Node/JS, PHP, Python, ActionScript (php/python implementations in progress) -**version 0.1** +**version 0.1.0** ![abacus combinatorial numbers](/abacus.jpg) @@ -211,7 +211,13 @@ see: `test/test.bat` ###Performance -most algorithms are linear `O(n)` (or log-linear `O(nlgn)`) time algorithms, plus statisticaly unbiased, and the author hopes to remain so +most algorithms: + +* are **linear** `O(n)` (or log-linear `O(nlgn)`) time algorithms +* are **statisticaly unbiased** (e.g uniform sampling methods) +* use **efficient sucessor methods** (e.g loopless methods / constant delay methods) to generate objects +* **avoid big-integer arithmetic and computational overhead** (except if explicit ranking / unranking is needed and objects are large) + ###Todo diff --git a/src/js/Abacus.js b/src/js/Abacus.js index 110f382..c018610 100644 --- a/src/js/Abacus.js +++ b/src/js/Abacus.js @@ -22,24 +22,16 @@ else if ( !(name in root) ) /* Browser/WebWorker/.. */ "use strict"; var Abacus, PROTO = 'prototype', CLASS = 'constructor', HAS = 'hasOwnProperty' - ,slice = Array.prototype.slice, bind = Function.prototype.bind + ,slice = Array.prototype.slice ,Extend = Object.create ,Merge = function(a, b) { for (var p in b) if (b[HAS](p)) a[p] = b[p]; return a; } ,Class = function(s, c) { - if ( 1 === arguments.length ) - { - c = s; - s = Object; - } + if ( 1 === arguments.length ) { c = s; s = Object; } var ctor = c[CLASS]; - if ( c[HAS]('__static__') ) - { - ctor = Merge(ctor, c.__static__); - delete c.__static__; - } + if ( c[HAS]('__static__') ) { ctor = Merge(ctor, c.__static__); delete c.__static__; } ctor[PROTO] = Merge(Extend(s[PROTO]), c); return ctor; } @@ -58,16 +50,6 @@ var Abacus, PROTO = 'prototype', CLASS = 'constructor', HAS = 'hasOwnProperty' ,log2 = Math.log2 || function(x) { return Math.log(x) / Math.LN2; } ,int = function int( x ) { return parseInt(x||0,10)||0; } ,rint = function rint( m, M ) { return round( (M-m)*rnd( ) + m ); } - ,clamp = function clamp( v, m, M ) { return ( v < m ) ? m : ((v > M) ? M : v); } - ,numeric_asc = function numeric_asc( a, b ) { return a-b; } - ,numeric_desc = function numeric_desc( a, b ) { return b-a; } - ,array = function( n ) { return new Array(n); } - ,n_array = function n_array( dims ) { - var len = dims.shift( ), - a = len ? new Array( len ) : [ ], i; - if ( dims.length ) for (i=0; i 0 && r >= exclude[0] ) - { - r++; - for (i=1; i n-k ) k = n - k; // take advantage of symmetry if ( 0 > k || 1 > n ) return 0; else if ( 0 === k || 1 === n ) return 1; @@ -747,10 +696,10 @@ var Abacus, PROTO = 'prototype', CLASS = 'constructor', HAS = 'hasOwnProperty' return floor(0.5+Cnk); } } - // recursively compute the partition count using the recursive relation: - // http://en.wikipedia.org/wiki/Partition_(number_theory)#Partition_function - // http://www.programminglogic.com/integer-partition-algorithm/ ,partitions = function partitions( n, k, m, tbl ) { + // recursively compute the partition count using the recursive relation: + // http://en.wikipedia.org/wiki/Partition_(number_theory)#Partition_function + // http://www.programminglogic.com/integer-partition-algorithm/ // compute number of integer partitions of n // into exactly k parts having m as max value // m + k-1 <= n <= k*m @@ -776,25 +725,10 @@ var Abacus, PROTO = 'prototype', CLASS = 'constructor', HAS = 'hasOwnProperty' ,powNK = function( n, k ) { return pow(n, k); } - // http://en.wikipedia.org/wiki/Fibonacci_number - ,fibonacci = function( n ) { - if ( 0 > n ) return 0; - // use lookup table - if ( 32 > n ) return FIB_32[ n ]; - // compute it directly - if ( 64 > n ) - { - var f0 = FIB_32[30], f1 = FIB_32[31], f2; - while ( n-- > 31 ) { f2 = f0+f1; f0 = f1; f1 = f2; } - return f2; - } - // compute it approximately - return floor(0.5+(pow(PHI, n)-pow(1-PHI, n))/SQRT5); - } - // https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm - // https://en.wikipedia.org/wiki/Integer_relation_algorithm - // http://userpages.umbc.edu/~rcampbel/NumbThy/Class/Programming/JavaScript/ ,xgcd = function( a, b ) { + // https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm + // https://en.wikipedia.org/wiki/Integer_relation_algorithm + // http://userpages.umbc.edu/~rcampbel/NumbThy/Class/Programming/JavaScript/ var a1=1, b1=0, a2=0, b2=1, aneg=1, bneg=1, tmp, q; if (a < 0) { a = -a; aneg = -1; }; if (b < 0) { b = -b; bneg = -1; }; @@ -810,17 +744,13 @@ var Abacus, PROTO = 'prototype', CLASS = 'constructor', HAS = 'hasOwnProperty' } ,LEX = 8, REVLEX = 16, COLEX = 32, REVCOLEX = 64, GRAY = 128, RANDOM = 256, STOCHASTIC = 512 ,ORDERINGS = LEX | REVLEX | COLEX | REVCOLEX | GRAY | RANDOM | STOCHASTIC - ,ORDER = function ORDER( ordering ) { - if ( !arguments.length || null == ordering ) return LEX; // default - if ( ordering.substr ) - { - ordering = ordering.toUpperCase( ); - return Abacus.ORDER[HAS](ordering) ? Abacus.ORDER[ordering] : LEX; - } - if ( !(ORDERINGS & ordering) ) ordering = LEX; - return ordering; + ,ORDER = function ORDER( o ) { + if ( !arguments.length || null == o ) return LEX; // default + if ( o.substr ) { o = o.toUpperCase( ); return Abacus.ORDER[HAS](o) ? Abacus.ORDER[o] : LEX; } + if ( !(ORDERINGS & o) ) o = LEX; + return o; } - ,List, BitArray, CombinatorialIterator, Permutation, Derangement + ,BitArray, CombinatorialIterator, Permutation, Derangement ,Combination, CombinationRepeat, Partition, RestrictedPartition ,Powerset, Tensor, Tuple ,NotImplemented = function( method ) { @@ -840,16 +770,23 @@ Abacus = { ,rnd: rnd ,rint: rint -,rint_exclude: rint_exclude -,clamp: clamp ,Factorial: factorial ,SubFactorial: subfactorial ,Binomial: binomial ,Partitions: partitions -,Fibonacci: fibonacci -,Bell: NotImplemented( ) -,Catalan: NotImplemented( ) + +,shuffle: shuffle +,pick: pick + +,operate: operate +,map: map +,filter: filter +,each: each +,intersection: intersection +,union: union +,kronecker: kronecker +,cartesian: cartesian }; @@ -860,11 +797,15 @@ Abacus.ORDER = { LEX: LEX ,LEXICOGRAPHIC: LEX ,REVLEX: REVLEX +,ANTILEX: REVLEX ,REVERSELEXICOGRAPHIC: REVLEX +,ANTILEXICOGRAPHIC: REVLEX ,COLEX: COLEX ,COLEXICOGRAPHIC: COLEX ,REVCOLEX: REVCOLEX +,ANTICOLEX: REVCOLEX ,REVERSECOLEXICOGRAPHIC: REVCOLEX +,ANTICOLEXICOGRAPHIC: REVCOLEX //,GRAY: GRAY ,RANDOM: RANDOM ,RANDOMISED: RANDOM @@ -872,29 +813,6 @@ Abacus.ORDER = { }; -List = Abacus.List = { - - array: array -,n_array: n_array -,range: range - -,shuffle: shuffle -,pick: pick - -,sum: sum -,operate: operate -,map: map -,filter: filter -,each: each -,intersection: intersection -,union: union -,complement: complement -,kronecker: kronecker -,cartesian: cartesian - -}; - - BitArray = Abacus.BitArray = Class({ constructor: function BitArray(n) { @@ -1070,8 +988,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ order = ORDER( order ); self._order = order; self._index = 0; self._item = self.__item = null; - self._prev = self._index > 0; - self._next = self._index < self._count; + self._prev = false; self._next = false; tot = self._count; n = self.n; if ( STOCHASTIC & order ) @@ -1092,7 +1009,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ throw new Error('No Stochastic Transition Matrix given!'); } } - else if ( RANDOM === order ) + else if ( RANDOM & order ) { // lazy init if ( !self._traversed ) self._traversed = new BitArray( tot ); @@ -1100,24 +1017,25 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ self._traversed.set( r=self.randomIndex( ) ); self._item = self.__item = self.item( r, LEX ); } - else if ( REVCOLEX === order ) + else if ( REVCOLEX & order ) { self.__item = klass.first( n ); self._item = klass.dual( self.__item, n, REVCOLEX ); } - else if ( COLEX === order ) + else if ( COLEX & order ) { self.__item = klass.last( n ); self._item = klass.dual( self.__item, n, COLEX ); } - else if ( REVLEX === order ) + else if ( REVLEX & order ) { self._item = self.__item = klass.last( n ); } - else /*if ( LEX === order )*/ + else /*if ( LEX & order )*/ { self._item = self.__item = klass.first( n ); } + self._next = null != self._item; return self; } return self._order; @@ -1131,7 +1049,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ if ( 0 > index ) index += tot; if ( index >=0 && index < tot ) { - if ( REVCOLEX === order ) + if ( REVCOLEX & order ) { self._index = index; self.__item = 0 === index @@ -1141,7 +1059,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ : klass.unrank( index, n, tot )); self._item = klass.dual( self.__item, n, REVCOLEX ); } - else if ( COLEX === order ) + else if ( COLEX & order ) { self._index = index; self.__item = 0 === index @@ -1151,7 +1069,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ : klass.unrank( tot-1-index, n, tot )); self._item = klass.dual( self.__item, n, COLEX ); } - else if ( REVLEX === order ) + else if ( REVLEX & order ) { self._index = index; self._item = self.__item = 0 === index @@ -1160,7 +1078,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ? klass.first( n ) : klass.unrank( tot-1-index, n, tot )); } - else if ( LEX === order ) + else if ( LEX & order ) { self._index = index; self._item = self.__item = 0 === index @@ -1184,7 +1102,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ if ( 0 > index ) index += tot; if ( index >= 0 && index < tot ) { - if ( RANDOM === order ) + if ( RANDOM & order ) { traversed = self._traversed; // get next un-traversed index, reject if needed @@ -1192,7 +1110,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ traversed.set( r ); return klass.unrank( r, n, tot ); } - else if ( REVCOLEX === order ) + else if ( REVCOLEX & order ) { return klass.dual( 0 === index ? klass.first( n ) @@ -1200,7 +1118,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ? klass.last( n ) : klass.unrank( index, n, tot )), n, REVCOLEX ); } - else if ( COLEX === order ) + else if ( COLEX & order ) { return klass.dual( 0 === index ? klass.last( n ) @@ -1208,7 +1126,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ? klass.first( n ) : klass.unrank( tot-1-index, n, tot )), n, COLEX ); } - else if ( REVLEX === order ) + else if ( REVLEX & order ) { return 0 === index ? klass.last( n ) @@ -1216,7 +1134,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ? klass.first( n ) : klass.unrank( tot-1-index, n, tot )); } - else //if ( LEX === order ) + else //if ( LEX & order ) { return 0 === index ? klass.first( n ) @@ -1262,49 +1180,56 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ,next: function( ) { var self = this, order = self._order, traversed, r, klass = self[CLASS], current = self._item, n = self.n, tot = self._count; - // compute next + if ( STOCHASTIC & order ) { self._item = self.__item = klass.stochastic( self._stochastic[0], n, self._stochastic[2] ); } - else if ( self._index+1 < tot ) + else if ( RANDOM & order ) { - self._next = true; ++self._index; - if ( RANDOM === order ) + if ( self._index+1 < tot ) { + ++self._index; traversed = self._traversed; // get next un-traversed index, reject if needed while ( traversed.isset( r = self.randomIndex( ) ) ) ; traversed.set( r ); self._item = self.__item = self.item( r, LEX ); + self._next = null != self._item; + } + else + { + self._next = false; + if ( self._traversed ) + { + self._traversed.dispose( ); + self._traversed = null; + } } - else if ( REVCOLEX === order ) + } + else + { + // compute next, using successor methods / loopless algorithms, WITHOUT using big integer arithemtic + if ( REVCOLEX & order ) { self.__item = klass.succ( 1, self.__item, n, tot ); self._item = klass.dual( self.__item, n, REVCOLEX ); } - else if ( COLEX === order ) + else if ( COLEX & order ) { self.__item = klass.succ( -1, self.__item, n, tot ); self._item = klass.dual( self.__item, n, COLEX ); } - else if ( REVLEX === order ) + else if ( REVLEX & order ) { self._item = self.__item = klass.succ( -1, self.__item, n, tot ); } - else /*if ( LEX === order )*/ + else /*if ( LEX & order )*/ { self._item = self.__item = klass.succ( 1, self.__item, n, tot ); } - } - else - { - self._next = false; - if ( (RANDOM === order) && self._traversed ) - { - self._traversed.dispose( ); - self._traversed = null; - } + self._next = null != self._item; + if ( self._next ) ++self._index; } return current; } @@ -1312,8 +1237,7 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ ,forward: function( ) { var self = this; self.order( self._order ).index( self._count-1 ); - self._prev = self._index >= 0; - self._next = false; + self._prev = self._index >= 0; self._next = false; return self; } @@ -1328,33 +1252,28 @@ CombinatorialIterator = Abacus.CombinatorialIterator = Class({ // random and stochastic order has no prev if ( (RANDOM | STOCHASTIC) & order ) return null; - // compute prev - if ( self._index-1 >= 0 ) + // compute prev, using successor methods / loopless algorithms, WITHOUT using big integer arithemtic + if ( REVCOLEX & order ) { - self._prev = true; --self._index; - if ( REVCOLEX === order ) - { - self.__item = klass.succ( -1, self.__item, n, tot ); - self._item = klass.dual( self.__item, n, REVCOLEX ); - } - else if ( COLEX === order ) - { - self.__item = klass.succ( 1, self.__item, n, tot ); - self._item = klass.dual( self.__item, n, COLEX ); - } - else if ( REVLEX === order ) - { - self._item = self.__item = klass.succ( 1, self.__item, n, tot ); - } - else /*if ( LEX === order )*/ - { - self._item = self.__item = klass.succ( -1, self.__item, n, tot ); - } + self.__item = klass.succ( -1, self.__item, n, tot ); + self._item = klass.dual( self.__item, n, REVCOLEX ); } - else + else if ( COLEX & order ) + { + self.__item = klass.succ( 1, self.__item, n, tot ); + self._item = klass.dual( self.__item, n, COLEX ); + } + else if ( REVLEX & order ) + { + self._item = self.__item = klass.succ( 1, self.__item, n, tot ); + } + else /*if ( LEX & order )*/ { - self._prev = false; + self._item = self.__item = klass.succ( -1, self.__item, n, tot ); } + self._prev = null != self._item; + if ( self._prev ) --self._index; + return current; } @@ -1948,14 +1867,14 @@ Combination = Abacus.Combination = Class(CombinatorialIterator, { return null; } ,rand: function( n ) { - var comb, k, g, i, j, p, q; + var comb, k, g, i, j, p, q, n_k; // O(n), unbiased, only one call to RPNG, NO big integers k = n[1]; n = n[0]; comb = new Array(k); - g = Abacus.rnd( ); j = 0; q = 0; + g = Abacus.rnd( ); j = 0; q = 0; n_k = n-k; for (i=1; i<=k; i++) { j++; p = (k-i+1) / (n-j+1); - while ((p <= g) && (j < n-k+i)) + while ((p <= g) && (j < n_k+i)) { q = p; j++; @@ -2026,7 +1945,7 @@ CombinationRepeat = Abacus.CombinationRepeat = Class(CombinatorialIterator, { ,__static__: { // http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition count: function( n ) { - return binomial(n[0]+n[1]-1,n[1]); + return binomial( n[0]+n[1]-1, n[1] ); } ,dual: Combination.dual ,rank: function( item, n, total ) { @@ -2141,14 +2060,14 @@ CombinationRepeat = Abacus.CombinationRepeat = Class(CombinatorialIterator, { return null; } ,rand: function( n ) { - var comb, k, g, i, j, p, q, N; + var comb, k, g, i, j, p, q, N, N_k; // O(n+k), unbiased, only one call to RPNG, NO big integers k = n[1]; n = n[0]; comb = new Array(k); - g = Abacus.rnd( ); j = 0; q = 0; N = n+k-1; + g = Abacus.rnd( ); j = 0; q = 0; N = n+k-1; N_k = N-k; for(i=1; i<=k; i++) { j++; p = (k-i+1) / (N-j+1); - while ((p <= g) && (j < N-k+i)) + while ((p <= g) && (j < N_k+i)) { q = p; j++; @@ -2413,7 +2332,16 @@ Powerset = Abacus.Powerset = Class(CombinatorialIterator, { for (i=0; ir?n:r>t?t:r},T=function(r){return new Array(r)},B=function jn(r){var n,t=r.shift(),e=t?new Array(t):[];if(r.length)for(n=0;t>n;n++)e[n]=jn(r.slice(0));return e},H=function(r){return function(n){var t,e;return e=n.toString(2),(t=r-e.length)>0&&(e=new Array(t+1).join("0")+e),e}},V=H(32),F=function(r,n){var t,e;if(n=n||{},t=new Array(r),n[v]("value")){var u=n.value,i=!!u.slice;for(e=0;r>e;e++)t[e]=i?u.slice():u}else{var o=n[v]("start")?parseInt(n.start,10):0,f=n[v]("step")?parseInt(n.step,10):1,a=0;for(e=0;r>e;e++)t[e]=a+o,a+=f}return t},G=function(n,t,e,u){u=u||e.length;var i,o=r.rint(n,t-u);if(u>0&&o>=e[0])for(o++,i=1;u>i&&!(on;n+=2)i+=r[n]+r[n+1];for(n=e;t>n;n+=16)i+=r[n]+r[n+1]+r[n+2]+r[n+3]+r[n+4]+r[n+5]+r[n+6]+r[n+7]+r[n+8]+r[n+9]+r[n+10]+r[n+11]+r[n+12]+r[n+13]+r[n+14]+r[n+15];return i},Y=function(r){var n,t=r.length,e=15&t,u=1&e,i=u?r[0]:1;for(n=u;e>n;n+=2)i*=r[n]*r[n+1];for(n=e;t>n;n+=16)i*=r[n]*r[n+1]*r[n+2]*r[n+3]*r[n+4]*r[n+5]*r[n+6]*r[n+7]*r[n+8]*r[n+9]*r[n+10]*r[n+11]*r[n+12]*r[n+13]*r[n+14]*r[n+15];return i},z=function(r,n,t,e,u,i){var o=r.length;if(arguments.length<5&&(u=o-1),0>u&&(u+=o),arguments.length<4&&(e=0),e>u)return t;if(!0===i){var f,a,s=u-e+1,c=s-1,l=15&s,h=1&l,_=c-l,v=h?n(t,r[u],u):t;for(f=c-h;f>_;f-=2)a=e+f,v=n(n(v,r[a],a),r[a-1],a-1);for(f=_;f>=0;f-=16)a=e+f,v=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(v,r[a],a),r[a-1],a-1),r[a-2],a-2),r[a-3],a-3),r[a-4],a-4),r[a-5],a-5),r[a-6],a-6),r[a-7],a-7),r[a-8],a-8),r[a-9],a-9),r[a-10],a-10),r[a-11],a-11),r[a-12],a-12),r[a-13],a-13),r[a-14],a-14),r[a-15],a-15)}else{var f,a,s=u-e+1,l=15&s,h=1&l,v=h?n(t,r[e],e):t;for(f=h;l>f;f+=2)a=e+f,v=n(n(v,r[a],a),r[a+1],a+1);for(f=l;s>f;f+=16)a=e+f,v=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(v,r[a],a),r[a+1],a+1),r[a+2],a+2),r[a+3],a+3),r[a+4],a+4),r[a+5],a+5),r[a+6],a+6),r[a+7],a+7),r[a+8],a+8),r[a+9],a+9),r[a+10],a+10),r[a+11],a+11),r[a+12],a+12),r[a+13],a+13),r[a+14],a+14),r[a+15],a+15)}return v},J=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return[];var o,f,a,s,c,l,h=e-t+1,_=new Array(h);if(!0===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&(_[0]=n(r[e],e,t,e)),o=a-l;o>s;o-=2)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f-1],f-1,t,e);for(o=s;o>=0;o-=16)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f-1],f-1,t,e),_[o+2]=n(r[f-2],f-2,t,e),_[o+3]=n(r[f-3],f-3,t,e),_[o+4]=n(r[f-4],f-4,t,e),_[o+5]=n(r[f-5],f-5,t,e),_[o+6]=n(r[f-6],f-6,t,e),_[o+7]=n(r[f-7],f-7,t,e),_[o+8]=n(r[f-8],f-8,t,e),_[o+9]=n(r[f-9],f-9,t,e),_[o+10]=n(r[f-10],f-10,t,e),_[o+11]=n(r[f-11],f-11,t,e),_[o+12]=n(r[f-12],f-12,t,e),_[o+13]=n(r[f-13],f-13,t,e),_[o+14]=n(r[f-14],f-14,t,e),_[o+15]=n(r[f-15],f-15,t,e)}else{for(c=15&h,l=1&c,l&&(_[0]=n(r[t],t,t,e)),o=l;c>o;o+=2)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f+1],f+1,t,e);for(o=c;h>o;o+=16)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f+1],f+1,t,e),_[o+2]=n(r[f+2],f+2,t,e),_[o+3]=n(r[f+3],f+3,t,e),_[o+4]=n(r[f+4],f+4,t,e),_[o+5]=n(r[f+5],f+5,t,e),_[o+6]=n(r[f+6],f+6,t,e),_[o+7]=n(r[f+7],f+7,t,e),_[o+8]=n(r[f+8],f+8,t,e),_[o+9]=n(r[f+9],f+9,t,e),_[o+10]=n(r[f+10],f+10,t,e),_[o+11]=n(r[f+11],f+11,t,e),_[o+12]=n(r[f+12],f+12,t,e),_[o+13]=n(r[f+13],f+13,t,e),_[o+14]=n(r[f+14],f+14,t,e),_[o+15]=n(r[f+15],f+15,t,e)}return _},K=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return[];var o,f,a,s,c,l,h=e-t+1,_=[];if(trye===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&n(r[e],e,r)&&_.push(r[e]),o=a-l;o>s;o-=2)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]);for(o=s;o>=0;o-=16)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f])}else{for(c=15&h,l=1&c,l&&n(r[t],t,r)&&_.push(r[t]),o=l;c>o;o+=2)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]);for(o=c;h>o;o+=16)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f])}return _},Q=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return r;var o,f,a,s,c,l,h=e-t+1;if(!0===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&n(r[e],e,r,t,e),o=a-l;o>s;o-=2)f=t+o,n(r[f],f,r,t,e),n(r[--f],f,r,t,e);for(o=s;o>=0;o-=16)f=t+o,n(r[f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e)}else{for(c=15&h,l=1&c,l&&n(r[t],t,r,t,e),o=l;c>o;o+=2)f=t+o,n(r[f],f,r,t,e),n(r[++f],f,r,t,e);for(o=c;h>o;o+=16)f=t+o,n(r[f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e)}return r},W=function(r,n){for(var t=0,e=0,u=[],i=r.length,o=n.length;i>t&&o>e;)r[t]n[e]?e++:(u.push(r[t]),t++,e++);return u},Z=function(r,n,t){var e,u,i=0,o=0,f=[],a=r.length,s=n.length;for(t=!1!==t,u=!t;a>i&&s>o;){if(t&&f.length){if(r[i]===e){i++;continue}if(n[o]===e){o++;continue}}r[i]n[o]?f.push(e=n[o++]):(f.push(e=r[i]),u&&f.push(n[o]),i++,o++)}for(;a>i;)(u||r[i]!==e)&&f.push(e=r[i++]);for(;s>o;)(u||n[o]!==e)&&f.push(e=n[o++]);return f},$=function(){var r,n,t,e,u,i,o,f,a,s,c=arguments,l=c.length;if(!l)return[];for(a=c[0].length,r=1;l>r;r++)a*=c[r].length;for(s=new Array(a),r=0;a>r;r++){for(f=[],t=r,n=l-1;n>=0;n--)if(e=c[n].length,u=t%e,t=~~(t/e),o=c[n][u],o instanceof Array)for(i=o.length-1;i>=0;i--)f.unshift(o[i]);else f.unshift(o);s[r]=f}return s},rn=function(){},nn=function(n,t,e){var u,i,o,f,a;for(f=!0===e?n.slice():n,a=!0===t?1:0,u=f.length;ao;o++)f=r.rint(0,--s),a=n[f],n[f]=n[s],n[s]=a,u[o]=a,e&&(i[o]=f);if(e)for(o=t-1;o>=0;o--)f=i[o],a=n[s],n[s]=n[f],n[f]=a,s++;return u},en=function(r,n){var t,e,u,i,o=r.length;for(t=new Array(n-o),e=0,u=0,i=0;n>e;)u>=o||et;t++)u[e-1-t]=n[t]-1-r[t];else for(t=0;e>t;t++)u[e-1-t]=n-1-r[t];return u},on=function(r){var n,t=[],e=r.length;if(e>1)for(n=e-1;n>=1;n--)t.push([r[0],r[n]]);return t},fn=function(r){var n,t,e=1,u=new Array(r);for(n=0;r>n;n++)for(u[n]=new Array(r),t=0;r>t;t++)u[n][t]=e++;return u},an=function(r){var n,t,e=r.length,u=new Array(e);for(n=0;e>n;n++)u[n]=new Array(e);for(n=0;e>n;n++)for(t=0;e>t;t++)u[t][n]=r[n][t];return u},sn=function Dn(r){var n=r.length,t=1&n,e=n-t>>1;return n>2?Dn(r.slice(-e,n)).concat(r.slice(0,e)):[r[1],r[0]]},cn=function(r){return an(sn(an(r)))},ln=function(r,n,t,e){var u,i,o=r.length;for(u=0;o>u;u++)for(i=0;o>i;i++)n[t+u][e+i]=r[u][i];return n},hn=function(r){var n,t,e=new Array(r);for(e[0]=new Array(r),t=0;r>t;t++)e[0][t]=t+1;for(n=1;r>n;n++)for(e[n]=new Array(r),t=0;r>t;t++)e[n][t]=e[0][(t+n)%r];return e},_n=function(r,n){if(0>r)return null;if(0===r||1===r)return[[r]];var t,e,u,i,o,f,a,s,c,l,h=new Array(r),_=1&r,v=1-_,d=0===(3&r),m=r*r,g=r-_>>>1;for(t=0;r>t;t++)h[t]=new Array(r);if(n)for(o=0,t=0,e=0;m>o;o++,e++)e>=r&&(t++,e=0),h[t][e]=n[(a+e-t)%r][(s+t+e)%r];else if(d)for(c=~~Math.sqrt(r),l=fn(r),ln(l,h,0,0),ln(cn(sn(l)),h,0,c),ln(cn(l),h,c,0),ln(sn(l),h,c,c),u=0;c>u;u++)for(i=0;c>i;i++)for(f=(l[u][i]-1)*c,t=0;c>t;t++)for(e=0;c>e;e++)h[u+t][i+e]+=f;else if(v);else for(a=r+g,s=g+_,o=0,t=0,e=0;m>o;o++,e++)e>=r&&(t++,e=0),h[t][e]=(a+e-t)%r*r+(s+t+e)%r+1;return h},vn=function(){},dn=function(){for(var r,n,t,e,u,i,o,f,a,s,c,l,h,_=arguments,v=_.length,d=_[0],m=1;v>m;){for(r=d,n=_[m++],e=r.length,u=n.length,i=u*u,o=e*u,d=new Array(o),f=0;o>f;f++)d[f]=new Array(o);for(s=0,f=0,l=0,a=0,c=0,h=0,t=(r[s][l]-1)*i;e>s;)d[f+c][a+h]=t+n[c][h],++h>=u&&(c++,h=0,c>=u&&(l++,a+=u,c=0,h=0,l>=e&&(s++,f+=u,l=0,a=0,c=0,h=0),t=(r[s][l]-1)*i))}return d},mn=function(r){var n,t,e,u,i,o,f,a=r.length,s=a*a,c=a*s+a>>>1,l=new Array(s);for(echo(c),n=0;s>n;n++)l[n]=null;for(o=0,f=0,n=0;a>n;n++){if(e=r[n][0],l[e-1]||(l[e-1]=[n,0]),1>e||e>s||n!==l[e-1][0]&&0!==l[e-1][1])return!1;if(u=e,e=r[0][n],l[e-1]||(l[e-1]=[0,n]),1>e||e>s||0!==l[e-1][0]&&n!==l[e-1][1])return!1;for(i=e,o+=r[n][n],f+=r[n][a-1-n],t=1;a>t;t++){if(e=r[n][t],l[e-1]||(l[e-1]=[n,t]),1>e||e>s||n!==l[e-1][0]&&t!==l[e-1][1])return!1;if(u+=e,e=r[t][n],l[e-1]||(l[e-1]=[t,n]),1>e||e>s||t!==l[e-1][0]&&n!==l[e-1][1])return!1;i+=e}if(u!==c||i!==c)return!1}return o!==c||f!==c?!1:!0},gn=function(r){if(0>r)return 0;if(2>r)return 1;if(4>r)return r<r)return w[r-4];for(var n=R(w[15]);r>=20;)n+=R(r--);return C(.5+E(n))},pn=function(r){return C(.5+gn(r)/L)},wn=function(r,n){if(n>r-n&&(n=r-n),0>n||1>r)return 0;if(0===n||1===r)return 1;if(1===n)return r;if(23>r)return y[((r-3)*(r-2)>>>1)+n-2];var t,e=r-n,u=1+e;for(t=2;n>=t;t++)u*=1+e/t;return C(.5+u)},yn=function Xn(r,n,t,e){if(t===r&&1===n||n===r&&1===t)return 1;if(t+n>r+1||r>n*t)return 0;if(32>=r&&32>=n&&32>=t)return A[(r-1<<10)+(n-1<<5)+t-1];var u,i,o=O(t,r-t-n+2),f=S(1,M((r-t)/(n-1))),a=0;for(null==e&&(e={}),u=f;o>=u;u++)i=r-t+","+(n-1)+","+u,null==e[i]&&(e[i]=Xn(r-t,n-1,u,e)),a+=e[i];return a},An=function(r){return 1<>>0},xn=function(r,n){return I(r,n)},kn=function(r){if(0>r)return 0;if(32>r)return x[r];if(64>r){for(var n,t=x[30],e=x[31];r-->31;)n=t+e,t=e,e=n;return n}return C(.5+(I(j,r)-I(1-j,r))/D)},bn=8,Mn=16,Cn=32,En=64,Rn=128,In=256,On=512,Sn=bn|Mn|Cn|En|Rn|In|On,Pn=function(n){return arguments.length&&null!=n?n.substr?(n=n.toUpperCase(),r.ORDER[v](n)?r.ORDER[n]:bn):(Sn&n||(n=bn),n):bn},Ln=function(r){return arguments.length?function(){throw new Error('"'+r+'" not implemented')}:function(){throw new Error("Method not implemented")}};return r={VERSION:"0.1.0",rnd:k,rint:N,rint_exclude:G,clamp:q,Factorial:gn,SubFactorial:pn,Binomial:wn,Partitions:yn,Fibonacci:kn,Bell:Ln(),Catalan:Ln()},r.ORDER={LEX:bn,LEXICOGRAPHIC:bn,REVLEX:Mn,REVERSELEXICOGRAPHIC:Mn,COLEX:Cn,COLEXICOGRAPHIC:Cn,REVCOLEX:En,REVERSECOLEXICOGRAPHIC:En,RANDOM:In,RANDOMISED:In,STOCHASTIC:On},n=r.List={array:T,n_array:B,range:F,shuffle:nn,pick:tn,sum:U,operate:z,map:J,filter:K,each:Q,intersection:W,union:Z,complement:en,kronecker:$,cartesian:rn},t=r.BitArray=p({constructor:function Nn(r){var n=this;return n instanceof Nn?(n.length=r,void(n.bits=new Uint32Array(M(r/32)))):new Nn(r)},length:0,bits:null,dispose:function(){var r=this;return r.length=null,r.bits=null,r},clone:function(){var r=this,n=new t(r.length);return n.bits=new Uint32Array(r.bits),n},fromArray:function(r){var n=this;return n.bits=new Uint32Array(r),n},toArray:function(){return d.call(this.bits)},toString:function(){return J(this.toArray(),V).join("")},reset:function(){var r,n=this,t=n.bits,e=t.length;for(r=0;e>r;r++)t[r]=0;return n},isset:function(r){return!!(this.bits[r>>>5]&1<<(31&r))},set:function(r){var n=this;return n.bits[r>>>5]|=1<<(31&r),n},unset:function(r){var n=this;return n.bits[r>>>5]&=~(1<<(31&r)),n},toggle:function(r){var n=this;return n.bits[r>>>5]^=1<<(31&r),n}}),e=r.CombinatorialIterator=p({constructor:function qn(r){var n,t=this;return t instanceof qn?(n=t[_],t.n=r||0,t._count=n.count(t.n),void t.order(bn)):new qn(r)},__static__:{count:Ln(),dual:function(r,n){return 0>=n?[]:un(r,n)},rank:Ln(),unrank:Ln(),first:Ln(),last:Ln(),succ:function(r,n,t,e){var u=this;return-1!==r&&1!==r&&(r=1),n?u.unrank(u.rank(n,t,e)+r,t,e):null},rand:function(n,t){var e=this,u=t?t:e.count(n),i=r.rint(0,u-1);return 0===i?e.first(n):i+1===u?e.last(n):e.unrank(i,n,u)},stochastic:Ln()},n:0,_order:0,_count:0,_index:null,__item:null,_item:null,_prev:null,_next:null,_traversed:null,_stochastic:null,dispose:function(){var r=this;return r.n=null,r._order=null,r._count=0,r._index=null,r.__item=null,r._item=null,r._prev=null,r._next=null,r._stochastic=null,r._traversed&&(r._traversed.dispose(),r._traversed=null),r},_store:function(){var r=this;return[r._order,r._index,r.__item,r._item,r._prev,r._next]},_restore:function(r){var n=this;return r&&(n._order=r[0],n._index=r[1],n.__item=r[2],n._item=r[3],n._prev=r[4],n._next=r[5]),n},total:function(){return this._count},order:function(r,n,e){var u,i,o,f=this,a=f[_];if(arguments.length){if(r=Pn(r),f._order=r,f._index=0,f._item=f.__item=null,f._prev=f._index>0,f._next=f._indexr&&(r+=t),r>=0&&t>r&&(En===e?(u._index=r,u.__item=0===r?i.first(n):t===r+1?i.last(n):i.unrank(r,n,t),u._item=i.dual(u.__item,n,En)):Cn===e?(u._index=r,u.__item=0===r?i.last(n):t===r+1?i.first(n):i.unrank(t-1-r,n,t),u._item=i.dual(u.__item,n,Cn)):Mn===e?(u._index=r,u._item=u.__item=0===r?i.last(n):t===r+1?i.first(n):i.unrank(t-1-r,n,t)):bn===e&&(u._index=r,u._item=u.__item=0===r?i.first(n):t===r+1?i.last(n):i.unrank(r,n,t))),u):u._index},item:function(r,n){if(!arguments.length)return this._item;var t,e,u=this,i=u.n,o=u._count,f=u[_];if(n=null!=n?Pn(n):u._order,0>r&&(r+=o),r>=0&&o>r){if(In===n){for(t=u._traversed;t.isset(e=u.randomIndex()););return t.set(e),f.unrank(e,i,o)}return En===n?f.dual(0===r?f.first(i):o===r+1?f.last(i):f.unrank(r,i,o),i,En):Cn===n?f.dual(0===r?f.last(i):o===r+1?f.first(i):f.unrank(o-1-r,i,o),i,Cn):Mn===n?0===r?f.last(i):o===r+1?f.first(i):f.unrank(o-1-r,i,o):0===r?f.first(i):o===r+1?f.last(i):f.unrank(r,i,o)}return null},randomIndex:function(n,t){var e=this,u=e._count,i=arguments.length;return 0===i?(n=0,t=u-1):1===i&&(n=n||0,t=u-1),r.rint(n,t)},random:function(){var r=this,n=r[_];return n.rand(r.n,r._count)},rewind:function(){var r=this;return r.order(r._order),r._prev=!1,r},hasNext:function(){return On&this._order?!0:this._next},next:function(){var r,n,t=this,e=t._order,u=t[_],i=t._item,o=t.n,f=t._count;if(On&e)t._item=t.__item=u.stochastic(t._stochastic[0],o,t._stochastic[2]);else if(t._index+1=0,r._next=!1,r},hasPrev:function(){return(In|On)&this._order?!1:this._prev},prev:function(){var r=this,n=r._order,t=r[_],e=r._item,u=r.n,i=r._count;return(In|On)&n?null:(r._index-1>=0?(r._prev=!0,--r._index,En===n?(r.__item=t.succ(-1,r.__item,u,i),r._item=t.dual(r.__item,u,En)):Cn===n?(r.__item=t.succ(1,r.__item,u,i),r._item=t.dual(r.__item,u,Cn)):r._item=r.__item=Mn===n?t.succ(1,r.__item,u,i):t.succ(-1,r.__item,u,i)):r._prev=!1,e)},range:function(r,n){var t,e,u,i,o,f=this,a=f._count,s=1,c=arguments.length;if(1>c?(r=0,n=a-1):2>c&&(n=a-1),0>r&&(r+=a),0>n&&(n+=a),r>n&&(t=r,r=n,n=t,s=-1),0>r&&(r=0),n>=a&&(n=a-1),n>=r){if(o=f._store(),(On|In)&f._order||f.index(r),u=n-r,e=new Array(u+1),0>s)for(i=u;i>=0;i--)e[i]=f.next();else for(i=0;u>=i;i++)e[i]=f.next();f._restore(o)}else e=[];return e}}),u=r.Permutation=p(e,{constructor:function Tn(r){var n=this;return n instanceof Tn?void e.call(n,r):new Tn(r)},__static__:{count:gn,dual:e.dual,rank:function(r,n){var t,e,u,i,o=0,f=M(X(n)),a=(1<<1+f)-1,s=new Array(a),c=1<t;t++)s[t]=0;for(t=0;n>t;t++){for(i=r[t],u=c+i,e=0;f>e;e++)1&u&&(i-=s[u>>>1<<1]),s[u]++,u>>>=1;s[u]++,o=o*(n-t)+i}return o},unrank:function(r,n,t){t=t||gn(n);var e,u,i,o,f,a,s,c,l,h,_,v,d=this;if(0===r)return d.first(n);if(t===r+1)return d.last(n);for(e=new Array(n),u=t/n,l=M(X(n)),h=(1<<1+l)-1,_=new Array(h),v=1<=i;i++)for(o=1,f=1<=o;o++)_[f-1+o]=1<i;i++){for(a=~~(r/u),s=1,o=0;l>o;o++)_[s]--,s<<=1,a>=_[s]&&(a-=_[s],s++);_[s]=0,e[i]=s-v,c&&(r%=u,u/=c,c--)}return e},first:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=n;return t},last:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=r-1-n;return t},succ:function(r,n,t){if(n){var e,u,i,o,f,a=n.slice();if(-1===r){for(e=t-2;e>=0&&a[e]<=a[e+1];)e--;if(e>=0){for(u=t-1;u>e&&a[e]<=a[u];)u--;for(f=a[e],a[e]=a[u],a[u]=f,i=e+1,o=t-1;o>i;)f=a[i],a[i++]=a[o],a[o--]=f}else a=null}else{for(e=t-2;e>=0&&a[e]>=a[e+1];)e--;if(e>=0){for(u=t-1;u>e&&a[e]>=a[u];)u--;for(f=a[e],a[e]=a[u],a[u]=f,i=e+1,o=t-1;o>i;)f=a[i],a[i++]=a[o],a[o--]=f}else a=null}return a}return null},rand:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=n;return nn(t)},stochastic:function(n,t,e){if(n.length!==t||n[0].length!==t)throw new Error("Stochastic Matrix dimensions and Permutation dimensions do not match!");var u,i,o,f,a,s,c,l,h=new Array(t),_=new Array(t),v=0,d=!1;for(i=0;t>i;i++)_[i]=0;if(e){if(d=!0,!e.length){for(e.N=0,u=new Array(t),i=0;t>i;i++)u[i]=0;for(i=0;t>i;i++)e.push(u.slice())}v=++e.N}for(l=!d,i=0;t>i;)for(f=r.rnd(),c=0,a=n[i],d&&(s=e[i]),o=0;t>o;o++){if(f>c&&f<=c+a[o]){0===_[o]&&(l||s[o]+1<=(v+1)*a[o])&&(_[o]=1,h[i]=o,d&&s[o]++,i++);break}c+=a[o]}return h},inverse:function(r,n){n=n||r.length;var t,e=new Array(n);for(t=0;n>t;t++)e[r[t]]=t;return e},compose:function(){var r,n,t,e=arguments,u=e.length,i=u?e[0]:[],o=i.length;for(n=1;u>n;n++)for(t=i.slice(),r=0;o>r;r++)i[r]=t[e[n][r]];return i},permute:function(r,n,t){var e,u,i,o=r.length;for(!0===t?(u=new Array(o),i=r):(u=r,i=r.slice()),e=0;o>e;e++)u[e]=i[n[e]];return u},reassign:function(r,n){var t,e=r.length,u=new Array(e);for(t=0;e>t;t++)u[t]=n[r[t]];return u},shuffle:nn,toCycles:function(r,n,t){n=n||r.length;var e,u,i,o=[],f=!0===t?1:0,a=new Array(n),s=new Array(n);for(e=0;n>e;e++)s[e]=e,a[e]=0;for(i=[u=s.shift()],a[u]=1;s.length;){if(u=r[u],a[u])for(i.length>f&&o.push(i),i=[];s.length&&a[u=s.shift()];);a[u]||(i.push(u),a[u]=1)}return i.length>f&&o.push(i),o},fromCycles:function(r,n){var t,e,u,i,o=new Array(n),f=r.length;for(e=0;n>e;e++)o[e]=e;for(t=0;f>t;t++)if(i=r[t],u=i.length,!(2>u)){for(e=0;u-1>e;e++)o[i[e]]=i[e+1];o[i[u-1]]=i[0]}return o},toSwaps:function(r,n){n=n||r.length;var t,e,i,o=[],f=u.toCycles(r,n,!0);for(t=0,e=f.length;e>t;t++)i=f[t],o=o.concat(on(i));return o},fromSwaps:function(r,n){var t,e,u,i=r.length,o=new Array(n);for(t=0;n>t;t++)o[t]=t;for(t=0;i>t;t++)e=r[t],u=o[e[0]],o[e[0]]=o[e[1]],o[e[1]]=u;return o},toMatrix:function(r,n,t){var e,u,i=new Array(n);for(t=!0===t,e=0;n>e;e++)for(i[e]=new Array(n),u=0;n>u;u++)i[e][u]=0;for(e=0;n>e;e++)t?i[r[e]][e]=1:i[e][r[e]]=1;return i},fromMatrix:function(r,n,t){var e,u,i=new Array(n);for(t=!0===t,e=0;n>e;e++)for(u=0;n>u;u++)r[e][u]&&(t?i[u]=e:i[e]=u);return i},isConnected:function(r,n){var t,e=-1/0;for(n=n||r.length,t=0;n-1>t;t++)if(r[t]>e&&(e=r[t]),t>=e)return!1;return!0}}}),i=r.Derangement=p(e,{constructor:function Bn(r){var n=this;return n instanceof Bn?void e.call(n,r):new Bn(r)},__static__:{count:pn,dual:u.dual,rank:e.rank,unrank:e.unrank,first:e.first,last:e.last,succ:e.succ,stochastic:e.stochastic,rand:function(n){var t,e,u,i,o=new Array(n),f=new Array(n),a=n,s=gn(a),c=C(s+1/L),l=C((s/(a*(a-1))+1)/L);for(t=0;n>t;t++)o[t]=t,f[t]=!1;for(t=n-1,u=n;u>=2;){if(!f[t]){do e=r.rint(0,t-1);while(f[e]);i=o[t],o[t]=o[e],o[e]=i,r.rnd()<(u-1)*l/c&&(f[e]=!0,u--,a--,s/=a,c=C(s+1/L),l=C((s/(a*(a-1))+1)/L)),u--,a--,s/=a,c=C(s+1/L),l=C((s/(a*(a-1))+1)/L)}t--}return o}}}),o=r.Combination=p(e,{constructor:function Hn(r,n){var t=this;return t instanceof Hn?void e.call(t,[r,n]):new Hn(r,n)},__static__:{count:function(r){return wn(r[0],r[1])},dual:function(r,n){return un(r,n[0])},rank:function(r,n,t){var e,u,i,o,f,a=0;for(o=n[1],n=n[0],f=t?t:wn(n,o),e=1;o>=e;e++)u=n-1-r[e-1],i=o+1-e,a+=u>=i?wn(u,i):0;return f-1-a},unrank:function(r,n,t){var e,u,i,o,f,a,s=this;if(t=t||wn(n[0],n[1]),0===r)e=s.first(n);else if(t===r+1)e=s.last(n);else{i=n[1],n=n[0],e=new Array(i),u=t,r=u-1-r,u=(n-i)*u/n,f=n-i+1,o=i,a=n-1;do r>=u?(e[i-o]=n-f-o+1,u>0&&(r-=u,u=o*u/a),o--,a--):(u=(a-o)*u/a,f--,a--);while(o>0)}return e},first:function(r){var n,t=r[1],e=new Array(t);for(n=0;t>n;n++)e[n]=n;return e},last:function(r){var n,t=r[1],e=new Array(t);for(r=r[0],n=0;t>n;n++)e[t-1-n]=r-1-n;return e},succ:function(r,n,t){if(n){var e,u,i,o,f,a=n.slice();if(e=t[1],t=t[0],-1===r){for(u=e-1,i=-1;u>0;){if(a[u]>a[u-1]+1){i=u;break}u--}if(-1===i&&0-1){for(f=t,u=e-1;u>i;u--)a[u]=--f;a[i]--}else a=null}else{for(u=e-1,i=-1,o=t-e;u>=0;){if(a[u]-1)for(f=a[i],u=i;e>u;u++)a[u]=++f;else a=null}return a}return null},rand:function(n){var t,e,u,i,o,f,a;for(e=n[1],n=n[0],t=new Array(e),u=r.rnd(),o=0,a=0,i=1;e>=i;i++){for(o++,f=(e-i+1)/(n-o+1);u>=f&&n-e+i>o;)a=f,o++,f=a+(1-a)*((e-i+1)/(n-o+1));t[i-1]=o-1,u=(u-a)/(f-a)}return t},stochastic:e.stochastic,complement:en,choose:function(r,n){var t,e=n.length,u=new Array(e);for(t=0;e>t;t++)u[t]=r[n[t]];return u},pick:tn,toMatrix:function(r,n,t){var e,u,i,o;for(u=n[1],n=n[0],e=new Array(n),t=!0===t,i=0;n>i;i++)for(e[i]=new Array(n),o=0;n>o;o++)e[i][o]=0;for(i=0;u>i;i++)t?e[r[i]][i]=1:e[i][r[i]]=1;return e},fromMatrix:function(r,n,t){var e,u,i,o;for(u=n[1],n=n[0],e=new Array(u),t=!0===t,i=0;n>i;i++)for(o=0;n>o;o++)r[i][o]&&(t&&u>o?e[o]=i:!t&&u>i&&(e[i]=o));return e}}}),o.conjugate=o.complement,f=r.CombinationRepeat=p(e,{constructor:function Vn(r,n){var t=this;return t instanceof Vn?void e.call(t,[r,n]):new Vn(r,n)},__static__:{count:function(r){return wn(r[0]+r[1]-1,r[1])},dual:o.dual,rank:function(r,n,t){var e,u,i,o,f,a,s=0;for(o=n[1],n=n[0],f=n+o-1,a=t?t:wn(f,o),e=1;o>=e;e++)u=f-1-r[e-1]-e+1,i=o+1-e,s+=u>=i?wn(u,i):0;return a-1-s},unrank:function(r,n,t){var e,u,i,o,f,a,s,c=this;if(t=t||wn(n[0]+n[1]-1,n[1]),0===r)return c.first(n);if(t===r+1)return c.last(n);i=n[1],n=n[0],o=n+i-1,e=new Array(i),u=t,r=u-1-r,u=(o-i)*u/o,a=o-i+1,f=i,s=o-1;do r>=u?(e[i-f]=o-a-i+1,u>0&&(r-=u,u*=f/s),f--,s--):(u*=(s-f)/s,a--,s--);while(f>0);return e},first:function(r){var n,t=r[1],e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r[1],e=new Array(t);for(r=r[0]-1,n=0;t>n;n++)e[n]=r;return e},succ:function(r,n,t){if(n){var e,u,i,o,f=n.slice();if(e=t[1],t=t[0],-1===r){for(u=e-1,i=-1;u>0;){if(f[u]>f[u-1]){i=u;break}u--}if(-1===i&&0-1){for(o=t-1,u=i+1;e>u;u++)f[u]=o;f[i]--}else f=null}else{for(u=e-1,i=-1;u>=0;){if(f[u]-1)for(o=f[i]+1,u=i;e>u;u++)f[u]=o;else f=null}return f}return null},rand:function(n){var t,e,u,i,o,f,a,s;for(e=n[1],n=n[0],t=new Array(e),u=r.rnd(),o=0,a=0,s=n+e-1,i=1;e>=i;i++){for(o++,f=(e-i+1)/(s-o+1);u>=f&&s-e+i>o;)a=f,o++,f=a+(1-a)*(e-i+1)/(s-o+1);t[i-1]=o-i,u=(u-a)/(f-a)}return t},stochastic:o.stochastic}}),a=r.Partition=p(e,{constructor:function Fn(r){var n=this;return n instanceof Fn?void e.call(n,r):new Fn(r)},__static__:{count:function(r){var n,t,e=r>1?2:1;for(n=2;r>n;n++)for(t=r-n+1;t>=1;t--)e+=yn(r,n,t);return e},dual:function(r,n){var t,e,u=[],i=r.length;for(t=0;i>t;t++)if(e=n-r[t],!(0>=e)){if(n===e)return[n];u.unshift(e)}return u},rank:function(r,n,t,e,u){var i,o,f,a=this,s=r.length,c=n;return t=t||a.count(n),e=e||0,u=u||s,o=e,f=r[o],i=c===f?t-1:1===f?0:s>o+1?1+a.rank(r,n-f,t-a.count(n-f),o+1):0},unrank:function(){},first:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=1;return t},last:function(r){return[r]},succ:function(r,n,t){if(n){var e,u,i,o,f,a,s=n.slice();if(-1===r)if(s[0]>1){for(u=s.length,e=u-1;e>=0&&1===s[e];)e--;for(i=s[e]-1,s=s.slice(0,e+1),s[e]=i,f=U(s),a=t-f;a>0;)o=a,o>i?(o=i,s.push(o)):s.push(a),a-=o}else s=null;else if(s[0]0&&e--;e>0&&s[e]===s[e-1];)e--;for(s[e]++,s=s.slice(0,e+1),f=U(s),a=t-f;a>0;)s.push(1),a--}else s=null;return s}return null},rand:function(){},stochastic:e.stochastic,conjugate:function(r){var n,t,e,u=r.length,i=r[0],o=new Array(i);for(n=0;i>n;n++)o[n]=1;for(t=1;u>t;t++)for(n=0,e=r[t];i>n&&e>0;)o[n++]++,e--;return o},pack:function(r){var n,t=[],e=r.length,u=r[0],i=[u,1];for(n=1;e>n;n++)u===r[n]?i[1]++:(t.push(i),u=r[n],i=[u,1]);return t.push(i),t},unpack:function(r){var n,t,e,u,i,o=[],f=r.length;for(n=0;f>n;n++)if(i=r[n],1===i[1])o.push(i[0]);else for(e=i[1],u=i[0],t=0;e>t;t++)o.push(u);return o}}}),a.transpose=a.conjugate,s=r.Powerset=p(e,{constructor:function Gn(r){var n=this;return n instanceof Gn?void e.call(n,r):new Gn(r)},__static__:{count:An,dual:e.dual,rank:function(r){for(var n=0,t=0,e=r.length;e>t;)n+=1<>>0;return n},unrank:function(r){for(var n=[],t=0;0!==r;)1&r&&n.unshift(t),2&r&&n.unshift(t+1),4&r&&n.unshift(t+2),8&r&&n.unshift(t+3),16&r&&n.unshift(t+4),32&r&&n.unshift(t+5),64&r&&n.unshift(t+6),128&r&&n.unshift(t+7),t+=8,r>>>=8;return n},first:function(){return[]},last:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=r-1-n;return t},succ:e.succ,rand:e.rand,stochastic:e.stochastic}}),c=r.Tensor=p(e,{constructor:function Un(){var r=this;return r instanceof Un?void(arguments.length?e.call(r,d.call(arguments)):(r.n=[],r._count=0)):(r=new Un,arguments.length?e.call(r,d.call(arguments)):(r.n=[],r._count=0),r)},__static__:{count:function(r){return r&&r.length?Y(r):0},dual:e.dual,rank:function(r,n){var t,e,u=n,i=u.length;if(!i)return-1;for(t=0,e=0;i>e;e++)t=t*u[e]+r[e];return t},unrank:function(r,n){var t,e,u,i,o,f=n,a=f.length;if(!a)return[];for(o=new Array(a),t=r,u=a-1;u>=0;u--)e=f[u],i=t%e,t=~~(t/e),o[u]=i;return o},first:function(r){var n,t=r.length,e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r,e=t.length,u=new Array(e);for(n=0;e>n;n++)u[n]=t[n]-1;return u},succ:function(r,n,t){if(n){var e,u,i=n.slice(),o=t,f=o.length;if(-1===r){for(e=f-1;e>=0&&i[e]-1<0;)e--;if(e>=0)for(i[e]--,u=e+1;f>u;u++)i[u]=o[u]-1;else i=null}else{for(e=f-1;e>=0&&i[e]+1===o[e];)e--;if(e>=0)for(i[e]++,u=e+1;f>u;u++)i[u]=0;else i=null}return i}return null},rand:function(n){var t,e=n,u=e.length,i=new Array(u);for(t=0;u>t;t++)i[t]=r.rint(0,e[t]-1);return i},stochastic:e.stochastic,product:$,component:function(r,n){var t,e,u,i,o,f,a=[],s=n,c=s.length;for(t=0;c>t;t++)if(u=s[t],o=r[t],i=u[o],i instanceof Array)for(e=0,f=i.length;f>e;e++)a.push(i[e]);else a.push(i);return a}}}),l=r.Tuple=p(e,{constructor:function Yn(r,n){var t=this;return t instanceof Yn?void e.call(t,[r||1,n||2]):new Yn(r,n)},__static__:{count:function(r){return xn(r[1],r[0])},dual:function(r,n){return un(r,n[1])},rank:function(r,n){var t,e,u=n[0];for(n=n[1],t=0,e=0;u>e;e++)t=t*n+r[e];return t},unrank:function(r,n){var t,e,u,i,o,f=n[0];for(n=n[1],o=new Array(f),t=r,u=f-1;u>=0;u--)e=n,i=t%e,t=~~(t/e),o[u]=i;return o},first:function(r){var n,t=r[0],e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r[0],e=new Array(t);for(r=r[1]-1,n=0;t>n;n++)e[n]=r;return e},succ:function(r,n,t){if(n){var e,u,i=n.slice(),o=t[0],t=t[1];if(-1===r){for(e=o-1;e>=0&&i[e]-1<0;)e--;if(e>=0)for(i[e]--,u=e+1;o>u;u++)i[u]=t-1;else i=null}else{for(e=o-1;e>=0&&i[e]+1===t;)e--;if(e>=0)for(i[e]++,u=e+1;o>u;u++)i[u]=0;else i=null}return i}return null},rand:function(n){var t,e=n[0],u=new Array(e);for(n=n[1]-1,t=0;e>t;t++)u[t]=r.rint(0,n);return u},stochastic:c.stochastic}}),r.Magic=_n,r.Magic.product=dn,r.Magic.pythagorean=vn,r.Magic.test=mn,r.Latin=hn,r}); \ No newline at end of file +!function(r,n,t){"use strict";var e;"undefined"!=typeof Components&&"object"==typeof Components.classes&&"object"==typeof Components.classesByID&&Components.utils&&"function"==typeof Components.utils["import"]?(r.EXPORTED_SYMBOLS=[n])&&(r[n]=t.call(r)):"object"==typeof module&&module.exports?module.exports=t.call(r):"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified(n)?define(n,["require","exports","module"],function(){return t.call(r)}):n in r||(r[n]=e=t.call(r))&&"function"==typeof define&&define.amd&&define(function(){return e})}(this,"Abacus",function(){"use strict";var r,n,t,e,u,i,o,f,a,s,c,l="prototype",h="constructor",_="hasOwnProperty",v=Array.prototype.slice,d=Object.create,m=function(r,n){for(var t in n)n[_](t)&&(r[t]=n[t]);return r},g=function(r,n){1===arguments.length&&(n=r,r=Object);var t=n[h];return n[_]("__static__")&&(t=m(t,n.__static__),delete n.__static__),t[l]=m(d(r[l]),n),t},p=[24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,20922789888e3,355687428095998,6402373705727994,0x1b02b9306890050],w=[3,6,4,10,10,5,15,20,15,6,21,35,35,21,7,28,56,70,56,28,8,36,84,126,126,84,36,9,45,120,210,252,210,120,45,10,55,165,330,462,462,330,165,55,11,66,220,495,792,924,792,495,220,66,12,78,286,715,1287,1716,1716,1287,715,286,78,13,91,364,1001,2002,3003,3432,3003,2002,1001,364,91,14,105,455,1365,3003,5005,6435,6435,5005,3003,1365,455,105,15,120,560,1820,4368,8008,11440,12870,11440,8008,4368,1820,560,120,16,136,680,2380,6188,12376,19448,24310,24310,19448,12376,6188,2380,680,136,17,153,816,3060,8568,18564,31824,43758,48620,43758,31824,18564,8568,3060,816,153,18,171,969,3876,11628,27132,50388,75582,92378,92378,75582,50388,27132,11628,3876,969,171,19,190,1140,4845,15504,38760,77520,125970,167960,184756,167960,125970,77520,38760,15504,4845,1140,190,20,210,1330,5985,20349,54264,116280,203490,293930,352716,352716,293930,203490,116280,54264,20349,5985,1330,210,21,231,1540,7315,26334,74613,170544,319770,497420,646646,705432,646646,497420,319770,170544,74613,26334,7315,1540,231,22],y=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,11,40,64,80,76,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,24,56,87,90,84,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,36,78,97,97,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,51,86,102,87,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,21,63,96,92,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,25,68,86,86,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,35,67,85,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,34,71,65,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,42,58,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,36,53,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,42,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,31,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0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,9,35,69,86,92,81,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,62,92,110,101,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,36,78,114,115,104,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,49,100,119,117,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,64,104,120,101,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,27,75,111,105,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,30,78,97,96,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,40,75,94,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,38,78,71,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,46,63,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,39,57,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,45,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,33,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0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,8,34,70,101,104,101,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,56,103,121,125,107,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,31,88,124,142,128,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,51,102,143,140,125,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,64,122,142,137,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,21,78,122,138,115,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,33,87,126,118,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,35,88,108,106,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,45,83,103,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,42,85,77,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,50,68,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,42,61,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,48,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,35,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,23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,5,30,71,103,123,116,106,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,15,57,106,145,144,136,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,28,83,141,160,160,135,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,45,117,158,176,155,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,67,128,172,166,146,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,79,145,165,157,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,27,92,140,156,129,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,39,99,141,131,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,40,98,119,116,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,50,91,112,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,46,92,83,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,54,73,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,45,65,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,51,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,37,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22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,4,29,71,113,135,141,125,112,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,52,112,152,174,159,142,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,26,86,150,194,188,173,143,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,43,114,183,201,197,163,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,62,148,194,210,183,156,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,85,154,202,192,167,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,28,95,168,188,177,141,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,33,106,158,174,143,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,45,111,156,144,130,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,45,108,130,126,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,55,99,121,99,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,50,99,89,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,58,78,83,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,48,69,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,54,57,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,39,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,43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,3,23,69,117,151,157,153,130,112,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,0,9,52,114,171,194,197,170,149,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,1,21,82,161,209,230,206,180,143,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,40,121,198,247,234,212,172,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,60,148,227,244,234,192,156,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,80,181,230,245,211,178,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,103,181,232,218,188,141,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,35,111,191,211,197,156,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,39,120,176,192,157,130,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,51,123,171,157,141,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,50,118,141,136,99,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,60,107,130,106,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,54,106,95,83,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,62,83,88,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,51,73,57,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,57,60,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,41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,2,21,66,123,163,183,175,162,136,112,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,0,8,44,116,181,223,223,212,176,149,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,1,18,83,169,239,262,258,219,188,143,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,2,35,118,218,271,290,255,220,172,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,58,160,250,302,282,251,202,156,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,80,184,273,287,272,221,178,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,100,214,267,280,239,200,141,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,28,122,208,262,244,209,156,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,42,127,214,234,217,171,130,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,45,134,194,210,171,141,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,57,135,186,170,152,99,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,55,128,152,146,106,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,65,115,139,113,83,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,58,113,101,88,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,66,88,93,57,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,54,77,60,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,60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,1,17,62,122,176,201,205,187,167,136,112,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,0,5,42,113,196,245,265,246,223,183,149,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,0,16,74,175,259,305,298,276,226,188,143,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,0,2,30,123,232,315,335,323,270,229,172,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,0,4,52,160,279,337,352,306,260,202,156,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,78,202,304,359,330,291,232,178,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,101,222,319,331,310,250,200,141,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,120,248,304,315,267,222,156,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,35,141,235,292,270,230,171,130,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,49,143,237,257,237,186,141,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,51,148,212,228,185,152,99,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,63,147,201,183,163,106,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,60,138,163,156,113,83,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,70,123,148,120,88,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,62,120,107,93,57,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,70,93,98,60,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,57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,1,15,58,127,185,227,233,223,196,173,136,112,87,70,52,42,29,23,15,11,6,7,0,0,0,0,0,0,0,0,0,0,4,35,112,199,272,297,294,261,229,183,149,114,91,66,53,36,28,18,13,7,8,0,0,0,0,0,0,0,0,0,0,0,12,73,177,285,343,358,326,289,234,188,143,112,81,64,43,33,21,15,8,9,0,0,0,0,0,0,0,0,0,0,0,1,28,113,247,347,396,378,344,278,229,172,134,96,75,50,38,24,17,9,10,0,0,0,0,0,0,0,0,0,0,0,0,4,47,169,303,396,412,390,323,270,202,156,111,86,57,43,27,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,7,73,206,344,405,416,357,301,232,178,126,97,64,48,30,21,11,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,101,246,360,416,379,331,262,200,141,108,71,53,33,23,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,124,260,366,375,348,279,222,156,119,78,58,36,25,13,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,36,141,282,341,350,295,244,171,130,85,63,39,27,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,42,160,262,322,296,251,186,141,92,68,42,29,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,56,159,260,280,257,201,152,99,73,45,31,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,57,162,230,246,199,163,106,78,48,33,17,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,69,159,216,196,174,113,83,51,35,18,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,65,148,174,166,120,88,54,37,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,75,131,157,127,93,57,39,20,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,66,127,113,98,60,41,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,74,98,103,63,43,22,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,60,85,66,45,23,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,66,69,47,24,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,47,49,25,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,51,26,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,27,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],A=Math.random,x=Math.round,k=Math.ceil,C=Math.floor,E=Math.exp,b=Math.log,M=Math.pow,I=(Math.abs,Math.min),O=Math.max,R=Math.sqrt,L=Math.E,P=(Math.PI,R(5),Math.log2||function(r){return Math.log(r)/Math.LN2 +}),S=function(r,n){return x((n-r)*A()+r)},X=function(r){return function(n){var t,e;return e=n.toString(2),(t=r-e.length)>0&&(e=new Array(t+1).join("0")+e),e}},N=X(32),j=function(r){var n,t=r.length,e=15&t,u=1&e,i=u?r[0]:0;for(n=u;e>n;n+=2)i+=r[n]+r[n+1];for(n=e;t>n;n+=16)i+=r[n]+r[n+1]+r[n+2]+r[n+3]+r[n+4]+r[n+5]+r[n+6]+r[n+7]+r[n+8]+r[n+9]+r[n+10]+r[n+11]+r[n+12]+r[n+13]+r[n+14]+r[n+15];return i},T=function(r){var n,t=r.length,e=15&t,u=1&e,i=u?r[0]:1;for(n=u;e>n;n+=2)i*=r[n]*r[n+1];for(n=e;t>n;n+=16)i*=r[n]*r[n+1]*r[n+2]*r[n+3]*r[n+4]*r[n+5]*r[n+6]*r[n+7]*r[n+8]*r[n+9]*r[n+10]*r[n+11]*r[n+12]*r[n+13]*r[n+14]*r[n+15];return i},D=function(r,n,t,e,u,i){var o=r.length;if(arguments.length<5&&(u=o-1),0>u&&(u+=o),arguments.length<4&&(e=0),e>u)return t;if(!0===i){var f,a,s=u-e+1,c=s-1,l=15&s,h=1&l,_=c-l,v=h?n(t,r[u],u):t;for(f=c-h;f>_;f-=2)a=e+f,v=n(n(v,r[a],a),r[a-1],a-1);for(f=_;f>=0;f-=16)a=e+f,v=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(v,r[a],a),r[a-1],a-1),r[a-2],a-2),r[a-3],a-3),r[a-4],a-4),r[a-5],a-5),r[a-6],a-6),r[a-7],a-7),r[a-8],a-8),r[a-9],a-9),r[a-10],a-10),r[a-11],a-11),r[a-12],a-12),r[a-13],a-13),r[a-14],a-14),r[a-15],a-15)}else{var f,a,s=u-e+1,l=15&s,h=1&l,v=h?n(t,r[e],e):t;for(f=h;l>f;f+=2)a=e+f,v=n(n(v,r[a],a),r[a+1],a+1);for(f=l;s>f;f+=16)a=e+f,v=n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(n(v,r[a],a),r[a+1],a+1),r[a+2],a+2),r[a+3],a+3),r[a+4],a+4),r[a+5],a+5),r[a+6],a+6),r[a+7],a+7),r[a+8],a+8),r[a+9],a+9),r[a+10],a+10),r[a+11],a+11),r[a+12],a+12),r[a+13],a+13),r[a+14],a+14),r[a+15],a+15)}return v},H=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return[];var o,f,a,s,c,l,h=e-t+1,_=new Array(h);if(!0===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&(_[0]=n(r[e],e,t,e)),o=a-l;o>s;o-=2)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f-1],f-1,t,e);for(o=s;o>=0;o-=16)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f-1],f-1,t,e),_[o+2]=n(r[f-2],f-2,t,e),_[o+3]=n(r[f-3],f-3,t,e),_[o+4]=n(r[f-4],f-4,t,e),_[o+5]=n(r[f-5],f-5,t,e),_[o+6]=n(r[f-6],f-6,t,e),_[o+7]=n(r[f-7],f-7,t,e),_[o+8]=n(r[f-8],f-8,t,e),_[o+9]=n(r[f-9],f-9,t,e),_[o+10]=n(r[f-10],f-10,t,e),_[o+11]=n(r[f-11],f-11,t,e),_[o+12]=n(r[f-12],f-12,t,e),_[o+13]=n(r[f-13],f-13,t,e),_[o+14]=n(r[f-14],f-14,t,e),_[o+15]=n(r[f-15],f-15,t,e)}else{for(c=15&h,l=1&c,l&&(_[0]=n(r[t],t,t,e)),o=l;c>o;o+=2)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f+1],f+1,t,e);for(o=c;h>o;o+=16)f=t+o,_[o]=n(r[f],f,t,e),_[o+1]=n(r[f+1],f+1,t,e),_[o+2]=n(r[f+2],f+2,t,e),_[o+3]=n(r[f+3],f+3,t,e),_[o+4]=n(r[f+4],f+4,t,e),_[o+5]=n(r[f+5],f+5,t,e),_[o+6]=n(r[f+6],f+6,t,e),_[o+7]=n(r[f+7],f+7,t,e),_[o+8]=n(r[f+8],f+8,t,e),_[o+9]=n(r[f+9],f+9,t,e),_[o+10]=n(r[f+10],f+10,t,e),_[o+11]=n(r[f+11],f+11,t,e),_[o+12]=n(r[f+12],f+12,t,e),_[o+13]=n(r[f+13],f+13,t,e),_[o+14]=n(r[f+14],f+14,t,e),_[o+15]=n(r[f+15],f+15,t,e)}return _},q=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return[];var o,f,a,s,c,l,h=e-t+1,_=[];if(trye===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&n(r[e],e,r)&&_.push(r[e]),o=a-l;o>s;o-=2)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]);for(o=s;o>=0;o-=16)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f]),n(r[--f],f,r)&&_.push(r[f])}else{for(c=15&h,l=1&c,l&&n(r[t],t,r)&&_.push(r[t]),o=l;c>o;o+=2)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]);for(o=c;h>o;o+=16)f=t+o,n(r[f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f]),n(r[++f],f,r)&&_.push(r[f])}return _},G=function(r,n,t,e,u){var i=r.length;if(arguments.length<4&&(e=i-1),0>e&&(e+=i),arguments.length<3&&(t=0),t>e)return r;var o,f,a,s,c,l,h=e-t+1;if(!0===u){for(a=h-1,c=15&h,l=1&c,s=a-c,l&&n(r[e],e,r,t,e),o=a-l;o>s;o-=2)f=t+o,n(r[f],f,r,t,e),n(r[--f],f,r,t,e);for(o=s;o>=0;o-=16)f=t+o,n(r[f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e),n(r[--f],f,r,t,e)}else{for(c=15&h,l=1&c,l&&n(r[t],t,r,t,e),o=l;c>o;o+=2)f=t+o,n(r[f],f,r,t,e),n(r[++f],f,r,t,e);for(o=c;h>o;o+=16)f=t+o,n(r[f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e),n(r[++f],f,r,t,e)}return r},V=function(r,n){for(var t=0,e=0,u=[],i=r.length,o=n.length;i>t&&o>e;)r[t]n[e]?e++:(u.push(r[t]),t++,e++);return u},B=function(r,n,t){var e,u,i=0,o=0,f=[],a=r.length,s=n.length;for(t=!1!==t,u=!t;a>i&&s>o;){if(t&&f.length){if(r[i]===e){i++;continue}if(n[o]===e){o++;continue}}r[i]n[o]?f.push(e=n[o++]):(f.push(e=r[i]),u&&f.push(n[o]),i++,o++)}for(;a>i;)(u||r[i]!==e)&&f.push(e=r[i++]);for(;s>o;)(u||n[o]!==e)&&f.push(e=n[o++]);return f},U=function(){var r,n,t,e,u,i,o,f,a,s,c=arguments,l=c.length;if(!l)return[];for(a=c[0].length,r=1;l>r;r++)a*=c[r].length;for(s=new Array(a),r=0;a>r;r++){for(f=[],t=r,n=l-1;n>=0;n--)if(e=c[n].length,u=t%e,t=~~(t/e),o=c[n][u],o instanceof Array)for(i=o.length-1;i>=0;i--)f.unshift(o[i]);else f.unshift(o);s[r]=f}return s},F=function(){},Y=function(n,t,e){var u,i,o,f,a;for(f=!0===e?n.slice():n,a=!0===t?1:0,u=f.length;ao;o++)f=r.rint(0,--s),a=n[f],n[f]=n[s],n[s]=a,u[o]=a,e&&(i[o]=f);if(e)for(o=t-1;o>=0;o--)f=i[o],a=n[s],n[s]=n[f],n[f]=a,s++;return u},J=function(r,n){var t,e,u,i,o=r.length;for(t=new Array(n-o),e=0,u=0,i=0;n>e;)u>=o||et;t++)u[e-1-t]=n[t]-1-r[t];else for(t=0;e>t;t++)u[e-1-t]=n-1-r[t];return u},Q=function(r){var n,t=[],e=r.length;if(e>1)for(n=e-1;n>=1;n--)t.push([r[0],r[n]]);return t},W=function(r){var n,t,e=1,u=new Array(r);for(n=0;r>n;n++)for(u[n]=new Array(r),t=0;r>t;t++)u[n][t]=e++;return u},Z=function(r){var n,t,e=r.length,u=new Array(e);for(n=0;e>n;n++)u[n]=new Array(e);for(n=0;e>n;n++)for(t=0;e>t;t++)u[t][n]=r[n][t];return u},$=function Cn(r){var n=r.length,t=1&n,e=n-t>>1;return n>2?Cn(r.slice(-e,n)).concat(r.slice(0,e)):[r[1],r[0]]},rn=function(r){return Z($(Z(r)))},nn=function(r,n,t,e){var u,i,o=r.length;for(u=0;o>u;u++)for(i=0;o>i;i++)n[t+u][e+i]=r[u][i];return n},tn=function(r){var n,t,e=new Array(r);for(e[0]=new Array(r),t=0;r>t;t++)e[0][t]=t+1;for(n=1;r>n;n++)for(e[n]=new Array(r),t=0;r>t;t++)e[n][t]=e[0][(t+n)%r];return e},en=function(r,n){if(0>r)return null;if(0===r||1===r)return[[r]];var t,e,u,i,o,f,a,s,c,l,h=new Array(r),_=1&r,v=1-_,d=0===(3&r),m=r*r,g=r-_>>>1;for(t=0;r>t;t++)h[t]=new Array(r);if(n)for(o=0,t=0,e=0;m>o;o++,e++)e>=r&&(t++,e=0),h[t][e]=n[(a+e-t)%r][(s+t+e)%r];else if(d)for(c=~~Math.sqrt(r),l=W(r),nn(l,h,0,0),nn(rn($(l)),h,0,c),nn(rn(l),h,c,0),nn($(l),h,c,c),u=0;c>u;u++)for(i=0;c>i;i++)for(f=(l[u][i]-1)*c,t=0;c>t;t++)for(e=0;c>e;e++)h[u+t][i+e]+=f;else if(v);else for(a=r+g,s=g+_,o=0,t=0,e=0;m>o;o++,e++)e>=r&&(t++,e=0),h[t][e]=(a+e-t)%r*r+(s+t+e)%r+1;return h},un=function(){},on=function(){for(var r,n,t,e,u,i,o,f,a,s,c,l,h,_=arguments,v=_.length,d=_[0],m=1;v>m;){for(r=d,n=_[m++],e=r.length,u=n.length,i=u*u,o=e*u,d=new Array(o),f=0;o>f;f++)d[f]=new Array(o);for(s=0,f=0,l=0,a=0,c=0,h=0,t=(r[s][l]-1)*i;e>s;)d[f+c][a+h]=t+n[c][h],++h>=u&&(c++,h=0,c>=u&&(l++,a+=u,c=0,h=0,l>=e&&(s++,f+=u,l=0,a=0,c=0,h=0),t=(r[s][l]-1)*i))}return d},fn=function(r){var n,t,e,u,i,o,f,a=r.length,s=a*a,c=a*s+a>>>1,l=new Array(s);for(echo(c),n=0;s>n;n++)l[n]=null;for(o=0,f=0,n=0;a>n;n++){if(e=r[n][0],l[e-1]||(l[e-1]=[n,0]),1>e||e>s||n!==l[e-1][0]&&0!==l[e-1][1])return!1;if(u=e,e=r[0][n],l[e-1]||(l[e-1]=[0,n]),1>e||e>s||0!==l[e-1][0]&&n!==l[e-1][1])return!1;for(i=e,o+=r[n][n],f+=r[n][a-1-n],t=1;a>t;t++){if(e=r[n][t],l[e-1]||(l[e-1]=[n,t]),1>e||e>s||n!==l[e-1][0]&&t!==l[e-1][1])return!1;if(u+=e,e=r[t][n],l[e-1]||(l[e-1]=[t,n]),1>e||e>s||t!==l[e-1][0]&&n!==l[e-1][1])return!1;i+=e}if(u!==c||i!==c)return!1}return o!==c||f!==c?!1:!0},an=function(r){if(0>r)return 0;if(2>r)return 1;if(4>r)return r<r)return p[r-4];for(var n=b(p[15]);r>=20;)n+=b(r--);return C(.5+E(n))},sn=function(r){return C(.5+an(r)/L)},cn=function(r,n){if(n>r-n&&(n=r-n),0>n||1>r)return 0;if(0===n||1===r)return 1;if(1===n)return r;if(23>r)return w[((r-3)*(r-2)>>>1)+n-2];var t,e=r-n,u=1+e;for(t=2;n>=t;t++)u*=1+e/t;return C(.5+u)},ln=function En(r,n,t,e){if(t===r&&1===n||n===r&&1===t)return 1;if(t+n>r+1||r>n*t)return 0;if(32>=r&&32>=n&&32>=t)return y[(r-1<<10)+(n-1<<5)+t-1];var u,i,o=I(t,r-t-n+2),f=O(1,k((r-t)/(n-1))),a=0;for(null==e&&(e={}),u=f;o>=u;u++)i=r-t+","+(n-1)+","+u,null==e[i]&&(e[i]=En(r-t,n-1,u,e)),a+=e[i];return a},hn=function(r){return 1<>>0},_n=function(r,n){return M(r,n)},vn=8,dn=16,mn=32,gn=64,pn=128,wn=256,yn=512,An=vn|dn|mn|gn|pn|wn|yn,xn=function(n){return arguments.length&&null!=n?n.substr?(n=n.toUpperCase(),r.ORDER[_](n)?r.ORDER[n]:vn):(An&n||(n=vn),n):vn},kn=function(r){return arguments.length?function(){throw new Error('"'+r+'" not implemented')}:function(){throw new Error("Method not implemented")}};return r={VERSION:"0.1.0",rnd:A,rint:S,Factorial:an,SubFactorial:sn,Binomial:cn,Partitions:ln,shuffle:Y,pick:z,operate:D,map:H,filter:q,each:G,intersection:V,union:B,kronecker:U,cartesian:F},r.ORDER={LEX:vn,LEXICOGRAPHIC:vn,REVLEX:dn,ANTILEX:dn,REVERSELEXICOGRAPHIC:dn,ANTILEXICOGRAPHIC:dn,COLEX:mn,COLEXICOGRAPHIC:mn,REVCOLEX:gn,ANTICOLEX:gn,REVERSECOLEXICOGRAPHIC:gn,ANTICOLEXICOGRAPHIC:gn,RANDOM:wn,RANDOMISED:wn,STOCHASTIC:yn},n=r.BitArray=g({constructor:function bn(r){var n=this;return n instanceof bn?(n.length=r,void(n.bits=new Uint32Array(k(r/32)))):new bn(r)},length:0,bits:null,dispose:function(){var r=this;return r.length=null,r.bits=null,r},clone:function(){var r=this,t=new n(r.length);return t.bits=new Uint32Array(r.bits),t},fromArray:function(r){var n=this;return n.bits=new Uint32Array(r),n},toArray:function(){return v.call(this.bits)},toString:function(){return H(this.toArray(),N).join("")},reset:function(){var r,n=this,t=n.bits,e=t.length;for(r=0;e>r;r++)t[r]=0;return n},isset:function(r){return!!(this.bits[r>>>5]&1<<(31&r))},set:function(r){var n=this;return n.bits[r>>>5]|=1<<(31&r),n},unset:function(r){var n=this;return n.bits[r>>>5]&=~(1<<(31&r)),n},toggle:function(r){var n=this;return n.bits[r>>>5]^=1<<(31&r),n}}),t=r.CombinatorialIterator=g({constructor:function Mn(r){var n,t=this;return t instanceof Mn?(n=t[h],t.n=r||0,t._count=n.count(t.n),void t.order(vn)):new Mn(r)},__static__:{count:kn(),dual:function(r,n){return 0>=n?[]:K(r,n)},rank:kn(),unrank:kn(),first:kn(),last:kn(),succ:function(r,n,t,e){var u=this;return-1!==r&&1!==r&&(r=1),n?u.unrank(u.rank(n,t,e)+r,t,e):null},rand:function(n,t){var e=this,u=t?t:e.count(n),i=r.rint(0,u-1);return 0===i?e.first(n):i+1===u?e.last(n):e.unrank(i,n,u)},stochastic:kn()},n:0,_order:0,_count:0,_index:null,__item:null,_item:null,_prev:null,_next:null,_traversed:null,_stochastic:null,dispose:function(){var r=this;return r.n=null,r._order=null,r._count=0,r._index=null,r.__item=null,r._item=null,r._prev=null,r._next=null,r._stochastic=null,r._traversed&&(r._traversed.dispose(),r._traversed=null),r},_store:function(){var r=this;return[r._order,r._index,r.__item,r._item,r._prev,r._next]},_restore:function(r){var n=this;return r&&(n._order=r[0],n._index=r[1],n.__item=r[2],n._item=r[3],n._prev=r[4],n._next=r[5]),n},total:function(){return this._count},order:function(r,t,e){var u,i,o,f=this,a=f[h];if(arguments.length){if(r=xn(r),f._order=r,f._index=0,f._item=f.__item=null,f._prev=!1,f._next=!1,i=f._count,o=f.n,yn&r)if(null==f._stochastic||t){if(!t)throw new Error("No Stochastic Transition Matrix given!");f._stochastic=[t,e?1:0,e?[]:null],f._item=f.__item=a.stochastic(f._stochastic[0],o,f._stochastic[2])}else null!=f._stochastic[2]&&(f._stochastic[2]=[]),f._item=f.__item=a.stochastic(f._stochastic[0],o,f._stochastic[2]);else wn&r?(f._traversed?f._traversed.reset():f._traversed=new n(i),f._traversed.set(u=f.randomIndex()),f._item=f.__item=f.item(u,vn)):gn&r?(f.__item=a.first(o),f._item=a.dual(f.__item,o,gn)):mn&r?(f.__item=a.last(o),f._item=a.dual(f.__item,o,mn)):f._item=f.__item=dn&r?a.last(o):a.first(o);return f._next=null!=f._item,f}return f._order},index:function(r){var n,t,e,u=this,i=u[h];return arguments.length?(n=u.n,t=u._count,e=u._order,0>r&&(r+=t),r>=0&&t>r&&(gn&e?(u._index=r,u.__item=0===r?i.first(n):t===r+1?i.last(n):i.unrank(r,n,t),u._item=i.dual(u.__item,n,gn)):mn&e?(u._index=r,u.__item=0===r?i.last(n):t===r+1?i.first(n):i.unrank(t-1-r,n,t),u._item=i.dual(u.__item,n,mn)):dn&e?(u._index=r,u._item=u.__item=0===r?i.last(n):t===r+1?i.first(n):i.unrank(t-1-r,n,t)):vn&e&&(u._index=r,u._item=u.__item=0===r?i.first(n):t===r+1?i.last(n):i.unrank(r,n,t))),u):u._index},item:function(r,n){if(!arguments.length)return this._item;var t,e,u=this,i=u.n,o=u._count,f=u[h];if(n=null!=n?xn(n):u._order,0>r&&(r+=o),r>=0&&o>r){if(wn&n){for(t=u._traversed;t.isset(e=u.randomIndex()););return t.set(e),f.unrank(e,i,o)}return gn&n?f.dual(0===r?f.first(i):o===r+1?f.last(i):f.unrank(r,i,o),i,gn):mn&n?f.dual(0===r?f.last(i):o===r+1?f.first(i):f.unrank(o-1-r,i,o),i,mn):dn&n?0===r?f.last(i):o===r+1?f.first(i):f.unrank(o-1-r,i,o):0===r?f.first(i):o===r+1?f.last(i):f.unrank(r,i,o)}return null},randomIndex:function(n,t){var e=this,u=e._count,i=arguments.length;return 0===i?(n=0,t=u-1):1===i&&(n=n||0,t=u-1),r.rint(n,t)},random:function(){var r=this,n=r[h];return n.rand(r.n,r._count)},rewind:function(){var r=this;return r.order(r._order),r._prev=!1,r},hasNext:function(){return yn&this._order?!0:this._next},next:function(){var r,n,t=this,e=t._order,u=t[h],i=t._item,o=t.n,f=t._count;if(yn&e)t._item=t.__item=u.stochastic(t._stochastic[0],o,t._stochastic[2]);else if(wn&e)if(t._index+1=0,r._next=!1,r},hasPrev:function(){return(wn|yn)&this._order?!1:this._prev},prev:function(){var r=this,n=r._order,t=r[h],e=r._item,u=r.n,i=r._count;return(wn|yn)&n?null:(gn&n?(r.__item=t.succ(-1,r.__item,u,i),r._item=t.dual(r.__item,u,gn)):mn&n?(r.__item=t.succ(1,r.__item,u,i),r._item=t.dual(r.__item,u,mn)):r._item=r.__item=dn&n?t.succ(1,r.__item,u,i):t.succ(-1,r.__item,u,i),r._prev=null!=r._item,r._prev&&--r._index,e)},range:function(r,n){var t,e,u,i,o,f=this,a=f._count,s=1,c=arguments.length;if(1>c?(r=0,n=a-1):2>c&&(n=a-1),0>r&&(r+=a),0>n&&(n+=a),r>n&&(t=r,r=n,n=t,s=-1),0>r&&(r=0),n>=a&&(n=a-1),n>=r){if(o=f._store(),(yn|wn)&f._order||f.index(r),u=n-r,e=new Array(u+1),0>s)for(i=u;i>=0;i--)e[i]=f.next();else for(i=0;u>=i;i++)e[i]=f.next();f._restore(o)}else e=[];return e}}),e=r.Permutation=g(t,{constructor:function In(r){var n=this;return n instanceof In?void t.call(n,r):new In(r)},__static__:{count:an,dual:t.dual,rank:function(r,n){var t,e,u,i,o=0,f=k(P(n)),a=(1<<1+f)-1,s=new Array(a),c=1<t;t++)s[t]=0;for(t=0;n>t;t++){for(i=r[t],u=c+i,e=0;f>e;e++)1&u&&(i-=s[u>>>1<<1]),s[u]++,u>>>=1;s[u]++,o=o*(n-t)+i}return o},unrank:function(r,n,t){t=t||an(n);var e,u,i,o,f,a,s,c,l,h,_,v,d=this;if(0===r)return d.first(n);if(t===r+1)return d.last(n);for(e=new Array(n),u=t/n,l=k(P(n)),h=(1<<1+l)-1,_=new Array(h),v=1<=i;i++)for(o=1,f=1<=o;o++)_[f-1+o]=1<i;i++){for(a=~~(r/u),s=1,o=0;l>o;o++)_[s]--,s<<=1,a>=_[s]&&(a-=_[s],s++);_[s]=0,e[i]=s-v,c&&(r%=u,u/=c,c--)}return e},first:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=n;return t},last:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=r-1-n;return t},succ:function(r,n,t){if(n){var e,u,i,o,f,a=n.slice();if(-1===r){for(e=t-2;e>=0&&a[e]<=a[e+1];)e--;if(e>=0){for(u=t-1;u>e&&a[e]<=a[u];)u--;for(f=a[e],a[e]=a[u],a[u]=f,i=e+1,o=t-1;o>i;)f=a[i],a[i++]=a[o],a[o--]=f}else a=null}else{for(e=t-2;e>=0&&a[e]>=a[e+1];)e--;if(e>=0){for(u=t-1;u>e&&a[e]>=a[u];)u--;for(f=a[e],a[e]=a[u],a[u]=f,i=e+1,o=t-1;o>i;)f=a[i],a[i++]=a[o],a[o--]=f}else a=null}return a}return null},rand:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=n;return Y(t)},stochastic:function(n,t,e){if(n.length!==t||n[0].length!==t)throw new Error("Stochastic Matrix dimensions and Permutation dimensions do not match!");var u,i,o,f,a,s,c,l,h=new Array(t),_=new Array(t),v=0,d=!1;for(i=0;t>i;i++)_[i]=0;if(e){if(d=!0,!e.length){for(e.N=0,u=new Array(t),i=0;t>i;i++)u[i]=0;for(i=0;t>i;i++)e.push(u.slice())}v=++e.N}for(l=!d,i=0;t>i;)for(f=r.rnd(),c=0,a=n[i],d&&(s=e[i]),o=0;t>o;o++){if(f>c&&f<=c+a[o]){0===_[o]&&(l||s[o]+1<=(v+1)*a[o])&&(_[o]=1,h[i]=o,d&&s[o]++,i++);break}c+=a[o]}return h},inverse:function(r,n){n=n||r.length;var t,e=new Array(n);for(t=0;n>t;t++)e[r[t]]=t;return e},compose:function(){var r,n,t,e=arguments,u=e.length,i=u?e[0]:[],o=i.length;for(n=1;u>n;n++)for(t=i.slice(),r=0;o>r;r++)i[r]=t[e[n][r]];return i},permute:function(r,n,t){var e,u,i,o=r.length;for(!0===t?(u=new Array(o),i=r):(u=r,i=r.slice()),e=0;o>e;e++)u[e]=i[n[e]];return u},reassign:function(r,n){var t,e=r.length,u=new Array(e);for(t=0;e>t;t++)u[t]=n[r[t]];return u},shuffle:Y,toCycles:function(r,n,t){n=n||r.length;var e,u,i,o=[],f=!0===t?1:0,a=new Array(n),s=new Array(n);for(e=0;n>e;e++)s[e]=e,a[e]=0;for(i=[u=s.shift()],a[u]=1;s.length;){if(u=r[u],a[u])for(i.length>f&&o.push(i),i=[];s.length&&a[u=s.shift()];);a[u]||(i.push(u),a[u]=1)}return i.length>f&&o.push(i),o},fromCycles:function(r,n){var t,e,u,i,o=new Array(n),f=r.length;for(e=0;n>e;e++)o[e]=e;for(t=0;f>t;t++)if(i=r[t],u=i.length,!(2>u)){for(e=0;u-1>e;e++)o[i[e]]=i[e+1];o[i[u-1]]=i[0]}return o},toSwaps:function(r,n){n=n||r.length;var t,u,i,o=[],f=e.toCycles(r,n,!0);for(t=0,u=f.length;u>t;t++)i=f[t],o=o.concat(Q(i));return o},fromSwaps:function(r,n){var t,e,u,i=r.length,o=new Array(n);for(t=0;n>t;t++)o[t]=t;for(t=0;i>t;t++)e=r[t],u=o[e[0]],o[e[0]]=o[e[1]],o[e[1]]=u;return o},toMatrix:function(r,n,t){var e,u,i=new Array(n);for(t=!0===t,e=0;n>e;e++)for(i[e]=new Array(n),u=0;n>u;u++)i[e][u]=0;for(e=0;n>e;e++)t?i[r[e]][e]=1:i[e][r[e]]=1;return i},fromMatrix:function(r,n,t){var e,u,i=new Array(n);for(t=!0===t,e=0;n>e;e++)for(u=0;n>u;u++)r[e][u]&&(t?i[u]=e:i[e]=u);return i},isConnected:function(r,n){var t,e=-1/0;for(n=n||r.length,t=0;n-1>t;t++)if(r[t]>e&&(e=r[t]),t>=e)return!1;return!0}}}),u=r.Derangement=g(t,{constructor:function On(r){var n=this;return n instanceof On?void t.call(n,r):new On(r)},__static__:{count:sn,dual:e.dual,rank:t.rank,unrank:t.unrank,first:t.first,last:t.last,succ:t.succ,stochastic:t.stochastic,rand:function(n){var t,e,u,i,o=new Array(n),f=new Array(n),a=n,s=an(a),c=C(s+1/L),l=C((s/(a*(a-1))+1)/L);for(t=0;n>t;t++)o[t]=t,f[t]=!1;for(t=n-1,u=n;u>=2;){if(!f[t]){do e=r.rint(0,t-1);while(f[e]);i=o[t],o[t]=o[e],o[e]=i,r.rnd()<(u-1)*l/c&&(f[e]=!0,u--,a--,s/=a,c=C(s+1/L),l=C((s/(a*(a-1))+1)/L)),u--,a--,s/=a,c=C(s+1/L),l=C((s/(a*(a-1))+1)/L)}t--}return o}}}),i=r.Combination=g(t,{constructor:function Rn(r,n){var e=this;return e instanceof Rn?void t.call(e,[r,n]):new Rn(r,n)},__static__:{count:function(r){return cn(r[0],r[1])},dual:function(r,n){return K(r,n[0])},rank:function(r,n,t){var e,u,i,o,f,a=0;for(o=n[1],n=n[0],f=t?t:cn(n,o),e=1;o>=e;e++)u=n-1-r[e-1],i=o+1-e,a+=u>=i?cn(u,i):0;return f-1-a},unrank:function(r,n,t){var e,u,i,o,f,a,s=this;if(t=t||cn(n[0],n[1]),0===r)e=s.first(n);else if(t===r+1)e=s.last(n);else{i=n[1],n=n[0],e=new Array(i),u=t,r=u-1-r,u=(n-i)*u/n,f=n-i+1,o=i,a=n-1;do r>=u?(e[i-o]=n-f-o+1,u>0&&(r-=u,u=o*u/a),o--,a--):(u=(a-o)*u/a,f--,a--);while(o>0)}return e},first:function(r){var n,t=r[1],e=new Array(t);for(n=0;t>n;n++)e[n]=n;return e},last:function(r){var n,t=r[1],e=new Array(t);for(r=r[0],n=0;t>n;n++)e[t-1-n]=r-1-n;return e},succ:function(r,n,t){if(n){var e,u,i,o,f,a=n.slice();if(e=t[1],t=t[0],-1===r){for(u=e-1,i=-1;u>0;){if(a[u]>a[u-1]+1){i=u;break}u--}if(-1===i&&0-1){for(f=t,u=e-1;u>i;u--)a[u]=--f;a[i]--}else a=null}else{for(u=e-1,i=-1,o=t-e;u>=0;){if(a[u]-1)for(f=a[i],u=i;e>u;u++)a[u]=++f;else a=null}return a}return null},rand:function(n){var t,e,u,i,o,f,a,s;for(e=n[1],n=n[0],t=new Array(e),u=r.rnd(),o=0,a=0,s=n-e,i=1;e>=i;i++){for(o++,f=(e-i+1)/(n-o+1);u>=f&&s+i>o;)a=f,o++,f=a+(1-a)*((e-i+1)/(n-o+1));t[i-1]=o-1,u=(u-a)/(f-a)}return t},stochastic:t.stochastic,complement:J,choose:function(r,n){var t,e=n.length,u=new Array(e);for(t=0;e>t;t++)u[t]=r[n[t]];return u},pick:z,toMatrix:function(r,n,t){var e,u,i,o;for(u=n[1],n=n[0],e=new Array(n),t=!0===t,i=0;n>i;i++)for(e[i]=new Array(n),o=0;n>o;o++)e[i][o]=0;for(i=0;u>i;i++)t?e[r[i]][i]=1:e[i][r[i]]=1;return e},fromMatrix:function(r,n,t){var e,u,i,o;for(u=n[1],n=n[0],e=new Array(u),t=!0===t,i=0;n>i;i++)for(o=0;n>o;o++)r[i][o]&&(t&&u>o?e[o]=i:!t&&u>i&&(e[i]=o));return e}}}),i.conjugate=i.complement,o=r.CombinationRepeat=g(t,{constructor:function Ln(r,n){var e=this;return e instanceof Ln?void t.call(e,[r,n]):new Ln(r,n)},__static__:{count:function(r){return cn(r[0]+r[1]-1,r[1])},dual:i.dual,rank:function(r,n,t){var e,u,i,o,f,a,s=0;for(o=n[1],n=n[0],f=n+o-1,a=t?t:cn(f,o),e=1;o>=e;e++)u=f-1-r[e-1]-e+1,i=o+1-e,s+=u>=i?cn(u,i):0;return a-1-s},unrank:function(r,n,t){var e,u,i,o,f,a,s,c=this;if(t=t||cn(n[0]+n[1]-1,n[1]),0===r)return c.first(n);if(t===r+1)return c.last(n);i=n[1],n=n[0],o=n+i-1,e=new Array(i),u=t,r=u-1-r,u=(o-i)*u/o,a=o-i+1,f=i,s=o-1;do r>=u?(e[i-f]=o-a-i+1,u>0&&(r-=u,u*=f/s),f--,s--):(u*=(s-f)/s,a--,s--);while(f>0);return e},first:function(r){var n,t=r[1],e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r[1],e=new Array(t);for(r=r[0]-1,n=0;t>n;n++)e[n]=r;return e},succ:function(r,n,t){if(n){var e,u,i,o,f=n.slice();if(e=t[1],t=t[0],-1===r){for(u=e-1,i=-1;u>0;){if(f[u]>f[u-1]){i=u;break}u--}if(-1===i&&0-1){for(o=t-1,u=i+1;e>u;u++)f[u]=o;f[i]--}else f=null}else{for(u=e-1,i=-1;u>=0;){if(f[u]-1)for(o=f[i]+1,u=i;e>u;u++)f[u]=o;else f=null}return f}return null},rand:function(n){var t,e,u,i,o,f,a,s,c;for(e=n[1],n=n[0],t=new Array(e),u=r.rnd(),o=0,a=0,s=n+e-1,c=s-e,i=1;e>=i;i++){for(o++,f=(e-i+1)/(s-o+1);u>=f&&c+i>o;)a=f,o++,f=a+(1-a)*(e-i+1)/(s-o+1);t[i-1]=o-i,u=(u-a)/(f-a)}return t},stochastic:i.stochastic}}),f=r.Partition=g(t,{constructor:function Pn(r){var n=this;return n instanceof Pn?void t.call(n,r):new Pn(r)},__static__:{count:function(r){var n,t,e=r>1?2:1;for(n=2;r>n;n++)for(t=r-n+1;t>=1;t--)e+=ln(r,n,t);return e},dual:function(r,n){var t,e,u=[],i=r.length;for(t=0;i>t;t++)if(e=n-r[t],!(0>=e)){if(n===e)return[n];u.unshift(e)}return u},rank:function(r,n,t,e,u){var i,o,f,a=this,s=r.length,c=n;return t=t||a.count(n),e=e||0,u=u||s,o=e,f=r[o],i=c===f?t-1:1===f?0:s>o+1?1+a.rank(r,n-f,t-a.count(n-f),o+1):0},unrank:function(){},first:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=1;return t},last:function(r){return[r]},succ:function(r,n,t){if(n){var e,u,i,o,f,a,s=n.slice();if(-1===r)if(s[0]>1){for(u=s.length,e=u-1;e>=0&&1===s[e];)e--;for(i=s[e]-1,s=s.slice(0,e+1),s[e]=i,f=j(s),a=t-f;a>0;)o=a,o>i?(o=i,s.push(o)):s.push(a),a-=o}else s=null;else if(s[0]0&&e--;e>0&&s[e]===s[e-1];)e--;for(s[e]++,s=s.slice(0,e+1),f=j(s),a=t-f;a>0;)s.push(1),a--}else s=null;return s}return null},rand:function(){},stochastic:t.stochastic,conjugate:function(r){var n,t,e,u=r.length,i=r[0],o=new Array(i);for(n=0;i>n;n++)o[n]=1;for(t=1;u>t;t++)for(n=0,e=r[t];i>n&&e>0;)o[n++]++,e--;return o},pack:function(r){var n,t=[],e=r.length,u=r[0],i=[u,1];for(n=1;e>n;n++)u===r[n]?i[1]++:(t.push(i),u=r[n],i=[u,1]);return t.push(i),t},unpack:function(r){var n,t,e,u,i,o=[],f=r.length;for(n=0;f>n;n++)if(i=r[n],1===i[1])o.push(i[0]);else for(e=i[1],u=i[0],t=0;e>t;t++)o.push(u);return o}}}),f.transpose=f.conjugate,a=r.Powerset=g(t,{constructor:function Sn(r){var n=this;return n instanceof Sn?void t.call(n,r):new Sn(r)},__static__:{count:hn,dual:t.dual,rank:function(r){for(var n=0,t=0,e=r.length;e>t;)n+=1<>>0;return n},unrank:function(r){for(var n=[],t=0;0!==r;)1&r&&n.unshift(t),2&r&&n.unshift(t+1),4&r&&n.unshift(t+2),8&r&&n.unshift(t+3),16&r&&n.unshift(t+4),32&r&&n.unshift(t+5),64&r&&n.unshift(t+6),128&r&&n.unshift(t+7),t+=8,r>>>=8;return n},first:function(){return[]},last:function(r){var n,t=new Array(r);for(n=0;r>n;n++)t[n]=r-1-n;return t},succ:function(r,n,t){var e=this;return 1!==r&&-1!==r&&(r=1),-1===r?0===n.length?null:e.unrank(e.rank(n)+r):t===n.length?null:e.unrank(e.rank(n)+r)},rand:t.rand,stochastic:t.stochastic}}),s=r.Tensor=g(t,{constructor:function Xn(){var r=this;return r instanceof Xn?void(arguments.length?t.call(r,v.call(arguments)):(r.n=[],r._count=0)):(r=new Xn,arguments.length?t.call(r,v.call(arguments)):(r.n=[],r._count=0),r)},__static__:{count:function(r){return r&&r.length?T(r):0},dual:t.dual,rank:function(r,n){var t,e,u=n,i=u.length;if(!i)return-1;for(t=0,e=0;i>e;e++)t=t*u[e]+r[e];return t},unrank:function(r,n){var t,e,u,i,o,f=n,a=f.length;if(!a)return[];for(o=new Array(a),t=r,u=a-1;u>=0;u--)e=f[u],i=t%e,t=~~(t/e),o[u]=i;return o},first:function(r){var n,t=r.length,e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r,e=t.length,u=new Array(e);for(n=0;e>n;n++)u[n]=t[n]-1;return u},succ:function(r,n,t){if(n){var e,u,i=n.slice(),o=t,f=o.length;if(-1===r){for(e=f-1;e>=0&&i[e]-1<0;)e--;if(e>=0)for(i[e]--,u=e+1;f>u;u++)i[u]=o[u]-1;else i=null}else{for(e=f-1;e>=0&&i[e]+1===o[e];)e--;if(e>=0)for(i[e]++,u=e+1;f>u;u++)i[u]=0;else i=null}return i}return null},rand:function(n){var t,e=n,u=e.length,i=new Array(u);for(t=0;u>t;t++)i[t]=r.rint(0,e[t]-1);return i},stochastic:t.stochastic,product:U,component:function(r,n){var t,e,u,i,o,f,a=[],s=n,c=s.length;for(t=0;c>t;t++)if(u=s[t],o=r[t],i=u[o],i instanceof Array)for(e=0,f=i.length;f>e;e++)a.push(i[e]);else a.push(i);return a}}}),c=r.Tuple=g(t,{constructor:function Nn(r,n){var e=this;return e instanceof Nn?void t.call(e,[r||1,n||2]):new Nn(r,n)},__static__:{count:function(r){return _n(r[1],r[0])},dual:function(r,n){return K(r,n[1])},rank:function(r,n){var t,e,u=n[0];for(n=n[1],t=0,e=0;u>e;e++)t=t*n+r[e];return t},unrank:function(r,n){var t,e,u,i,o,f=n[0];for(n=n[1],o=new Array(f),t=r,u=f-1;u>=0;u--)e=n,i=t%e,t=~~(t/e),o[u]=i;return o},first:function(r){var n,t=r[0],e=new Array(t);for(n=0;t>n;n++)e[n]=0;return e},last:function(r){var n,t=r[0],e=new Array(t);for(r=r[1]-1,n=0;t>n;n++)e[n]=r;return e},succ:function(r,n,t){if(n){var e,u,i=n.slice(),o=t[0],t=t[1];if(-1===r){for(e=o-1;e>=0&&i[e]-1<0;)e--;if(e>=0)for(i[e]--,u=e+1;o>u;u++)i[u]=t-1;else i=null}else{for(e=o-1;e>=0&&i[e]+1===t;)e--;if(e>=0)for(i[e]++,u=e+1;o>u;u++)i[u]=0;else i=null}return i}return null},rand:function(n){var t,e=n[0],u=new Array(e);for(n=n[1]-1,t=0;e>t;t++)u[t]=r.rint(0,n);return u},stochastic:s.stochastic}}),r.Magic=en,r.Magic.product=on,r.Magic.pythagorean=un,r.Magic.test=fn,r.Latin=tn,r}); \ No newline at end of file diff --git a/test/combinations.txt b/test/combinations.txt index 0382f68..0663004 100644 --- a/test/combinations.txt +++ b/test/combinations.txt @@ -116,28 +116,28 @@ o.order("revcolex") [ 0, 1, 3 ] [ 0, 1, 2 ] o.random() -[ 1, 3, 5 ] +[ 1, 2, 3 ] o.order("random") -[ 0, 1, 3 ] -[ 1, 4, 5 ] -[ 1, 3, 5 ] -[ 0, 3, 5 ] -[ 1, 2, 5 ] [ 0, 4, 5 ] -[ 0, 2, 3 ] +[ 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.dispose() diff --git a/test/permutations.txt b/test/permutations.txt index 1926626..03c5940 100644 --- a/test/permutations.txt +++ b/test/permutations.txt @@ -136,32 +136,32 @@ o.order("revcolex") [ 2, 3, 1, 0 ] [ 3, 2, 1, 0 ] o.random() -[ 0, 1, 3, 2 ] +[ 0, 2, 3, 1 ] o.order("random") [ 3, 0, 2, 1 ] +[ 2, 0, 1, 3 ] +[ 0, 2, 1, 3 ] +[ 1, 3, 2, 0 ] +[ 0, 1, 3, 2 ] +[ 2, 1, 3, 0 ] +[ 2, 3, 1, 0 ] [ 1, 0, 3, 2 ] -[ 3, 1, 0, 2 ] -[ 3, 0, 1, 2 ] -[ 0, 3, 2, 1 ] [ 1, 0, 2, 3 ] +[ 3, 0, 1, 2 ] +[ 1, 2, 0, 3 ] +[ 1, 3, 0, 2 ] +[ 3, 2, 0, 1 ] [ 0, 2, 3, 1 ] -[ 1, 3, 2, 0 ] -[ 1, 2, 3, 0 ] -[ 0, 1, 2, 3 ] -[ 0, 1, 3, 2 ] +[ 3, 1, 0, 2 ] [ 2, 3, 0, 1 ] -[ 0, 2, 1, 3 ] -[ 3, 2, 1, 0 ] -[ 3, 2, 0, 1 ] +[ 2, 1, 0, 3 ] [ 3, 1, 2, 0 ] -[ 2, 0, 1, 3 ] -[ 1, 2, 0, 3 ] +[ 3, 2, 1, 0 ] +[ 1, 2, 3, 0 ] [ 2, 0, 3, 1 ] -[ 2, 3, 1, 0 ] -[ 2, 1, 3, 0 ] +[ 0, 3, 2, 1 ] +[ 0, 1, 2, 3 ] [ 0, 3, 1, 2 ] -[ 2, 1, 0, 3 ] -[ 1, 3, 0, 2 ] o.order("colex").range(-5, -1) [ [ 1, 2, 0, 3 ], [ 2, 0, 1, 3 ], @@ -169,14 +169,14 @@ o.order("colex").range(-5, -1) [ 1, 0, 2, 3 ], [ 0, 1, 2, 3 ] ] o.order("stochastic",[ [ 0, 1, 0, 0 ], [ 1/3, 0, 1/3, 1/3 ], [ 1/3, 0, 1/3, 1/3 ], [ 1/3, 0, 1/3, 1/3 ] ]).range(0, 9) -[ [ 1, 2, 3, 0 ], - [ 1, 3, 0, 2 ], +[ [ 1, 3, 0, 2 ], + [ 1, 0, 3, 2 ], [ 1, 3, 0, 2 ], - [ 1, 3, 2, 0 ], [ 1, 0, 3, 2 ], - [ 1, 3, 2, 0 ], + [ 1, 3, 0, 2 ], [ 1, 0, 3, 2 ], [ 1, 3, 0, 2 ], - [ 1, 2, 3, 0 ], - [ 1, 0, 2, 3 ] ] + [ 1, 0, 3, 2 ], + [ 1, 0, 3, 2 ], + [ 1, 2, 0, 3 ] ] o.dispose() diff --git a/test/powersets.txt b/test/powersets.txt index 38860b1..fee6897 100644 --- a/test/powersets.txt +++ b/test/powersets.txt @@ -96,24 +96,24 @@ o.order("revcolex") [ 2, 1, 0 ] [ 3, 2, 1, 0 ] o.random() -[ 2, 1, 0 ] +[ 3, 1, 0 ] o.order("random") +[ 2, 1 ] [ 2, 0 ] -[ 3 ] -[ 3, 1 ] -[ 3, 2, 1, 0 ] +[ 3, 0 ] +[ 3, 2, 1 ] +[ 3, 1, 0 ] +[ 1, 0 ] [ 2, 1, 0 ] [ 0 ] +[ 2 ] +[ 3, 2, 1, 0 ] +[ 3, 1 ] [ 3, 2 ] -[ 1 ] -[ 3, 0 ] -[ 2, 1 ] -[ 3, 2, 1 ] [ 3, 2, 0 ] -[ 2 ] -[ 1, 0 ] +[ 1 ] +[ 3 ] [] -[ 3, 1, 0 ] o.order("colex").range(-5, -1) [ [ 1 ], [ 3, 2 ], [ 2 ], [ 3 ], [] ] o.dispose() diff --git a/test/tensors.txt b/test/tensors.txt index f577051..b3d3030 100644 --- a/test/tensors.txt +++ b/test/tensors.txt @@ -46,13 +46,13 @@ o.order("revcolex") [ 1, 0, 0 ] [ 0, 0, 0 ] o.random() -[ 0, 0, 1 ] -o.order("random") [ 0, 1, 1 ] +o.order("random") +[ 0, 0, 0 ] [ 0, 0, 1 ] [ 0, 0, 2 ] +[ 0, 1, 1 ]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