Thu Feb 25 19:03:27 MST 1999 aquarius% maple |\^/| Maple V Release 5.1 (WMI Campus Wide License) ._|\| |/|_. Copyright (c) 1981-1998 by Waterloo Maple Inc. All rights \ MAPLE / reserved. Maple and Maple V are registered trademarks of <____ ____> Waterloo Maple Inc. | Type ? for help. # ----------[ M a p l e ]---------- #interface(echo = 3); # ---------- Initialization ---------- > readlib(showtime): > on; # ---------- Set Theory ---------- O1 := x:= {a, b, b, c, c, c}: time = 0.01, bytes = 29490 O2 := y:= {d, c, b}: time = 0.01, bytes = 5330 O3 := z:= {b, e, b}: time = 0.00, bytes = 5194 # [x \/ y \/ z, x /\ y /\ z] => [{a, b, c, d, e}, {b}] O4 := [x union y union z, x intersect y intersect z]; [{c, a, b, d, e}, {b}] time = 0.02, bytes = 10566 # x \/ y \/ z - x /\ y /\ z => {a, c, d, e} O5 := %[1] minus %[2]; {c, a, d, e} time = 0.01, bytes = 9486 O6 := x:= 'x': time = 0.01, bytes = 4602 O7 := y:= 'y': time = 0.00, bytes = 4478 O8 := z:= 'z': time = 0.01, bytes = 4462 # Cartesian product of sets => {(a, c), (a, d), (b, c), (b, d)} O9 := Cartesian:= proc(A, B) local i, j; O9 := {seq(seq([A[i], B[j]], j = 1..nops(B)), i = 1..nops(A))} end: time = 0.02, bytes = 15814 O10 := Cartesian({a, b}, {c, d}); {[a, c], [a, d], [b, c], [b, d]} time = 0.00, bytes = 5630 # ---------- Quit ---------- O11 := quit bytes used=295908, alloc=262096, time=0.16 real 0.68 user 0.19 sys 0.42