All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
A permutation puzzle (Posted on 2006-09-20) Difficulty: 3 of 5
Determine the number of permutations (p1, p2,...p7) of 1,2, ...7; such that for all k 1≤k≤6, (p1, p2,... pk) is not a permutation of (1,2, ...k); i.e., p1≠1; (p1, p2) is not a permutation of (1,2), etc.

What would be the answer if we specify 1≤k<6 instead?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re: k <= 1,2,3,4,5,6 Comment 6 of 6 |
(In reply to k <= 1,2,3,4,5,6 by Steve Herman)

The numbers I get are:


                  max k         answer
1 4320
2 4200
3 4128
4 4050
5 3908
6 3447

a=[1 2 3 4 5 6 7]
for kmax=1:6
p=perms(a); count=0;
for r=1:size(p)
p0=p(r,:); good=true;
for k=1:kmax
pk=p0(1:k);
pt=a(1:k);
if isequal(pt,sort(pk))
good=false;
break
end
end
if good
count= count+1;
end
end
disp([kmax count])
end

  Posted by Charlie on 2020-11-24 20:36:07
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information