symbolp SciMax Toolbox symmetric

SciMax Toolbox >> symmdifference

symmdifference

Maxima Function

Calling Sequence

symmdifference (a_1, ..., a_n)

Description

Returns the symmetric difference, that is, the set of members that occur in exactly one set a_k.

Given two arguments, symmdifference ( a, b) is the same as union ( setdifference ( a, b), setdifference(b, a)).

symmdifference complains if any argument is not a literal set.

Examples:

(%i1) S_1 : {a, b, c};
(%o1)                       {a, b, c}
(%i2) S_2 : {1, b, c};
(%o2)                       {1, b, c}
(%i3) S_3 : {a, b, z};
(%o3)                       {a, b, z}
(%i4) symmdifference ();
(%o4)                          {}
(%i5) symmdifference (S_1);
(%o5)                       {a, b, c}
(%i6) symmdifference (S_1, S_2);
(%o6)                        {1, a}
(%i7) symmdifference (S_1, S_2, S_3);
(%o7)                        {1, z}
(%i8) symmdifference ({}, S_1, S_2, S_3);
(%o8)                        {1, z}
symbolp SciMax Toolbox symmetric