Picking pairs of objects from a list of 6

  • Thread starter Thread starter jimmycricket
  • Start date Start date
  • Tags Tags
    List
AI Thread Summary
To find all unique sets of three pairs from the list (a, b, c, d, e, f), a systematic approach is needed. The discussion initially focused on generating all possible pairings of two letters, which can be achieved through nested loops that iterate through the list. However, the main inquiry shifted to creating combinations of three unique pairs, requiring a method to ensure that no elements are repeated across pairs. This can be accomplished by using combinations to select pairs and then filtering those combinations to ensure uniqueness. The final goal is to generate sets like ((a,b),(c,d),(e,f)) and ((a,c),(b,e),(d,f)), ensuring all pairs are distinct within each set.
jimmycricket
Messages
115
Reaction score
2
Given a list (a,b,c,d,e,f) What method can I use to quickly find all 15 pairings of two letters. I can do it without using a specific decision procedure throughout but sometimes combinations get repeated and its hard to check quickly which ones have already been. Essentially I would like an algorithm to find every combination of pairs in a set of arbitrary length/
 
Mathematics news on Phys.org
jimmycricket said:
Given a list (a,b,c,d,e,f) What method can I use to quickly find all 15 pairings of two letters. I can do it without using a specific decision procedure throughout but sometimes combinations get repeated and its hard to check quickly which ones have already been. Essentially I would like an algorithm to find every combination of pairs in a set of arbitrary length/

Loop from x = 1 to N-1

[ Loop from y= x+1 to N

pair = list[x], list [y] ]
 
i don't follow that. Please note I don't know programming i need a more wordy answer please
 
jimmycricket said:
i don't follow that. Please note I don't know programming i need a more wordy answer please

list (1..N) => list = (a, b, c, d, e, f); N = number of members in the list; in this case, N = 6

The loops above, look like:

x=1, y = 2, 3, 4, 5, 6: pairs = (a,b), (a,c), (a,d), (a,e), (a,f)
x=2, y = 3, 4, 5, 6: pairs = (b, c), (b,d), (b,e), (b,f)
x=3, y = 4, 5, 6: pairs = (c,d), (c,e), (c,f)
x=4, y=5, 6,: pairs = (d,e), (d,f)
x=5, y = 6: pairs = (e,f)
 
I've just realized i have not asked the question i meant to ask sorry. What I meant was the find all the sets consisting of 3 uniques pairs from (a,b,c,d,e,f) so e.g. one will be
((a,b),(c,d),(e,f)) and another would be ((a,c),(b,e),(d,f))
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Back
Top