This repository contains Python code for constructing and studying strip worst-case examples for reduction algorithm used in topological data analysis. These examples are similar to Morozov's worst-case examples but instead of a construction inside a single triangle, they are constructed by adding triangles on a strip of base and fin triangles. The scripts generate these strip examples, compute boundary matrix reductions, and benchmark the runtime of several reduction variants.
src/
strip_create.py Build a worst-case complex, compute matrices, and plot a persistence diagram
strip_runtime.py Benchmark reduction algorithms and save runtime plots
strip_utilities.py Shared helpers for drawing and matrix reduction
notebooks/
run_create_batch.py Generate batches of simplicial complex and persistence diagram images
run_runtime_batch.py Generate batches of runtime benchmark plots
results_* Generated output folders created by the scripts
requirements.txt
LICENSE
README.md
- Python 3.11 recommended
gudhinumpynetworkxmatplotlib
Install with pip:
pip install -r requirements.txtOr with conda:
conda create -n strip-examples python=3.11 -y
conda activate strip-examples
conda install -c conda-forge gudhi numpy networkx matplotlib -yRun all commands from the repository root.
python3 src/strip_create.pyThis script:
- constructs a worst-case filtered simplicial complex for a chosen
n - prints the simplices and persistence pairs
- writes boundary matrix outputs to
notebooks/results_strip_create/ - shows the simplicial complex and persistence diagram
To change the size of the example, edit n in the __main__ block of src/strip_create.py.
python3 src/strip_runtime.pyOptional arguments:
python3 src/strip_runtime.py --t 30 --verbose--t: maximumnvalue used in the benchmark--verbose: print per-ntiming information
This script saves runtime plots to notebooks/results_strip_runtime/.
python3 notebooks/run_create_batch.py
python3 notebooks/run_runtime_batch.pyThese scripts use the non-interactive matplotlib backend and save outputs to:
notebooks/results_create_batch/notebooks/results_runtime_batch/
The repository scripts currently write generated files into notebooks/:
notebooks/results_strip_create/notebooks/results_strip_runtime/notebooks/results_create_batch/notebooks/results_runtime_batch/
These directories contain generated artifacts rather than source code.
src/strip_create.pycurrently uses a hard-codednvalue in its main block.src/strip_runtime.pybenchmarks three reduction variants: standard, twist, and look-ahead.- The plotting scripts require a working matplotlib installation.
This repository contains experiments for the manuscript:
- (submitted to arXiv)
If you use this repository, please cite the associated paper:
@misc{cetinYalcin2026strip,
title = {<Worst-Case Examples for the Computation of Persistent Homology>},
author = {Uzay Cetin and Ergun Yalcin},
year = {2026},
archivePrefix = {arXiv},
primaryClass = {math.AT}
}- Uzay Cetin
- Ergun Yalcin
This project is distributed under the license in LICENSE.