# Constructing a list of all three-element subset of a list [closed]

The list I have is

{a,b,c,d,e}

I would like to use ReplaceList to construct a list of three-element subset of the above list.

This would require the use of BlankSequence but I do not understand how it works.

Any help is appreciated.

• Have you seen Subsets[]? – J. M. is in limbo Mar 27 '17 at 14:47
• @Szabolcs I never thought it was a good idea but this came up in an as an exercise in mathematical physics. Would you explain to me how BlackSequence works? – Physkid Mar 27 '17 at 14:50
• @Szabolcs It says "three element subset of the list {a,b,c,d,e}" – Physkid Mar 27 '17 at 14:51
• @Szabolcs It's sort of a prelude...I'm not new to Mathematica but there are stuffs like pattern matching and conditions which aren't something that a non-computer science student would be intimately acquainted with on a daily basis; hence, the bit of obstacles. – Physkid Mar 27 '17 at 14:51
• @J.M. I have. But how does this aid with determining all possible three-elements of a set/list? – Physkid Mar 27 '17 at 14:54

ReplaceList[{a, b, c, d, e}, {___, x_, ___, y_, ___, z_, ___} -> {x, y, z}]

• How does BlankSequence works? I've looked at the documentation but it isn't clearly explained. – Physkid Mar 27 '17 at 14:54
• If you like it better that way: ___ will match any number of comma separated things. – Szabolcs Mar 27 '17 at 14:57