Problem 3 - use the following definition of permutation
below:
List A is a permutation of list B if any of the following are
true:
- list A and list B are both null, otherwise
- a.head=b.head, and a.tail is a permutation of b.tail
- a.head≠b.head, and there exists a list C such that
- a.tail is a permutation of b.head:c, and
- b.tail is a permutation of a.head:c
a) Use induction to prove that any finite list is a permutation
of itself-in other words, that the permutation relation is
reflexive.
b) Using the recursive definition of permutation above, use
induction to prove that if list a is a permutation of list b, then
list b is a permutation of list a-in other words, that the
permutation relation is symmetric.