mmcdara

7891 Reputation

22 Badges

9 years, 52 days

MaplePrimes Activity


These are replies submitted by mmcdara

@GFY 

"The goal is to obtain a dataset or plot that relates Ω to the steady-state amplitude"
How do you define the steady-state amplitude?
Looking to the plot this is far from being obvious, so can you precise what you mean exactly.

In the attached file you will find a example of "Omega sweeping" of this quantity (nothing more than an illustrative example)


where T1 and T2 are large enough to consider the system entered a quasi periodic regime.
2_mmcdara_2.mw

This might give you (or maybe not) some hints about how to reach your goal.

Illustrative result:


 

@Carl Love @vv

Thanks to you both.

@Carl Love your example is indeed very telling

@C_R 

Concerning your last question the spectrum of a chaotic system must have a continuous part, and possibly some distincts "rays". A less formal characterization is the unpredictability, meaning that regardless of how long the signal has been observed you can't never predict its future state (which implies it does not have a steady state regime, at least in thee classical sense).

But there may exist some form of stationnarity.
Let's consider for instance turbulence in fluids ("turbulent" means "chaotic in space" whereas "chaotic" generally refers to time).
So a turbulent fluid is a chaotic system, but, not the detailed velocity (pressure) field itself but the kinetic energy of its turbulence component have a kind of stationnary shape (Kolmogorov's cascade, see for instance Wiki), which is a statistical property.

Another example: a stochastic process more generaly)  is not stationnary in the clasical sense and doesn't have a steady state regime. A white noise is indeed perfectly unpredictable, but we have some informations about its future expectation: so in a statistical sense again there is some sense of predictability.
Some processes are even said to be (weakly, strictly, strongly) stationary, a term which has tobe understood in a statistical sense and means that some its statistical properties are time invariant.

@vv 

Thanks for your explanations.
A last point: why, for instance,  f(1/3) = ln(x) without giving any assumption?

@nm 

There were indeed typos (corrected by the way).

Seriously, couldn't you have taken a look at my file instead of stopping at a  typo?
But perhaps it occurred to you that I had also typed symplify in this one and that it was only natural that Maple not simplify the expressions for me? Didn't you?

Look question here and more precisely @dharr's answer.

Once you have  the, lets say, list C of all the cycles in some grah G (assuming it is not void), then 

f := (V, L) -> map(c -> if nops(c)=L then c end if, select(has, C, V)):
S := f(....)

gives the sublist S of C made of graphs of length L which contain vertex V (saying "which start from V" makes no sense):

If you want to rearrange the elements of S in order that V appears first do this

map(c -> ListTools:-Rotate(c, ListTools:-Search(V, c)-1), S));

@MathGuru 

It's better to make a mistake than to use a bugged code :-)

Please upload Matlab and/or SageMath using the big green up-arrow in the menubar.

If the native formats are not allowed upload txt or pdf files.

@epostma 

And also thank you for tour decisions. I truly believe they are the good ones.

Have a nice day

This is a simple commentn nothing more.

I don't know why you wanted to declare j as local bacause this is not mandatory:

restart

numArray := [17, 18, 19];
symArray := [x, y, z];
 

[17, 18, 19]

 

[x, y, z]

(1)

# no "local j" needed

kronArray := map(i -> symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i - 1), [$ (1 .. 3)]);

[x = x, y = x^17, z = x^306]

(2)

# indeed, even if "j" is mnown out of kronArray" you get the cirrect result

j := 100:

kronArray := map(i -> symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i - 1), [$ (1 .. 3)]);
 

[x = x, y = x^17, z = x^306]

(3)

# but this will not work (read add/mul help page and search "local" within)

symArray[1]^mul(numArray[j], j = 1 .. i - 1)

Error, unable to execute mul

 

# Other form (1)
# read "option (arrow)" help page, it is written
#
# f := x -> x^2-1;
# is equivalent to
# f := proc(x) option operator, arrow; x^2-1 end proc;
#
# Next serach for "local"

f1 := i -> symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i - 1):
map(f1, [$ (1 .. 3)]);

[x = x, y = x^17, z = x^306]

(4)

# Other form (2)
# see "procedure" help page and go to the "Implicit Local Variables" section.
f2 := proc(i) symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i - 1) end proc;
map(f2, [$ (1 .. 3)]);

proc (i) symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i-1) end proc

 

[x = x, y = x^17, z = x^306]

(5)

# Other form (3)

f3 := proc(i, symArray, numArray)
  symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i - 1)
end proc;
map(f3, [$ (1 .. 3)], symArray, numArray);

proc (i, symArray, numArray) symArray[i] = symArray[1]^mul(numArray[j], j = 1 .. i-1) end proc

 

[x = x, y = x^17, z = x^306]

(6)

# Other form (4) (more versatile)

f4 := proc(S::list, N::list)
  if nops(S) <> nops(N) then
    error "The two lists do not have the same number of elements"
  end if:
  map(i -> S[i] = S[1]^mul(N[j], j = 1 .. i - 1), [$ (1 .. nops(S))]);
end proc:

f4(symArray, numArray);

[x = x, y = x^17, z = x^306]

(7)

numArray := [$2..7];
symArray := [u, v, w, x, y, z];

