Sequence and/or pattern matching

Séb scapt at unil.ch
Wed Oct 19 04:57:38 EDT 2005


> Essentially, if I understand correctly, you want to detect LOOPS given a
> sequence of directed connections A->B.  "loop detection" and "graph"
> would then be the keywords to search for, in this case.

Exactly, but the sequence has to be discovered by the piece of code !

> Does this "then" imply you're only interested in loops occurring in this
> *sequence*, i.e., is order of connections important?  If the sequence of
> directed connections was, say, in the different order:
>
> B->C
> A->B
> C->A
>
> would you want this detected as a loop, or not?

Yes, it would be nice to detect it as a loop, with for example a
threshold. Btw, it would be nice to ignore additional connections in
such a way :

B->C # Normal connection
D->E # Additional connection to ignore
A->B # Normal connection
C->A # Normal connection

Would it be possible ?

Thank you very much




More information about the Python-list mailing list