Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 45903
Kernel: Python 3

automaton.rdivide(aut)

\newcommand\ldivide{\setminus} Compute the right quotient of two automata, i.e. the automaton recognizing the language of words uu such that there exists a word vv recognized by rhs with uvuv recognized by lhs.

In other words, it is the automata equivalent of languages right quotient, denoted by the operator / and defined by:

K/L=vLK/vK / L = \bigcup\limits_{v \in L} K / v

where K/vK / v is the right quotient of K by the word v, defined like this:

K/v=wKw/v={uuvL}K / v = \bigcup\limits_{w \in K}w / v = \{u \mid uv \in L\}

The algorithm uses the fact that

K/L=(LtKt)tK / L = (L^t \ldivide K^t)^t

where \ldivide is the left quotient.

Preconditions:

  • None

See also:

Examples

import vcsn ctx = vcsn.context('lal_char, b') aut = lambda e : ctx.expression(e).automaton()
a1 = aut('abcd') a2 = aut('cd') a1.rdivide(a2)
Image in a Jupyter notebook

This demonstrates how rdivide is defined: as combination of ldivide and transpose.

(a2.transpose().ldivide(a1.transpose())).transpose()
Image in a Jupyter notebook

More examples can be found for the left division (automaton.ldivide).