f4(symArray, numArray);

[2, 3, 4, 5, 6, 7]

 

[u, v, w, x, y, z]

 

[u = u, v = u^2, w = u^6, x = u^24, y = u^120, z = u^720]

(8)
 

 

Download local_j.mw

@jasser 

I say a sum is licit if its value is not larger than 110000 abd it has an odd number of terms.

You write "I don't know how long this list will be."
Assuming the list of numbers contains no replicates, and assuming the largest number is less than 110000, the answer is: "the length of the list of licit sums is ASTRONOMICAL".
Obviously if the smallest number is larger than 110000 the list of licit sums is void.

A key point is the way your initial list is built: How those 43000 numbers are chosen?

Let L a list of M positive integers (you said 43000), T the "target" value (your 110000), and S the list of licit sums.
In the probabilistic approach I present in the attached file I consider that M integers are a sample of integers in the range 1..a*M  where a is larger than 1.
Speaking of sample means that some numbers can be present more than once in L , which is consistent with the fact that L is a list (this would be different if L was a set).
But L being a list raises another question: let us consider some licit sum made of three elements Li+Lj+Lk, then the sums Lj+Li+Lk, Lj+Lk+Li...are licit too: do you account for the permutation of the elements of a sum or not? Said otherwise, if Li+Lj+Lk is a licit will you consider there are 1 licit sum or 6 licit sums?


The probabilistic model I use in the attached file may provide estimation of S length whih are quite imprecise, maybe by a few orders of magnitudes because I don't have all your answers to the questions concerning the numbers in L.
Nevertheless this model shows that the length of S may be astronomical.

Indeed:

  • For numbers uniformly sampled in the range 1..43000, there are about 10109 sums made of an odd number of numbers whose value is less than 110000 (maybe 10108 or 10100, but who does care? Note that the google number is defined as 10100 and that, quoting Wiki : "If the much larger observable universe of today were filled with sand, it would still only equal 1095 grains").
     
  • If the numbers are uniformly sampled in the range 1..1000*43000 it still remains about 1078 such sums.
     
  • Of course these results depend on the way the numbers are sampled: if they are all in the range 110001..153000 there is of course no "licit" sum.
     
  • Another interesting case is L containing all integers between 67001 and 110000: then the length of S is exactly 43000 (each licit sum being made of a single term).
     
  • At last, if L contains "1" 43000 times the length of S is about  9.75*1012943 (= add(binomial(43000, 2*k+1), k=0..43000/2)) if order maters, or 43000*43001/4  if not, which is already a little bit over 450 milions.


Remark: int the probability approach I developed the uniformly sampled numbers are not necessarily different. Statisticsllt that should not biase the results I give. Indeed is replicates of small numbers appear in the list of numbers , then one might expect more sums to exists, but this situation is balanced with the one wer replicates of large numbers are present as this latter reduces the number of sums.

 

restart


Exact solution of a toy problem

Are you aware of the combinatorics?

randomize();

174492199021057

(1)

L := { seq(rand(1..100)(), i=1..10) }:  # (a priori) 10 numbers in the range 1..100
N := numelems(L);
S := add(L)/2;                          # The upper value of the sum (your 110000)
C := combinat:-choose(L):
A := map(c -> if `and`(add(c) <= S, nops(c)::odd) then c end if, C);

numelems(A);   #number of "licit" sums

10

 

280

 

{{13}, {15}, {47}, {55}, {59}, {67}, {68}, {70}, {80}, {86}, {13, 15, 47}, {13, 15, 55}, {13, 15, 59}, {13, 15, 67}, {13, 15, 68}, {13, 15, 70}, {13, 15, 80}, {13, 15, 86}, {13, 47, 55}, {13, 47, 59}, {13, 47, 67}, {13, 47, 68}, {13, 47, 70}, {13, 47, 80}, {13, 47, 86}, {13, 55, 59}, {13, 55, 67}, {13, 55, 68}, {13, 55, 70}, {13, 55, 80}, {13, 55, 86}, {13, 59, 67}, {13, 59, 68}, {13, 59, 70}, {13, 59, 80}, {13, 59, 86}, {13, 67, 68}, {13, 67, 70}, {13, 67, 80}, {13, 67, 86}, {13, 68, 70}, {13, 68, 80}, {13, 68, 86}, {13, 70, 80}, {13, 70, 86}, {13, 80, 86}, {15, 47, 55}, {15, 47, 59}, {15, 47, 67}, {15, 47, 68}, {15, 47, 70}, {15, 47, 80}, {15, 47, 86}, {15, 55, 59}, {15, 55, 67}, {15, 55, 68}, {15, 55, 70}, {15, 55, 80}, {15, 55, 86}, {15, 59, 67}, {15, 59, 68}, {15, 59, 70}, {15, 59, 80}, {15, 59, 86}, {15, 67, 68}, {15, 67, 70}, {15, 67, 80}, {15, 67, 86}, {15, 68, 70}, {15, 68, 80}, {15, 68, 86}, {15, 70, 80}, {15, 70, 86}, {15, 80, 86}, {47, 55, 59}, {47, 55, 67}, {47, 55, 68}, {47, 55, 70}, {47, 55, 80}, {47, 55, 86}, {47, 59, 67}, {47, 59, 68}, {47, 59, 70}, {47, 59, 80}, {47, 59, 86}, {47, 67, 68}, {47, 67, 70}, {47, 67, 80}, {47, 67, 86}, {47, 68, 70}, {47, 68, 80}, {47, 68, 86}, {47, 70, 80}, {47, 70, 86}, {47, 80, 86}, {55, 59, 67}, {55, 59, 68}, {55, 59, 70}, {55, 59, 80}, {55, 59, 86}, {55, 67, 68}, {55, 67, 70}, {55, 67, 80}, {55, 67, 86}, {55, 68, 70}, {55, 68, 80}, {55, 68, 86}, {55, 70, 80}, {55, 70, 86}, {55, 80, 86}, {59, 67, 68}, {59, 67, 70}, {59, 67, 80}, {59, 67, 86}, {59, 68, 70}, {59, 68, 80}, {59, 68, 86}, {59, 70, 80}, {59, 70, 86}, {59, 80, 86}, {67, 68, 70}, {67, 68, 80}, {67, 68, 86}, {67, 70, 80}, {67, 70, 86}, {67, 80, 86}, {68, 70, 80}, {68, 70, 86}, {68, 80, 86}, {70, 80, 86}, {13, 15, 47, 55, 59}, {13, 15, 47, 55, 67}, {13, 15, 47, 55, 68}, {13, 15, 47, 55, 70}, {13, 15, 47, 55, 80}, {13, 15, 47, 55, 86}, {13, 15, 47, 59, 67}, {13, 15, 47, 59, 68}, {13, 15, 47, 59, 70}, {13, 15, 47, 59, 80}, {13, 15, 47, 59, 86}, {13, 15, 47, 67, 68}, {13, 15, 47, 67, 70}, {13, 15, 47, 67, 80}, {13, 15, 47, 67, 86}, {13, 15, 47, 68, 70}, {13, 15, 47, 68, 80}, {13, 15, 47, 68, 86}, {13, 15, 47, 70, 80}, {13, 15, 47, 70, 86}, {13, 15, 47, 80, 86}, {13, 15, 55, 59, 67}, {13, 15, 55, 59, 68}, {13, 15, 55, 59, 70}, {13, 15, 55, 59, 80}, {13, 15, 55, 59, 86}, {13, 15, 55, 67, 68}, {13, 15, 55, 67, 70}, {13, 15, 55, 67, 80}, {13, 15, 55, 67, 86}, {13, 15, 55, 68, 70}, {13, 15, 55, 68, 80}, {13, 15, 55, 68, 86}, {13, 15, 55, 70, 80}, {13, 15, 55, 70, 86}, {13, 15, 55, 80, 86}, {13, 15, 59, 67, 68}, {13, 15, 59, 67, 70}, {13, 15, 59, 67, 80}, {13, 15, 59, 67, 86}, {13, 15, 59, 68, 70}, {13, 15, 59, 68, 80}, {13, 15, 59, 68, 86}, {13, 15, 59, 70, 80}, {13, 15, 59, 70, 86}, {13, 15, 59, 80, 86}, {13, 15, 67, 68, 70}, {13, 15, 67, 68, 80}, {13, 15, 67, 68, 86}, {13, 15, 67, 70, 80}, {13, 15, 67, 70, 86}, {13, 15, 67, 80, 86}, {13, 15, 68, 70, 80}, {13, 15, 68, 70, 86}, {13, 15, 68, 80, 86}, {13, 15, 70, 80, 86}, {13, 47, 55, 59, 67}, {13, 47, 55, 59, 68}, {13, 47, 55, 59, 70}, {13, 47, 55, 59, 80}, {13, 47, 55, 59, 86}, {13, 47, 55, 67, 68}, {13, 47, 55, 67, 70}, {13, 47, 55, 67, 80}, {13, 47, 55, 67, 86}, {13, 47, 55, 68, 70}, {13, 47, 55, 68, 80}, {13, 47, 55, 68, 86}, {13, 47, 55, 70, 80}, {13, 47, 55, 70, 86}, {13, 47, 59, 67, 68}, {13, 47, 59, 67, 70}, {13, 47, 59, 67, 80}, {13, 47, 59, 67, 86}, {13, 47, 59, 68, 70}, {13, 47, 59, 68, 80}, {13, 47, 59, 68, 86}, {13, 47, 59, 70, 80}, {13, 47, 59, 70, 86}, {13, 47, 67, 68, 70}, {13, 47, 67, 68, 80}, {13, 47, 67, 70, 80}, {13, 47, 68, 70, 80}, {13, 55, 59, 67, 68}, {13, 55, 59, 67, 70}, {13, 55, 59, 67, 80}, {13, 55, 59, 67, 86}, {13, 55, 59, 68, 70}, {13, 55, 59, 68, 80}, {13, 55, 59, 70, 80}, {13, 55, 67, 68, 70}, {13, 59, 67, 68, 70}, {15, 47, 55, 59, 67}, {15, 47, 55, 59, 68}, {15, 47, 55, 59, 70}, {15, 47, 55, 59, 80}, {15, 47, 55, 59, 86}, {15, 47, 55, 67, 68}, {15, 47, 55, 67, 70}, {15, 47, 55, 67, 80}, {15, 47, 55, 67, 86}, {15, 47, 55, 68, 70}, {15, 47, 55, 68, 80}, {15, 47, 55, 68, 86}, {15, 47, 55, 70, 80}, {15, 47, 55, 70, 86}, {15, 47, 59, 67, 68}, {15, 47, 59, 67, 70}, {15, 47, 59, 67, 80}, {15, 47, 59, 67, 86}, {15, 47, 59, 68, 70}, {15, 47, 59, 68, 80}, {15, 47, 59, 68, 86}, {15, 47, 59, 70, 80}, {15, 47, 59, 70, 86}, {15, 47, 67, 68, 70}, {15, 47, 67, 68, 80}, {15, 47, 67, 70, 80}, {15, 47, 68, 70, 80}, {15, 55, 59, 67, 68}, {15, 55, 59, 67, 70}, {15, 55, 59, 67, 80}, {15, 55, 59, 68, 70}, {15, 55, 59, 68, 80}, {15, 55, 59, 70, 80}, {15, 55, 67, 68, 70}, {15, 59, 67, 68, 70}}

 

