Reaction Network Reasoning With Python Spans
ISEF Category: Mathematics
Ready to Turn This Idea Into a Real Project?
This guide was put together with the help of AI research tools to give you a solid starting point. But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.
For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
Subcategory: Other · Difficulty: Advanced · Setup: Home Setup · Time: Full Year
The Hook
A reaction network can look chaotic, but the math behind it can be neat. Think of it like a set of train tracks that branch, merge, and reconnect. If you can model those connections well, you can predict how a network behaves without simulating every tiny step. That gives you a real math project with a strong computer science flavor.
What Is It?
A chemical reaction network is a map of how substances turn into other substances. You are not trying to prove new chemistry. You are trying to build a math system that represents those reaction paths in a clean, reusable way.
A span is a simple way to describe a shared structure between two things. You can think of it like a bridge with a middle checkpoint. In this project, that bridge helps you compose smaller reaction pieces into bigger networks. The goal is to see whether your framework keeps track of inputs, outputs, and conservation rules in a way that matches textbook examples.
Your Python DSL, or domain-specific language, is a small custom set of commands for describing networks. Instead of writing long code each time, you write compact expressions for reactions, then test whether the composed structure behaves the way you expect.
Why This Is a Good Topic
This is a strong science fair topic because it has a clear input, a clear output, and a way to test correctness. You can compare your framework against known reaction networks and check whether the composition rules preserve the same structure across examples. It also connects pure math to chemistry, so you can talk about models, abstraction, and how good representations make complex systems easier to study. You can realistically learn category theory at a beginner level, code a small interpreter, and design a careful comparison study.
Research Questions
- How does span-based composition change the way reaction networks are represented compared with ordinary directed graphs?
- What is the effect of network size on the time needed to verify conservation rules in the Python DSL?
- Does the framework preserve equivalent reaction behavior when two subnetworks are composed in different orders?
- To what extent does the span-based model reduce ambiguity in networks with shared intermediates?
- Which textbook reaction networks are easiest to encode correctly in the DSL, and which ones produce the most modeling errors?
- How does adding parallel reaction paths affect the number of valid compositions your system can generate?
Basic Materials
- Laptop or desktop computer with Python installed.
- Python text editor or notebook environment.
- A few textbook reaction network examples from chemistry or applied math sources.
- Graph paper or a whiteboard for sketching network diagrams.
- Spreadsheet software for tracking test cases and outcomes.
- Version control software such as Git for saving code changes.
Advanced Materials
- Python environment with NumPy and NetworkX.
- SymPy for symbolic checks on conservation relations.
- A theorem-proving or formal methods tool if you want to test algebraic properties more deeply.
- Sample reaction network datasets from published papers or textbook appendices.
- LaTeX for writing a formal methods section and proofs.
- A code testing framework such as pytest.
Software & Tools
- Python: Builds the DSL, runs network composition tests, and stores outputs for analysis.
- Jupyter Notebook: Lets you prototype examples and inspect intermediate representations quickly.
- NetworkX: Helps you visualize reaction networks as graphs and compare structures.
- SymPy: Checks symbolic relationships and conservation constraints in your models.
- pytest: Runs repeatable tests on your parser, composer, and example cases.
Experiment Steps
- Define the exact reaction network objects your DSL must represent.
- Choose one composition rule and one notion of equivalence to test first.
- Build a small set of textbook examples that cover simple, branching, and shared-intermediate networks.
- Write tests that compare your model output with expected structural properties, not just visual diagrams.
- Plan a way to measure whether the framework simplifies or complicates network reasoning.
- Expand the system only after the first version passes your benchmark examples.
Common Pitfalls
- Treating the project like pure coding, which makes the math claim too vague to evaluate.
- Using only toy examples that are too simple to expose failures in composition.
- Mixing up graph similarity with true network equivalence, which can hide a broken model.
- Skipping conservation checks, which lets the DSL appear correct even when it loses structure.
- Changing the DSL too often, which makes early test results impossible to compare.
What Makes This Competitive
A strong version of this project does more than build a parser. It compares your span-based framework against another representation, then measures where each one succeeds or fails. You can also add formal tests for associativity, equivalence, or conservation, which makes the work much deeper than a demo. If you use nontrivial examples and explain exactly what your model captures, your project starts to look like real mathematical research.
Project Variations
- Test whether the same span-based framework works better for metabolic pathways than for simple classroom reaction chains.
- Compare a span-based DSL with a plain graph-based DSL on the same set of reaction networks.
- Study whether symbolic conservation checks catch more errors than visual inspection alone.
Learn More
- MIT OpenCourseWare, category theory or abstract algebra materials: Search MIT OpenCourseWare for introductory lectures that build the language behind spans and composition.
- nLab, spans: Read the span entry for a careful but advanced explanation of the idea and its uses in category theory.
- NetworkX documentation: Learn how to represent and compare graphs in Python for your network models.
- SymPy documentation: Use symbolic math tools to test conservation laws and algebraic identities.
- PubMed: Search for review articles on reaction network theory if you want a biology or chemistry context for the math.
Mathematics Category Guide
How to Do Real Mathematics Research at Home: A High School Student’s Guide to Free Tools, Affordable Kits, and Public Databases →For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →
To discover more projects, visit the MehtA+ Science Fair Project Discovery Hub →
