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

Home > Just Math
Perplexus arrangement (Posted on 2022-08-08) Difficulty: 2 of 5
The letters in the word PERPLEXUS can be arranged in 90720 ways.

If these arrangements are placed in alphabetical order and numbered (EELPPRSUX = 1), which number will PERPLEXUS be assigned?

No Solution Yet Submitted by Jer    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution three ways (spoiler) Comment 1 of 1
Matlab commands:

>> a=string(sortrows(uniqueperms('perplexus')));
>> find(a=="perplexus")
ans =
       32670
       
       
A more complex way--VB program:

Private Sub Form_Load()
  x$ = "EELPPRSUX": n = 1
  Do While x$ <> "PERPLEXUS"
    permute x$
    n = n + 1
  Loop
  Text1.Text = x$ & " " & n
End Sub

which invokes the routine that's the solution to my Permutations puzzle.


It finds:

PERPLEXUS 32670

Analytic solution:

If there had been no repeated letters in the word, the method described in my solution to Permutation List would have been directly applicable.  Modifying it a little to take care of the repeated letters:

Alphabetic order EELPPRSUX

Those that start with E or L all come before PERPLEXUS:

With E:  8!/2 = 20160

With L:  8!/4 = 10080

Those that start with PE followed next by E, L or P also precede PERPLEXUS:

PEE: 6! = 720

PEL: 6! = 720

PEP: 6! = 720

Those that start PER, but then continue with E or L:

PERE: 5! = 120

PERL: 5! = 120

Those that start PERP, but then continue with E:

PERPE: 4! = 24

Now, those that start PERPLE, have endings

SUX, USX, UXS, USX or XSU all before XUS.

That's 5 more, and then we add 1 because we want PERPLEXUS's ordinal number.

20160 + 10080 + 3*720 + 2*120 + 24 + 5 + 1 = 32670

I'll admit: the first time through this analytic version, I forgot to consider the sequences that start PEP, and wound up 720 short, which I wouldn't have noticed had I done the analytic version without the computer version.

  Posted by Charlie on 2022-08-08 08:48:10
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 (0)
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