Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Serhiy Storchaka Newsgroups: comp.lang.python Subject: Re: Detecting repeated subsequences of identical items Date: Thu, 21 Apr 2016 14:56:07 +0300 Lines: 14 Message-ID: References: <571843f9$0$1585$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de +r4AfP4VgTANKW/Il9ZQxAxzkGgnBFwOJy5Dnn9GVUvA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'compression': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:Detecting': 0.16; 'wrote:': 0.16; 'have:': 0.18; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:" 20': 0.26; 'problem': 0.33; 'algorithms.': 0.33; "d'aprano": 0.33; 'steven': 0.33; 'this?': 0.34; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'data': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'charset:windows-1252': 0.62 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 193.202.118.165 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <571843f9$0$1585$c3e8da3$5496439d@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <571843f9$0$1585$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:107448 On 21.04.16 06:07, Steven D'Aprano wrote: > Now I want to group subsequences. For example, I have: > > "ABCABCABCDEABCDEFABCABCABCB" > > and I want to group it into repeating subsequences. [...] > How can I do this? Does this problem have a standard name and/or solution? This is a part of lossless data compression algorithms. See for example LZ, LZW.