Deutsch English Français Italiano |
<v4q168$sgqr$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: HenHanna <HenHanna@devnull.tb> Newsgroups: comp.lang.python,sci.lang,sci.math Subject: given Dict=(act, eat, sat, ...) make a long chain (no repeats) with 2-letter overlaps Date: Mon, 17 Jun 2024 12:01:27 -0700 Organization: A noiseless patient Spider Lines: 24 Message-ID: <v4q168$sgqr$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 17 Jun 2024 21:01:30 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7fcfed2c1aa218ac39705005bc220039"; logging-data="934747"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Gf3K8vyBFx2aHptTeLV6cBuAQvej4v2E=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:IkIAouEfEGKEGflK1qG9eFddJQ8= Content-Language: en-US Bytes: 1644 given (a list of 3-letter words) Dict=(act, ATT, eat, sat, sit, cat, bat, dog, god, mat, tim, kim, ...) The object is to make a long chain (no repeats) with 2-letter overlaps. e.g. -- [cat, ate, tea, eat, ATT, ...] What's a good approach (in Python)? in Mathematica, it's easy to find THE Longest chain? is this a typical NP-complete problem? ________________ -- Martha has aspirin in industrial allotments. -- Two women enter erotic icehouse, seduce celibate teacher. -- Rush showed editorial alarmism, smeared educational alliance ceaselessly.