Match Pairs of Numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg86879] Match Pairs of Numbers
- From: Andrew Beveridge <acbev at lanl.gov>
- Date: Tue, 25 Mar 2008 01:14:52 -0500 (EST)
Any help would be appreciated.
I am using Mathematica 5.2 & 6.0
I am having trouble finding the correct form of Pattern Matching for
pairs of Numbers. I do not know whether to use Select, Cases, Pick,
etc. I am also unsure how to set the pattern matching argument.
Assume I have the list
lst = {{1,1}, {1,2}, {1,3}, {1,4}, {2,2}, {3,1}, {3,2}, {3,3}, {4,1}, {4,4}}
I would like to match/select pairs that have the same set of numbers
only reversed, that is, the selection would find
{{1,3}, {3,1}, {1,4}, {4,1} }
Thanks for your help
Andrew C Beveridge
MS M888
Los Alamos National Laboratory
Los Alamos, NM 87545
505-665-2092
e-mail: acbev at lanl.gov
- Follow-Ups:
- Re: Match Pairs of Numbers
- From: Curtis Osterhoudt <cfo@lanl.gov>
- Re: Match Pairs of Numbers
- From: János <janos.lobb@yale.edu>
- Re: Match Pairs of Numbers