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

Home > Numbers
Permutation List 3 (Posted on 2023-07-25) Difficulty: 3 of 5
If all the 40320 (base 10) permutations of 12345678 in the hexadadecimal (base 16) representation are put in numerical order, what is the 20230th (base ten) pemutation?

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 solution | Comment 2 of 3 |
There are 5040 permutations that begin with 1, and the same number that begin with each of 2, 3 and 4. that's 20,160 that begin with these, ending with 48765321. The 20,161st is then 51234678, but we need the 70th in the sequence starting at 51234678.

24 of those begin 5123; another 24 begin 5124 and another 24 with 5126.  That takes us up to  the 20232nd permutation, two beyond our goal. That 20232nd permutation is 51268743; the one before that was 51268734; before that, 51268473, which is then our answer.

Check:

>> a=perms(1:8);
>> a=sortrows(a);
>> a(20230,:)
ans =
     5     1     2     6     8     4     7     3
     


  Posted by Charlie on 2023-07-25 09:38:49
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 (9)
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