# Mathematical Experiment 7

exp7.mws

1. List all subsets of {1,2,3,4,5}.
2. List all permutations of [1,2,3,4,5].
3. Express the number 10 into sums of positive integers without regards to order. For example:
4.  10 = 2+7+1
is the same as
 10 = 1+2+7.
5. Express the number 10 into sums of positive integers with regards to order. For example:
6.  10 = 2+7+1
is different from
 10 = 1+2+7.
7. How many subsets does {1,2,¼,70} have?
8. How many permutations does [1,2,¼,70] have?
9. How many ways to express the number 70 as a sum of positive integers without regards to order?
10. How many ways to express the number 70 as a sum of positive integers with regards to order?
11. List all possible values of
12.  x3-y2+xz
where [ x,y,z] is a permutation of [4,5,6].
13. Here is a systematical generation of all permutations of [1,2,¼,n].

 visit:=proc(k) local t; global v,n;  if k=n then print(v) else for t from  k to n  do v:=subs({v[t]=v[k],v[k]=v[t]},v); visit(k+1); v:=subs({v[t]=v[k] ,v[k]=v[t] },v); od; fi;  end; n:=5; v:=[1,2,3,4,5]; visit(1);
Reference: G. Brassard and P. Bratley, Algorithmics, Theory and Practice, p.186.

exp7.tex