Hello,
Is there a way to "ask" an automata if it accepts a word? e.g. a = spot.translate('a U b') a.accepts('b') ?T/F
Regards, Roi
On Fri, Nov 6, 2020 at 2:29 PM רועי פוגלר roi.fogler@gmail.com wrote:
Is there a way to "ask" an automata if it accepts a word?
Simply convert your word to an automaton and check if the two automata intersect.
Hello,
Thank you for your answer, I'm wondering why I have to check if the automata intersect and not if aut_1.contains(word_automata)?
Best Regards, Roi
On Sun, 8 Nov 2020 at 12:03, Alexandre Duret-Lutz adl@lrde.epita.fr wrote:
On Fri, Nov 6, 2020 at 2:29 PM רועי פוגלר roi.fogler@gmail.com wrote:
Is there a way to "ask" an automata if it accepts a word?
Simply convert your word to an automaton and check if the two automata intersect.
-- Alexandre Duret-Lutz
On Mon, Nov 23, 2020 at 7:35 PM רועי פוגלר roi.fogler@gmail.com wrote:
I'm wondering why I have to check if the automata intersect and not if aut_1.contains(word_automata)?
A⊇W is implemented as Ā∩W=∅, where computing the complement Ā is often costly. But if you know that W contains only one element, A∩W≠∅ is equivalent and faster. -- Alexandre Duret-Lutz