Skip to content

Commit

Permalink
added number of intervals - added refs
Browse files Browse the repository at this point in the history
  • Loading branch information
GauthierE committed Mar 27, 2024
1 parent 13604d4 commit 7bd30ac
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ This code is distributed in the hope that it will be useful. It might be integra
**[1]**: Asashiba, H., Gauthier, E., & Liu, E. _Interval Replacements of Persistence Modules._ arXiv preprint [arXiv:2403.08308](https://arxiv.org/abs/2403.08308) (2024).

**[2]**: Asashiba, H., Escolar, E. G., Nakashima, K., & Yoshiwaki, M. _On Approximation of 2D Persistence Modules by Interval-decomposables._ Journal of Computational Algebra, Volumes 6–7, 2023, 100007, ISSN 2772-8277, [https://doi.org/10.1016/j.jaca.2023.100007](https://doi.org/10.1016/j.jaca.2023.100007).

**[3]**: Kim, W., & Mémoli, F. *Generalized persistence diagrams for persistence modules over posets*. J Appl. and Comput. Topology 5, 533–581 (2021). [https://doi.org/10.1007/s41468-021-00075-1](https://doi.org/10.1007/s41468-021-00075-1).

**[4]**: Asashiba, H., Buchet, M., Escolar, E. G., Nakashima, K., & Yoshiwaki, M. *On interval decomposability of 2D persistence modules*, Computational Geometry, Volumes 105–106, 2022, 101879, ISSN 0925-7721, [https://doi.org/10.1016/j.comgeo.2022.101879](https://doi.org/10.1016/j.comgeo.2022.101879).
59 changes: 52 additions & 7 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,41 @@
"intervals = L.list_int(conv=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"By **[4, Theorem 31]**, we know that the number of intervals should be equal to $\\sum\\limits_{w=1}^3 \\sum\\limits_{w=1}^3 \\frac{(3-w+1)(3-h+1)}{h+w-1} \\binom{h+w-1}{h-1}\\binom{h+w-1}{w-1}$."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"83.0\n"
]
}
],
"source": [
"import math\n",
"m = 3\n",
"n = 3\n",
"S = 0\n",
"for w in range(1,m+1):\n",
" for h in range(1,n+1):\n",
" S += (m-w+1)*(n-h+1)/(h+w-1)*math.comb(h+w-1,h-1)*math.comb(h+w-1,w-1)\n",
"print(S)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -459,6 +490,13 @@
"print(len(intervals))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The number of intervals is indeed equal to 83 here."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -515,7 +553,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 18,
"metadata": {},
"outputs": [
{
Expand All @@ -537,7 +575,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 19,
"metadata": {},
"outputs": [
{
Expand All @@ -562,7 +600,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 20,
"metadata": {},
"outputs": [
{
Expand All @@ -571,7 +609,7 @@
"0"
]
},
"execution_count": 19,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -638,7 +676,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 21,
"metadata": {},
"outputs": [
{
Expand All @@ -647,7 +685,7 @@
"0"
]
},
"execution_count": 20,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -666,7 +704,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -761,6 +799,13 @@
"source": [
"**[3]**: Kim, W., & Mémoli, F. *Generalized persistence diagrams for persistence modules over posets*. J Appl. and Comput. Topology 5, 533–581 (2021). [https://doi.org/10.1007/s41468-021-00075-1](https://doi.org/10.1007/s41468-021-00075-1)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**[4]**: Asashiba, H., Buchet, M., Escolar, E. G., Nakashima, K., & Yoshiwaki, M. *On interval decomposability of 2D persistence modules*, Computational Geometry, Volumes 105–106, 2022, 101879, ISSN 0925-7721, [https://doi.org/10.1016/j.comgeo.2022.101879](https://doi.org/10.1016/j.comgeo.2022.101879)."
]
}
],
"metadata": {
Expand Down

0 comments on commit 7bd30ac

Please sign in to comment.