257

(2)

L := { seq(rand(1..100)(), i=1..20) }:
N := numelems(L);
S := max(L)*1.1;
C := combinat:-choose(L):
A := map(c -> if `and`(add(c) <= S, nops(c)::odd) then c end if, C):

numelems(A)

16

 

110.0

 

76

(3)

S := ceil(add(L)/2);
C := combinat:-choose(L):
A := map(c -> if `and`(add(c) <= S, nops(c)::odd) then c end if, C):

numelems(A)

451

 

16480

(4)

# What do you think will happen with N = 43000 and S = 110000 ?
# How many sums do you think you will get?


A probablistic approach

(Quite coarse honnestly, but it gives you an idea of the expected number of solutions your problem has.)

# You say you have M numbers that I assume are all different.
# So either these numbers are 1, ..., M (M=43000) or, they are in a broader range,
# for instance 1..a*M (k > 1).
#
# Let DU a discrete uniform random variable whose possible outcomes are, let's say,
# between 1 and k*M.
# Let S(K) = U[1] + .... + U[K <= M] the sum of K independent random variables with
# the same distribution as DU.
#
# By Central Limit Theorem the distribution of S(K) is a gaussian distribution with  
# with expectation about (a/2)*K*M and variance about a^2*K*M^2/12.
# In practice this result is consider as reasonable as soon as K >= 6.
#
# Then the probability that S takes a value lower that some treshold T is
#
# Prob(S <= T) ~ Prob(Normal((a/2)*K*M, sqrt(a^2*K*M^2/12)) <= T
#
# Application:

# M : Number of numbers
# a : All the numbers are chosen in the range 1..a*M
# T : The value each sum must not exceed
# K : Number of terms of a sum (1 <= K <= a*M), even if the "practical" range is likely
#     more narrow (K=1 implies 1 <= T <= M and K=a*M implies T = a*M and all the numbers
#     are equal to 1... a situation whose probability (1/a/M)^(a*M) is close to 0, for
#     values of M you have in mind).

use Statistics in
  G    := RandomVariable(Normal((a/2)*K*M, sqrt(a^2*K*M^2/12))):
  Prob := Probability(G <= T)
end use

_R

 

1/2+(1/2)*erf((T-(1/2)*a*K*M)*3^(1/2)*2^(1/2)/(a^2*K*M^2)^(1/2))

(5)

Digits := 20: # I'm not sure that 20 is a large enough number of digits to
              # even assess correctly the results that are about to come.

interface(displayprecision=5):
# Let's consider the most favourable case k=1:
# You have binomial(M, K) possible sums S(K) and so about binomial(M, K)*Prob(K)
# will give you a sum lower than T;
#
# Example: Admi(K) is the expected number of sums of K elements whose sum is
#          lower than T.

Admi := unapply(binomial(M, K)*Prob, (M, a, T, K));
 

2^M

 

proc (M, a, T, K) options operator, arrow; binomial(M, K)*(1/2+(1/2)*erf((T-(1/2)*a*K*M)*3^(1/2)*2^(1/2)/(a^2*K*M^2)^(1/2))) end proc

(6)

# Example (1):  if order does matter
#
# This mean L[i] + L[j] and L[j] + L[i] are two different sums.
LicitSums := round(evalf(eval(M^K * Prob, {M=43, a=1, T=110, K=10})));

80768772456761

(7)

# Example (2): if order does not matter
#
# This mean L[i] + L[j] and L[j] + L[i] are the same sums.

LicitSums := round(evalf(Admi(43, 1, 110, 10)));

7165671

(8)

# Here is the variation of Admi(K) for K from 1 to M when order does not matter
#
# Note that the gausssian approximation of S(K) requires K >= 6 as told above
# So this graph is very loose for small values of K.
# But t nevertheless gives some hints

plot(evalf(Admi(43, 1, 110, k)), k=1..110)

 


In the sequel I will only consider the situation "the order does not matter"

# You have now a second requirement which is that K must be odd.
#
# So the number of sums of odd order whose value is less than T is about


