RE: Searching algorithm

*To*: mathgroup at smc.vnet.net*Subject*: [mg48258] RE: [mg48253] Searching algorithm*From*: "DrBob" <drbob at bigfoot.com>*Date*: Wed, 19 May 2004 05:20:56 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

That's not a 2x2; maybe it's an nx6. If the sublists aren't too large, the following works: <<DiscreteMath`Combinatorica` <<Statistics`DataManipulation` a={{1,8,9,4,6,3},{1,7,9,11,8,54},{73,2,1,61,8,9}}; Last@Last@Sort@Frequencies@Flatten[KSubsets[#,3]&/@a,1] {1,8,9} DrBob www.eclecticdreams.net -----Original Message----- From: Amir [mailto:z64043 at netscape.net] To: mathgroup at smc.vnet.net Subject: [mg48258] [mg48253] Searching algorithm Hello, A = 2x2 matrix {{1,8,9,4,6,3},{1,7,9,11,8,54},{73,2,1,61,8,9},...} Is there any algorithm which can find the most frequent subset of three numbers ( like {1,8,9} ) that appears in A ? Thanks, Amir