behaviorofamax-plusautomatonforagivenstring
def behavior(self, setofevents:str)->Matrix:
result = Matrix.ones(self.nStates,self.nStates)
result = otimes(self.alpha, result)
for i in setofevents :
result = otimes(result , self.mu[i])
result = otimes(result , self.beta)
return result
setofevents = (a,a,b,b)
behavior = A.behavior(setofevents)
print(behavior)
it should return 16 and it does but if we look at the automaton we can observe that it can be also 9 or 15 or 15 or 16 but it print only 16
"""""
def behavior(self, setofevents:str)->Matrix:
result = Matrix.ones(self.nStates,self.nStates)
result = otimes(self.alpha, result)
for event in setofevents :
for key in list(self.mu.keys()):
if key.name == event :
result = otimes(result,self.mu[key])
return result
setofevents = "aabb"
behavior = A.behavior(setofevents)
print(behavior)
it should return 16 and it does
but if we look at the automaton we can observe that it can be also 9 or 15 or 15 or 16 but it print only 16
"""