NumberOfLicitSums := add(evalf(Admi(43, 1, 100, k)), k=1..43, 2);

9854122.7810803542744

(9)

# With the values of M and T you spoke about...
#
# As you never told about the value of a*M I consider below two"extreme"
# cases

__M := 43000;
__a := 1;
__T := 110000;

NumberOfLicitSums := add(evalf(Admi(__M, __a, __T, k)), k=1..__M, 2);

# Wich represents about

printf("Fraction of licit sums = %1.3e\n", evalf(NumberOfLicitSums/2^43));

43000

 

1

 

110000

 

0.11000152001916021257e110

 

Fraction of licit sums = 1.251e+96

 

# First question: do you really think you can display these 20 millions of sums?
#
# Your requirement:

__M := 43000;
__a := 1000;
__T := 110000;


NumberOfLicitSums := add(evalf(Admi(__M, __a, __T, k)), k=1..__M, 2);

43000

 

1000

 

110000

 

0.13000105000714104106e79

(10)


Probabilistic estimation of the exact solution at the head of this worksheet

__M := 10:
__a := 10:
__T := 280;  # The value of S is the one computed at he head of this worksheet


NumberOfLicitSums := round( add(evalf(Admi(__M, __a, __T, k)), k=1..__M, 2) );

280

 

322

(11)

# 322 is not that far than the exact value 280
#
# (note that other seeds can give closer or less close results but, "in mean"
# the exact and probabilistoc estimation must be quite close).


The head computation revisited

L := { seq(rand(1..10^10)(), i=1..10) }:  # (a priori) 10 numbers in the range 1..10^10


S := 280; # same target value that the the one computed at he head of this worksheet


C := combinat:-choose(L):
A := map(c -> if `and`(add(c) <= S, nops(c)::odd) then c end if, C);

numelems(A);   #number of "licit" sums

280

 

{}

 

0

(12)


Maximum lenth of a licit sum

# The scenario whch gives the largest length is when the list contains all integers
# from 1 to P (list of length P)
# Then its sum is (P+1)*P/2 and this sum is licit is this number is less than T and
# P is odd.
#
# So, roughly is T is large: P ~ sqrt(2*T)
#
# Application

round(sqrt(2*110000))
 

469

(13)

# But this list is extremely unlikely to occur during a random selection for its
# probability is (P/(a*M))^P.
#
# So this raises this new question: what is the maximum length of a licit list we may
# expect to observe during a random selection?
#
# To answer it we need first to quantify what "we may expect to observe..." means.
# So let's say that "we may expect to observe..." means "whose occurrence probability
# is at least larger than alpha = 0.01".
#
# You see below that the largest least whose occurrence probability exceeds 1e-3 has
# length 11.

for L from 1 to 15 do   # only odd L values should be considered
  printf(
    "L = %2d, Probability of occurence of a list of length L = %0.3e\n"
    , L, evalf(Admi(43000, 110000, 1, L))
  ):
end do;

L =  1, Probability of occurence of a list of length L = 1.790e+03
L =  2, Probability of occurence of a list of length L = 6.613e+06

L =  3, Probability of occurence of a list of length L = 1.789e+10
L =  4, Probability of occurence of a list of length L = 3.789e+13
L =  5, Probability of occurence of a list of length L = 6.584e+16
L =  6, Probability of occurence of a list of length L = 9.694e+19
L =  7, Probability of occurence of a list of length L = 1.238e+23
L =  8, Probability of occurence of a list of length L = 1.395e+26
L =  9, Probability of occurence of a list of length L = 1.408e+29
L = 10, Probability of occurence of a list of length L = 1.285e+32
L = 11, Probability of occurence of a list of length L = 1.071e+35
L = 12, Probability of occurence of a list of length L = 8.218e+37
L = 13, Probability of occurence of a list of length L = 5.837e+40
L = 14, Probability of occurence of a list of length L = 3.860e+43
L = 15, Probability of occurence of a list of length L = 2.388e+46

 

# for a > 1, for instance a=10, one finds that the largest least whose occurrence
# probability exceeds 1e-3 has now length 4.

for L from 1 to 15 do   # only odd L values should be considered
  printf(
    "L = %2d, Probability of occurence of a list of length L = %0.3e\n"
    , L, evalf(eval(Prob, {M=43000, T=110000, a=10, K=L}))
  ):
end do;

L =  1, Probability of occurence of a list of length L = 1.988e-01

L =  2, Probability of occurence of a list of length L = 3.416e-02
L =  3, Probability of occurence of a list of length L = 6.416e-03
L =  4, Probability of occurence of a list of length L = 1.260e-03
L =  5, Probability of occurence of a list of length L = 2.538e-04
L =  6, Probability of occurence of a list of length L = 5.204e-05
L =  7, Probability of occurence of a list of length L = 1.080e-05
L =  8, Probability of occurence of a list of length L = 2.263e-06
L =  9, Probability of occurence of a list of length L = 4.773e-07
L = 10, Probability of occurence of a list of length L = 1.013e-07
L = 11, Probability of occurence of a list of length L = 2.158e-08
L = 12, Probability of occurence of a list of length L = 4.618e-09
L = 13, Probability of occurence of a list of length L = 9.913e-10
L = 14, Probability of occurence of a list of length L = 2.134e-10
L = 15, Probability of occurence of a list of length L = 4.604e-11

 

