Part 1: seq(i^2, i = 1 .. 5); 1, 4, 9, 16, 25 a := {1, 2, 3, 4, 5}; a := {1, 2, 3, 4, 5} b := {2, 4, 6, 8, 10}; b := {2, 4, 6, 8, 10} a union b; {1, 2, 3, 4, 5, 6, 8, 10} a intersect b; {2, 4} a minus b; {1, 3, 5} member(2, a); true L1 := [1, 2, 3, 4, 2, 3, 5, 6]; L1 := [1, 2, 3, 4, 2, 3, 5, 6] L2 := [d, e, f]; L2 := [d, e, f] nL1 := op(L1); nL1 := 1, 2, 3, 4, 2, 3, 5, 6 A := array(1 .. 2, 1 .. 3, []); A := array(1 .. 2, 1 .. 3, []) Sum(i^2, i = 1 .. 10); 10 ----- \ ) 2 / i ----- i = 1 diff(z^3, z); 2 3 z PART 2: F(6) = {[1,1,1,1,1,1],[2,2,2],[2,1,1,1,1],[1,2,1,1,1],[1,1,2,1,1],[1,1,1,2,1],[1,1,1,1,2],[2,2,1,1], [2,1,2,1],[2,1,1,2],[1,2,2,1],[1,2,1,2],[1,1,2,2]} PART 3: 1. To convert L1:=[Mercury,Venus,Earth] to L2:=[Mercury,Venus,Earth,Mars], execute the following lines of maple code: L1 := [Mercury, Venus, Earth]; L1 := [Mercury, Venus, Earth] L2 := [op(L1), Mars]; L2 := [Mercury, Venus, Earth, Mars] 2. In our procedure, WALKS(m,n), we walk east and north from (0,0) to (m,n). If m or n were negative, it would be impossible to reach our destination by only walking north and east. As a result, there would be no such paths, which is represented by the empty set. 3. When we run WALKS(0,0), we are asking how many ways are there to walk north and east from (0,0) to (0,0). Since the destination is reachable, we return the only way to get there which is to walk 0 steps north and 0 steps east, which is equivalent to not walking at all, as represented by the empty list. PART 4: f:=proc(n) local W1,W2,w1,w2: option remember: if n<0 then RETURN({}): fi: if n=0 then RETURN({[]}): fi: if n=1 then RETURN({[1]}): fi: if n=2 then RETURN({[1,1],[2]}): fi: W1:=f(n-1): W2:=f(n-2): {seq([op(w1),1], w1 in W1), seq([op(w2),2],w2 in W2)}: end: Running f(6), we get: f(6); {[2, 2, 2], [1, 1, 2, 2], [1, 2, 1, 2], [1, 2, 2, 1], [2, 1, 1, 2], [2, 1, 2, 1], [2, 2, 1, 1], [1, 1, 1, 1, 2], [1, 1, 1, 2, 1], [1, 1, 2, 1, 1], [1, 2, 1, 1, 1], [2, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]} Which matches my calculation. PART 5: NuF:=proc(n) local W1,W2,w1,w2: option remember: if n<0 then RETURN(nops({})): fi: if n=0 then RETURN(nops({[]})): fi: if n=1 then RETURN(nops({[1]})): fi: if n=2 then RETURN(nops({[1,1],[2]})): fi: W1:=NuF(n-1): W2:=NuF(n-2): W1+W2: end: We have that nops(f(n))=NuF(n) for n=0..10 holds: evalb(seq(nops(f(n)), n = 0 .. 10) = seq(NuF(n), n = 2 .. 10)); true NuF(1000); 7033036771142281582183525487718354977018126983635873274260490508\ 71545371181969335797422494945626117334877504492417659910881863\ 63265450223647106012053374121273867339111198139373125598767690\ 091902245245323403501 If we attempted to do nops(F(1000)), maple would complain because it cannot represent NuF(1000) number of sets - it would probably run out of memory.