### The Maxima on-line user's manual

Algebra Calculator

#### Symmdifference

Function: symmdifference (<a_1>, ..., <a_n>) Returns the symmetric difference of sets ` <a_1>, ..., <a_n>`. 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, b, z}
(%i8) symmdifference ({}, S_1, S_2, S_3);
(%o8)                        {1,b, z}```

```(%o1)                                true
(%i2) ```

### Related Examples

##### symmdifference

s_1 : {1,2,3,4,5};

...

...

Calculate

##### symmdifference

? symmdifference;

Calculate

s_1 : {a, b, c};

s_2 : {1, b, c};

s_3 : {a, b, z};

Calculate

##### symmdifference

S_1 : {9, 8, 7, 6, 5,...

S_2 : {98765432100, ...

symmdifference ();

Calculate

##### symmdifference

S_1 : {{}, {{}}, 1, 2...

S_2 : {{},1,{1},{2},3};

symmdifference (S_1,...

Calculate

S_1 : {a, b, c};

S_2 : {1, b, c};

S_3 : {a, b, z};

Calculate

##### symmdifference

s_1 : {1,2,3,4,5};

...

symmdifference (s_1...

Calculate

##### symmdifference

s_1 : {1,2,3,4,5};

...

symmdifference (s_1...

Calculate

##### symmdifference

S_1 : {a, b, c};

S_2 : {1, b, c};

symmdifference ();

Calculate

##### symmdifference

s_1 : {a, b, c, x, y,...

...

symmdifference (s_1...

Calculate