# Even for a=1 we got a value (11) of the expected length at risk alpha=1e-3 which is
# very small compared the the maximum length of 469 we determined.
#
# Note that the number of possible lists being equal to 2^M = 2^43000, there are still
# a large number of lists of length L=11:

`number of lists of length L` = evalf(binomial(43000, 11) * eval(Prob, {M=43000, T=110000, a=1, K=11}))

`number of lists of length L` = 0.24663596970993564e41

(14)


FINAL REMARK

# The above estimations are only ESTIMATIONS (sometimes coarse) as they are based on the asymptotic gaussian
# approximation of S(K).
# As I said this required in practice that K >= 6, several estimations in these printf sequences are wrong.
#
# For instance (a=1)

`number of lists of length 1` = round(evalf(binomial(43000, 1) * eval(Prob, {M=43000, T=110000, a=1, K=1})));
`exact value` = 43000;
`number of lists of length 1` = round(evalf(binomial(43000, 2) * eval(Prob, {M=43000, T=110000, a=1, K=2})));
`exact value` = 43000*42999/2;

`number of lists of length 1` = 43000

 

`exact value` = 43000

 

`number of lists of length 1` = 924415969

 

`exact value` = 924478500

(15)

# But for a=10, there are exactly T=110000 sums of length L whose sum is <= 110000

`number of lists of length 1` = round(evalf(binomial(43000*10, 1) * eval(Prob, {M=43000, T=110000, a=10, K=1})));
`exact value` = 110000;

`number of lists of length 1` = 85488

 

`exact value` = 110000

(16)

# And for a=1000

`number of lists of length 1` = round(evalf(binomial(43000*10, 1) * eval(Prob, {M=43000, T=110000, a=1000, K=1})));
`exact value` = 110000;

`number of lists of length 1` = 18244

 

`exact value` = 110000

(17)

evalf(Admi(43000, 110000, 1, 100))

0.3495830019585429178222548432356322983801048288138328020651757925772062508972340923324488829094847832883621222498563889551686799859669e239

(18)

Digits := 20:

Q := 0:
for L from 1 to 43 by 2 do
  n := round(evalf(Admi(43, 110, 1, L))):
  if n < 1 then break end if:
  Q := Q+n:
  printf("L = %2d, Number of Lists of length L = %d\n", L, n)
end do:

printf("\n Total number of licit lists (probabilistic estimation) = %q\n", Q):

L =  1, Number of Lists of length L = 2
L =  3, Number of Lists of length L = 17
L =  5, Number of Lists of length L = 52
L =  7, Number of Lists of length L = 74
L =  9, Number of Lists of length L = 57
L = 11, Number of Lists of length L = 27
L = 13, Number of Lists of length L = 8
L = 15, Number of Lists of length L = 1

 Total number og licit lists (probabilistic estimation) = 238

 

Digits := 20:

Q := 0:
for L from 1 to 43 by 2 do
  n := round(evalf(Admi(43, 110, 1000, L))):
  if n < 1 then break end if:
  Q := Q+n:
  printf("L = %2d, Number of Lists of length L = %d\n", L, n)
end do:

printf("\n Total number of licit lists (probabilistic estimation) = %q\n", Q):

L =  1, Number of Lists of length L = 7
L =  3, Number of Lists of length L = 61
L =  5, Number of Lists of length L = 189
L =  7, Number of Lists of length L = 268
L =  9, Number of Lists of length L = 207
L = 11, Number of Lists of length L = 95
L = 13, Number of Lists of length L = 28
L = 15, Number of Lists of length L = 5
L = 17, Number of Lists of length L = 1

 Total number of licit lists (probabilistic estimation) = 861

 

Digits := 160:

Q := 0:
for L from 1 to 430 by 2 do
  n := evalf(Admi(430, 1100, 1, L)):
  if n < 1 then break end if:
  Q := Q+n:
  printf("L = %3d, Number of Lists of length L = %1.3e\n", L, n)
end do:

printf("\n Total number of licit lists (probabilistic estimation) = %1.3e\n", Q):

