Opened 2 years ago

Last modified 2 years ago

#22858 new defect

Failed to find kleene star of a finite automaton

Reported by: mirgee Owned by:
Priority: minor Milestone: sage-8.0
Component: combinatorics Keywords: finite state machines, automata, kleene star
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mirgee)

Given the following automaton

aut = Automaton({'p':[('p','b'),('q','a')], 'q':[('r','a'), ('r','b')], 'r':[('p','a'),('p','b')]}, initial_states=['p'], final_states=['r'])

and its kleene star

_kleene = Automaton({'i':[('p','b'),('q','a')], 'p':[('p','b'),('q','a')], 'q':[('r','a'), ('r','b'), ('i','a'), ('i','b')], 'r':[('p','a'),('p','b')]}, initial_states=['i'], final_states=['i'])

the following code

_kleene.is_equivalent(aut.kleene_star())

outputs False, which it shouldn't. The automaton produced by aut.kleene_star() differs from aut only in that p becomes also final state.

Change History (1)

comment:1 Changed 2 years ago by mirgee

  • Description modified (diff)
Note: See TracTickets for help on using tickets.