Session 3.1 Sets and Lists in Maple

> restart;

> ous:={x,y,x};

An unordered set defined by braces "{" and "}"

Note that the elements have to be distinct

[Maple Math]

> uos[1]; We can not extract elements from the unodered set.

[Maple Math]

> {{a,b},a,{b,b}}; an unordered set can be used as part of an unordered set.

[Maple Math]

> os:=[1,1,3,5];

An ordered set defined by brackets "[" and "]"

[Maple Math]

> os[3];

An order exists for this set, therefore the kth expression can be extracted

[Maple Math]

> {[1,2,3],4};

The use of brackets within braces

[Maple Math]

> os2:=[{a,b},c,{d,d,d}];

The use of braces within brackets

[Maple Math]

> os2[3];

[Maple Math]

> a1:=[[1,2],[3,4],[5,6]];

This is a set consisting of sets of two numbers

[Maple Math]

> a1[2];

Identify the second set in the overall set

[Maple Math]

> a1[3][2];

Identify the second element of the third set in the overall set

[Maple Math]