This site is no longer maintained and has been left for archival purposes
Text and links may be out of date
Set manipulation
There are various extensions to Mathematica's set manipulation algorithms.
sums over elements in the set U. It can be represented compactly using the Notation package:
![[Graphics:../Images/index_gr_51.gif]](../Images/index_gr_51.gif)
This subdivides a set into lists of length {1,2,3,4}:
![[Graphics:../Images/index_gr_53.gif]](../Images/index_gr_53.gif)
TakeAway[U,V] or U\V removes exactly the elements in V from U:
![[Graphics:../Images/index_gr_55.gif]](../Images/index_gr_55.gif)
There are 7 ways of partitioning a set of 4 elements into 2 parts:
![[Graphics:../Images/index_gr_57.gif]](../Images/index_gr_57.gif)
FlattenList extracts elements in the nested list of the form {_,_}:
![[Graphics:../Images/index_gr_59.gif]](../Images/index_gr_59.gif)
Flatten[] cannot be used, because it would remove the list structure entirely.
This site is no longer maintained and has been left for archival purposes
Text and links may be out of date