This program calculates the zero forcing number (and set) of any graph. The zero forcing number is defined as follows:
A subset S of initially infected vertices of a graph G is called forcing if we can infect the entire graph by iteratively applying the following process. At each step, any infected vertex which has a unique uninfected neighbour, infects this neighbour. The forcing number of G is the minimum cardinality of a forcing set in G.
sage -pip install -i https://test.pypi.org/simple/ zeroforcing
sage -pip install .
sage -pip install zeroforcing[test]
sage --python3 setup.py wavefront
sage -pip install .
sage --python3 -m pytest [-x]
-x
flag makes pytest stop after the first failure-h
flag will show a section calledZero forcing options:
from zeroforcing import *
- Download Docker from the Docker website
- Run
docker build -t zeroforcing .
in the directory this git repository is located in - Run
docker run --rm -it zeroforcing
- The package should be automatically installed inside of the container and Sage should be running. Have fun!