-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSET + partitions gen. funct. + Integers gen funct + refactoring and …
…renaming
- Loading branch information
Showing
5 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ function W_coeff(r;n_tot=200) | |
end | ||
|
||
|
||
|
||
|
||
""" | ||
p_binary_words_doub_runl(k,n) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
""" | ||
stirling_factorial(n) | ||
stirling_factorial_asym(n) | ||
Stirling approximation for n! as (n/exp(1))^n*sqrt(2*pi*n). | ||
``n! \\sim \\sqrt{2 \\pi n} {\\frac{n}{e}}^{n}`` | ||
""" | ||
stirling_factorial(n) = (n/exp(1))^n*sqrt(2*pi*n) | ||
stirling_factorial_asym(n) = (n/exp(1))^n*sqrt(2*pi*n) | ||
|
||
""" | ||
stirling_catalan(n) | ||
stirling_catalan_asym(n) | ||
Stirling approximation for n_th Catalan number . | ||
``frac{4^n}{\\sqrt{\\pi n^3}}`` | ||
""" | ||
stirling_catalan(n) = 4^n/(sqrt(pi*n^3)) | ||
stirling_catalan_asym(n) = 4^n/(sqrt(pi*n^3)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
""" | ||
SEQ(z) | ||
Sequence operator | ||
Sequence operator (Pólya quasi-inverse operator). | ||
Defined as ``A = SEQ(B) \\implies A(z) = \\frac{1}{1 - B(z)}``. | ||
""" | ||
function SEQ(z) | ||
z = SymPy.symbols("z") | ||
return(1/(1-z)) | ||
end | ||
|
||
|
||
""" | ||
MSET(z) | ||
Multiset operator (Pólya exponential operator). | ||
Defined as ``A = MSET(B) \\implies A(z) = \\frac{1}{1 - B(z)}``. | ||
""" | ||
SEQ(z) = 1/(1-z) | ||
function MSET(z,max) | ||
z = SymPy.symbols("z") | ||
n = SymPy.symbols("n") | ||
return(exp(summation(1/n * z^n,(n,1,max)))) | ||
end | ||
#MSET(z) = prod(1-z^n)^((-1)*(-B_n)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters