From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hans Lonsdale Newsgroups: gmane.emacs.help Subject: Re: Finding repetitions of 8-tuples Date: Sun, 1 Jan 2023 18:08:53 +0100 (CET) Message-ID: <1803040745.770128.1672592933878@ichabod.co-bxl> References: <1399831366.706043.1672506045023@ichabod.co-bxl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30927"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Arthur Miller , Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 02 10:51:35 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pCHTi-0007sU-Qi for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 10:51:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCHTC-0007W2-CL; Mon, 02 Jan 2023 04:51:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCHTA-0007Vb-E7 for help-gnu-emacs@gnu.org; Mon, 02 Jan 2023 04:51:00 -0500 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pCHT8-0001Lb-18 for help-gnu-emacs@gnu.org; Mon, 02 Jan 2023 04:50:59 -0500 Original-Received: from hologram (hologram.co-bxl [10.2.0.17]) by wilbur.contactoffice.com (Postfix) with ESMTP id A977E278F; Mon, 2 Jan 2023 10:50:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1672653052; s=20210208-e7xh; d=mailfence.com; i=hanslonsdale@mailfence.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1740; bh=XmAasyQucijXXk0KraetiWWg3mb7NWZox5/740EFVOo=; b=ANdy9RXg14T5cHFBFOZ1xoMayLuXKQcpn/xbD2qv+OpvCMKWpe0N7LbDRiF/HgB9 nSXbu46SpHaAqSSIu1TnPvFHNDYwpdZgXNTGztv31UaDf6eGbl6wygyHyKEnZlDFecA 6hFY5jyB1cpEcoMEaUQ9VPYKYWsTQTJfymyy8IPWS3slrNjsKKLe+1y2HwlcGNupy8/ p6m3q49BBtGUTq4j/63oI7Xg6pzRrdYru2YSr77L13xdimXe3ot55Aw/qsn/dqM/j5j vsOW9BEB4fjCMCB/LbFrNnkqRTQrfo/JY6ZgqfNEHgVyfdsoggu4pjFdJix1gSTryca l8XOnOpClQ== In-Reply-To: X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:377787701 Received-SPF: pass client-ip=212.3.242.68; envelope-from=hanslonsdale@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142091 Archived-At: > ---------------------------------------- > From: Yuri Khan > Sent: Sun Jan 01 17:39:36 CET 2023 > To: Arthur Miller > Cc: Hans Lonsdale , Help Gnu Emacs > Subject: Re: Finding repetitions of 8-tuples >=20 >=20 > On Sun, 1 Jan 2023 at 22:19, Arthur Miller wrote= : >=20 > > > I have 16 collections of 8 numbers > > > > > > (11 12 11 44 11 12 11 23) > > > (12 21 11 44 11 12 11 23) > > > and so on > > > > > > I want to find whether there are repetitions of each 8-tuple. > > > The order in which the numbers occur is not important. > > > > Have you looked at "lists as sets" chapter in the manual? >=20 > This line of thought leads nowhere because treating a list as a set > ignores its duplicate counts. I take it that in the OP=E2=80=99s problem > statement (1 1 1 1 1 2 2 2) is to be considered distinct from (1 1 1 1 > 2 2 2 2), but, treated as sets, they are both equivalent to (1 2). The > original problem calls for multisets =E2=80=94 containers where the order= is > not significant but the counts of duplicates are. That's correct. =20 > Sorting each list and comparing the result of sorting, as suggested in > another reply, is going to be a better approach. Agreed =20 > Alternatively, one might hash each element and xor the hashes > together. However, this carries collision risk inherent in hash-based > solutions =E2=80=94 if hashes are different, the multisets are different,= but > if the hashes are equal, this does not guarantee the equality of > multisets. >=20 --=20 Sent with https://mailfence.com =20 Secure and private email