% LMex020606_4th.m
% Example 2.6.6 p 94 in
% Larsen & Marx (2006) Introduction to Mathematical Statistics, 4th edition
% Writtten by Eugene Gallagher, Eugene.Gallagher@umb.edu
% http://alpha.es.umb.edu/faculty/edg/files/edgwebp.html
% Written 1/15/2011 & last revised 1/15/2011
% How many permutations of length k=3 can be formed from the set of n=4
% distinct elements, A, B, C, and D?
code=perms('ABCD')
perm4=perms('ABCD')
size(unique(perm4,'rows'))
% Table 2.6.2 is generated by deleting the last column.
perm3=perm4(:,1:3)
% Interesting problem, why does deleting the last base make no difference?
size(unique(perm3,'rows'))