L =   1, Number of Lists of length L = 1.790e+01
L =   3, Number of Lists of length L = 1.776e+04
L =   5, Number of Lists of length L = 6.434e+06
L =   7, Number of Lists of length L = 1.179e+09
L =   9, Number of Lists of length L = 1.295e+11
L =  11, Number of Lists of length L = 9.430e+12
L =  13, Number of Lists of length L = 4.869e+14
L =  15, Number of Lists of length L = 1.870e+16
L =  17, Number of Lists of length L = 5.536e+17
L =  19, Number of Lists of length L = 1.300e+19
L =  21, Number of Lists of length L = 2.473e+20
L =  23, Number of Lists of length L = 3.885e+21
L =  25, Number of Lists of length L = 5.115e+22
L =  27, Number of Lists of length L = 5.717e+23
L =  29, Number of Lists of length L = 5.484e+24
L =  31, Number of Lists of length L = 4.558e+25
L =  33, Number of Lists of length L = 3.310e+26
L =  35, Number of Lists of length L = 2.115e+27
L =  37, Number of Lists of length L = 1.197e+28
L =  39, Number of Lists of length L = 6.037e+28
L =  41, Number of Lists of length L = 2.727e+29
L =  43, Number of Lists of length L = 1.108e+30
L =  45, Number of Lists of length L = 4.071e+30
L =  47, Number of Lists of length L = 1.357e+31
L =  49, Number of Lists of length L = 4.116e+31
L =  51, Number of Lists of length L = 1.141e+32
L =  53, Number of Lists of length L = 2.897e+32
L =  55, Number of Lists of length L = 6.758e+32
L =  57, Number of Lists of length L = 1.452e+33
L =  59, Number of Lists of length L = 2.883e+33
L =  61, Number of Lists of length L = 5.295e+33
L =  63, Number of Lists of length L = 9.019e+33
L =  65, Number of Lists of length L = 1.428e+34
L =  67, Number of Lists of length L = 2.104e+34
L =  69, Number of Lists of length L = 2.891e+34
L =  71, Number of Lists of length L = 3.711e+34
L =  73, Number of Lists of length L = 4.456e+34
L =  75, Number of Lists of length L = 5.013e+34
L =  77, Number of Lists of length L = 5.290e+34
L =  79, Number of Lists of length L = 5.244e+34
L =  81, Number of Lists of length L = 4.888e+34
L =  83, Number of Lists of length L = 4.291e+34
L =  85, Number of Lists of length L = 3.550e+34
L =  87, Number of Lists of length L = 2.771e+34
L =  89, Number of Lists of length L = 2.043e+34
L =  91, Number of Lists of length L = 1.424e+34
L =  93, Number of Lists of length L = 9.395e+33
L =  95, Number of Lists of length L = 5.869e+33
L =  97, Number of Lists of length L = 3.475e+33
L =  99, Number of Lists of length L = 1.951e+33
L = 101, Number of Lists of length L = 1.040e+33
L = 103, Number of Lists of length L = 5.269e+32
L = 105, Number of Lists of length L = 2.536e+32
L = 107, Number of Lists of length L = 1.161e+32
L = 109, Number of Lists of length L = 5.062e+31
L = 111, Number of Lists of length L = 2.101e+31
L = 113, Number of Lists of length L = 8.311e+30
L = 115, Number of Lists of length L = 3.134e+30
L = 117, Number of Lists of length L = 1.127e+30
L = 119, Number of Lists of length L = 3.871e+29
L = 121, Number of Lists of length L = 1.269e+29
L = 123, Number of Lists of length L = 3.975e+28
L = 125, Number of Lists of length L = 1.190e+28
L = 127, Number of Lists of length L = 3.405e+27
L = 129, Number of Lists of length L = 9.323e+26
L = 131, Number of Lists of length L = 2.442e+26
L = 133, Number of Lists of length L = 6.125e+25
L = 135, Number of Lists of length L = 1.471e+25
L = 137, Number of Lists of length L = 3.384e+24
L = 139, Number of Lists of length L = 7.461e+23
L = 141, Number of Lists of length L = 1.577e+23
L = 143, Number of Lists of length L = 3.195e+22
L = 145, Number of Lists of length L = 6.211e+21
L = 147, Number of Lists of length L = 1.158e+21
L = 149, Number of Lists of length L = 2.073e+20
L = 151, Number of Lists of length L = 3.561e+19
L = 153, Number of Lists of length L = 5.875e+18
L = 155, Number of Lists of length L = 9.308e+17
L = 157, Number of Lists of length L = 1.417e+17
L = 159, Number of Lists of length L = 2.072e+16
L = 161, Number of Lists of length L = 2.911e+15
L = 163, Number of Lists of length L = 3.933e+14
L = 165, Number of Lists of length L = 5.108e+13
L = 167, Number of Lists of length L = 6.380e+12
L = 169, Number of Lists of length L = 7.664e+11
L = 171, Number of Lists of length L = 8.855e+10
L = 173, Number of Lists of length L = 9.843e+09
L = 175, Number of Lists of length L = 1.053e+09
L = 177, Number of Lists of length L = 1.084e+08
L = 179, Number of Lists of length L = 1.074e+07
L = 181, Number of Lists of length L = 1.024e+06
L = 183, Number of Lists of length L = 9.398e+04
L = 185, Number of Lists of length L = 8.307e+03
L = 187, Number of Lists of length L = 7.071e+02
L = 189, Number of Lists of length L = 5.795e+01
L = 191, Number of Lists of length L = 4.575e+00

 Total number of licit lists (probabilistic estimation) = 5.335e+35

 

add(binomial(43000, 2*k+1), k=0..43000/2):
printf("%1.2e", %);

9.75e+12943

 

add(binomial(43000, k), k=1..43000):
printf("%1.2e", %);

1.95e+12944

 

 


 

Download sum_2.mw

@epostma 

Here is the Mathematica warning pad about "Pitfalls in Fitting Nonlinear Models by Transforming to Linearity".
This is the first think you should take inspiration from.

