Sequence and/or pattern matching

Alex Martelli aleaxit at yahoo.com
Wed Oct 19 04:31:27 EDT 2005


Séb <scapt at unil.ch> wrote:

> Hi everyone,
> 
> I'm relatively new to python and I want to write a piece of code who do
> the following work for data mining purpose :

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.

> 2) I want to find if there are unknown sequences of connexions in my
> data and if these sequences are repeated along the file :
> 
> For example :
> 
> Computer A connects to Computer B then
> Computer B connects to Computer C then
> Computer C connects to Computer A

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?


Alex



More information about the Python-list mailing list