The program bfbs.py has been written as a supplement for the article "Breadth-first fuzzy bisimulations for fuzzy automata" by Stefan Stanimirovi, Linh Anh Nguyen, Miroslav iri and Marko Stankovi. It implements a combination of Procedures 1 and 2 given in the article. The program can be run by executing

python3 bfbs.py filename1 filename2 k bis lattice forward_or_backward

or 

py bfbs.py filename1 filename2 k bis lattice forward_or_backward

depending on whether Linux or Windows is used, where 

- filename1 is the name of a text file specifying a fuzzy finite automaton A,
- filename2 is the name of a text file specifying a fuzzy finite automaton Ap,
- k is a natural number of the word infinity,
- bis is either F (false, which means "simulation") or T (true, "bisimulation"),
- lattice is one of the letters G (Godel), P (Product) and L (Lukasiewicz), 
- forward_or_backward can be empty or one of the words "forward" and "backward",
      where emptiness means "forward".

Examples: 

python3 bfbs.py A1.txt A1p.txt 3 F P
python3 bfbs.py A1.txt A1p.txt infinity T L
python3 bfbs.py A1.txt A1p.txt infinity T G backward

The meaning of the parameters A, Ap, k and bis are described in the article for Procedures 1 and 2. The parameter lattice specifies which residuated lattice among the Godel, Product and Lukasiewicz structures is used. The additional parameter "backward" can be used when backward (bi)simulations are considered instead of forward (bi)simulations. The program outputs the results as for both Procedures 1 and 2. 

An example of a text file specifying a fuzzy finite automaton is given below:

	% Sigma:
	s

	% I:
	1 0

	% F:
	0 1

	% T[s]:
	0 0.4
	0 0.5

Blank lines and lines starting with % are ignored. That file specifies the fuzzy finite automaton A (over the alphabet {s}) considered in an example given in the article. Another example of a fuzzy finite automaton A over the alphabet {s,t} with three states can be as follows:

	% Sigma:
	s t

	% I:
	1 0 0.5

	% F:
	0 0.8 0.9

	% T[s]:
	0   1 0.4
	0   0 0.5
	0.1 0 0.3

	% T[t]:
	1   0.5 0.5
	0   0   0.5
	0   0   0.9

