OKlibrary
0.2.1.6

General plans regarding investigations on logical data analysis. More...
Go to the source code of this file.
General plans regarding investigations on logical data analysis.
nccount_boolmat(n, m) := sum(nccountext_boolmat(n, m, i), i, 0, m)$ ncprob_boolmat(n,m) := nccount_boolmat(n, m) / (2^(n+1))^m$
nccountext_boolmat(n, m, i) := binomial(2^n,i) * stirling2(m,i)*i! * 2^i$ float(ncprob_boolmat(10,50)); .5497968110387601
nccountm_boolmat[n, m] := sum(nccountextm_boolmat[n, m, i], i, 0, m)$ ncprobm_boolmat(n,m) := nccountm_boolmat[n, m] / (2^(n+1))^m$ nccountextm_boolmat[n, m, i] := binomial(2^n,i) * stirling2(m,i)*i! * 2^i$ float(ncprobm_boolmat(20,1000)); .7880606667585897 plot_ncprob(n,m) := block([L : create_list(i,i,0,m)], plot2d([discrete, L, map(lambda([i],ncprobm_boolmat(n,i)), L)]))$ plot_ncprob(10,120);
nccount_boolmat(n,0); 1 nccount_boolmat(n,1); 2^(n+1) nccount_boolmat(1,m), simpsum; 'sum(binomial(2,i)*2^i*i!*stirling2(m,i),i,0,m)
nccountext_rec_boolmat[n,m,i] := if m=0 then if i=0 then 1 else 0 elseif i=0 then 0 else i*nccountext_rec_boolmat[n,m1,i] + 2*(2^n(i1)) * nccountext_rec_boolmat[n,m1,i1]$ nccount_rec_boolmat[n, m] := sum(nccountext_rec_boolmat[n, m, i], i, 0, m)$ ncprob_rec_boolmat(n,m) := nccount_rec_boolmat[n, m] / (2^(n+1))^m$ float(ncprob_rec_boolmat(10,50)); .5497968110387601
nccountm_boolmat_rec(n,m) := nccountm_boolmat_rec_r[n, m, 0]$ nccountm_boolmat_rec_r[n,m,c] := if m = 0 then 1 else c* nccountm_boolmat_rec_r[n,m1,c] + 2* (2^n  c) * nccountm_boolmat_rec_r[n,m1,c+1]$ ncprobm_boolmat_rec(n,m) := nccountm_boolmat_rec(n,m) / (2^(n+1))^m$
For all natural numbers m', n >= 0, for all 0 <= c <= m' and for all matrices M' (over {0,1}) of size m'*(n+1), if we have that
then for all m >= 0, we have that the number of matrices (over {0,1}) of size (m'+m)*(n+1) where
is nccountm_boolmat_rec_r(n,m,c).
OK: This doesn't define anything. The sentence has the structure If A, then B is nccountm_boolmat_rec_r(n,m,c). Such a sentence only makes sense if A is some conjecture, the Riemann conjecture for example. However in this case A itself makes no sense; the fundamental problem is a grammatical problem  it is *completely* ambiguous, what the scope of the various quantifiers is (M' is used in A as well as in B !) Likely this ambiguity is inherent, since the whole definitionapproach is misguided. If a combinatorial function like nccountm_boolmat_rec_r(n,m,c) is to be defined, then first the domains of n,m,c are to be specified, then a set C(n,m,c) depending only on n,m,c is to be defined, and finally nccountm_boolmat_rec_r(n,m,c) := C(n,m,c). Phrases like "for all" are not to be used in definitions, only in statements ("definitions" are not true of false, while statements are).
approx_ncprob_0(n,m) := float(exp(m^2/2^(n+1)))$ approx_ncprob_0(10,50); .2950226561744428 approx_ncprob_0(20,1000); .6207436040675001 plot_approx_ncprob_0(n,m_max) := plot2d(approx_ncprob_0(n,m), [m,1,m_max])$
plot_approx_vs_exact_ncprob_0(n,m_max) := block( [exact_data : create_list([i,float(ncprobm_boolmat(n,i))],i,1,m_max)], plot2d([approx_ncprob_0(n,m),[discrete,exact_data]], [m,1,m_max], [legend,"approx","exact"]))$
diff_approx2exact_ncprob_0(n,m) := float(ncprobm_boolmat(n,m))  approx_ncprob_0(n,m)$ plot_diff_approx2exact_ncprob_0(n,m_max) := block( [diff_data : create_list( [m,diff_approx2exact_ncprob_0(n,m)],m,1,m_max)], plot2d([discrete,diff_data], [legend, "approx  exact"]))$ ratio_approx2exact_ncprob_0(n,m) := float(ncprobm_boolmat(n,m)) / approx_ncprob_0(n,m)$ plot_ratio_approx2exact_ncprob_0(n,m_max) := block( [diff_data : create_list( [m,ratio_approx2exact_ncprob_0(n,m)],m,1,m_max)], plot2d([discrete,diff_data], [legend, "approx  exact"]))$
find_maxima_2(f,n) := block([result : undef], for m : 1 while result = undef do if f(n,m) > f(n,m+1) then result : m, return(result))$
create_list(find_maxima_2(diff_approx2exact_ncprob_0,1,n),n,1,15); [2,3,5,7,9,13,19,27,38,53,75,106,151,213,301]
Definition in file general.hpp.