TommasoBelluzzo / PyDTMC

A library for discrete-time Markov chains analysis.
MIT License
80 stars 18 forks source link

Incorrect `is_absorbing` #14

Closed aadya940 closed 7 months ago

aadya940 commented 7 months ago

image

How is this chain absorbing even though the only absorbing state is '3'. (Which is correct) but state '1' is not communicating with state '3'. In an absorbing markov chain, all states should be able to communicate with an absorbing state if I'm not wrong.

Thanks :-)

Hoping for a reply soon!

TommasoBelluzzo commented 7 months ago

Hi @aadya940.

By definition, an absorbing Markov chain is a Markov chain in which every state can reach an absorbing state. When in S1, you can reach S1 or S2. When in S2, you can reach S1, S2 or S3. This means that from both S1 and S2 you can reach S3.

The correct check to perform is: x.is_accessible('3', '1')