Opened 5 years ago

Last modified 5 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:

Status badges

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


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 5 years ago by mirgee

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