As a consequence, I don't think we would want to change anything about the commands.
Maybe you don't want to change what you did (or your teammates did), but do you really think its professional to return the residuals of the linearized model built by PowerFit or ExponentialFit instead of the residuals of the corresponding nonlinear models?
At the evidence a mistake was done in Statistics:-Regression:-PowerFit and Statistics:-Regression:-Exponential fit: see explanations in the attached file
Regression_PowerFit.mw

NMaybe you still don't see where the problems are? So let's me explain you the simplest one:

  • Let Y = A+X^B the true, or suspect, model which govrtnd yjr rvolution pY wrt X.
  • Let Yobs = Y + E the measurement (or observational) model wher E is an additive mesaurement noise on the observation of Y.
  • Let D = {(xn, yobs,n), n=1..N} the observations.
  • Let log(y) = a + b*log(x) the fitted linearized model.
    Its residues are of course {a + b*log(xn) - log(yobs,n), n=1..N}
  • So the residues in the real physical somain should be
    {exp(log(a + b*log((xn) - log(yobs,n)), n=1..N} = {exp(x)*(xn)b/yobs,n , n=1..N}
  • But the value PowerFit returns are  {a + b*log(xn) - log(yobs,n), n=1..N}

This is the most obvious mistake any user can be awre od by simply ploting the curve y=exp(x)*xb/ and the the points in D on he same graphic.

But there are a lot of other quantities that  PowerFit or ExponentialFit return which are not computed correctly (the proof is that I found a R-squared > 1 on  toy problem PowerFit_vs_Linearized-Fit.mw (see equation (17)) based on the informations PowerFit returns.


So when you write I don't think we would want to change I hope you wanted to say We don't really understand what could force us to do some change

Ar the end it's indeed up to you to change the things and do them correctly or to look elsewhere.
There are few users of the Statistics package and keeping the things as they are won't be that dramatic... but from the point of view of the intellectual honnesty I don't think this will not honor you (or your teamates)

@nm 

I prefer Maple to concentrate only on symbolics. That is what it is best at. For numerics, there are many others and also better options.  
I agree fifty precent.
From a research point of view you are absolutely right Maple is basically the cast and should focus on symbolics.
But from the commercial point of view a numeric facet is mandatory, Wolfram understood that almost to or fifteen years before Maplesoft. I remember the beginnng of the nineties when I was an academic and that commercials from these two competitors came to us to advertise their products, we used to say that Wolfram tries to impress with beautiful graphics, but Maplesoft?... that's serious business.
It always seemed to me that Maple was trying to chase Mathematica, but never quite catching up, because to do so would probably have meant rewriting it from top to bottom. So Maplesoft just some vernish here and there.
One of the last stupid thing it dit? In my opinion the DeepLearning package, just to surf on the wave... but PyTorch or Keras (R) are far better. 
 

By trying to chase all that is fashionable today, It will end up losing market share in all areas.
This is in line with my previous comment.


Also its debugger is hard to use and have not been updated for decades.
I agree one hundred precent.
I'm familiar with Fortran debuggers and Maple's is a pity
 

No need to waste time on numerical solvers which no one will use because other software is better at it.
As I wrote above I believe that if you want to extend your market numerical capabilities are mandatory.
But I would favor more interactions between specialized softwares than the futile attempt to waste time on numerical solvers.
If I'm not mistaken the japanese group Maplesoft belongs to is also the owner of FLUENT and OPTIMUS (maybe this last name has been change today) since it acquired toto around 2010.
These are two very good products Maple couls have a bond with.
Last thing to mention: MapleSim is really a technical success, but look again: how long after Matlab/Simulink did he emerge?
 

It is much much harder to be good at symbolic computation than numerics.
Hum... for having develop these laters for almost fifteen years I can't agree with you.
Whether mathematically or purely computationally (in search of the efficiency on massively parallel machines) numerics is extremely hard too.
Difficulties are not the same, but do not think numerics is that easy. That is why there are really a few major products in each physics domain (to paraphrase you), not hundreds


That is why there are really only two major CAS software out there. 
I feel like you're leaving out some CAS (specialized, OK) but at least one of general use: SageMath 

 

@salim-barzani 

You're wrong saying "there is nothing which maple can't do": in the contrary "there is lot of things Maple can't do".
If your pal is simulating 2D/3D turbulent flows using DNS, RNS, LES or some other stuff like that it is clear it's impossible to do this with Maple (sorry, Maple will be capable to do something on an extremely coarse mesh provided you waste weeks or months to code some naive finite elements method), simply because Maple has not been developped to handle this kind of problems (better to use COMSOL [see @dharr ] or FLUENT for instance).

And so it is for hydrodynamics (DYNA-LS for instance) or solid mechanics (ABAQUS for instance).

Nevertheless some guys here investigated microfluid problems with Maple (Carl Love if I'm not mistaken, browse the Posts)

@salim-barzani 

Thus nothing to do with a Computer Algebra System.
Now can you give some informations about the type of numeric calculation your partener does.
Does it simulate 1D, 2D, 3D flows, compressible/incompressible flows, laminar/transitional/turbulent flows?
As it uses a numeric approach, what kind of numeric solver does it use?

At last some paper uour partner wrote would be a good starting point to give you a more solid opinion in the ability of Maple to hangle its problems.

2 3 4 5 6 7 8 Last Page 4 of 154