# LEXICOGRAPHIC ORDER OF PERMUTATIONS

• Nov 30th 2008, 03:44 PM
dh214
LEXICOGRAPHIC ORDER OF PERMUTATIONS
Find the next larger permutation in lexicographic order after each of these
permutations.
a) 1342
b) 13245
c) 1623547
d) 31528764
• Nov 30th 2008, 08:36 PM
Soroban
Hello, dh214!

Could you explain the problem, please?

Quote:

Find the next larger permutation in lexicographic order ??
after each of these permutations.

a) 1342
b) 13245
c) 1623547
d) 31528764

"Lexicographic" means "like a dictionary."

It sounds like we write out all the possible permutations in words,
. . then list them in alphabetical order.

This is perhaps the silliest "math" problem ever!

• Nov 30th 2008, 11:20 PM
Moo
Quote:

Originally Posted by Soroban
Hello, dh214!

Could you explain the problem, please?

"Lexicographic" means "like a dictionary."

It sounds like we write out all the possible permutations in words,
. . then list them in alphabetical order.

This is perhaps the silliest "math" problem ever!

That's because you don't know how it is applied to mathematics :p
Lexicographical order - Wikipedia, the free encyclopedia

Quote:

Originally Posted by dh214
Find the next larger permutation in lexicographic order after each of these
permutations.
a) 1342
b) 13245
c) 1623547
d) 31528764

Okay, here is what to do, for the first one.

There are 4 digits : {1,2,3,4}
You're asked for the one following 1342.
Since these are permutations, you have to change at least 2 digits.
So let's start with the last 2 digits. If you permutate them, you get 1324. But following the lexicographical order, this is not larger than 1342.

So you'll have to change the 2nd digit. What comes right after 3 in the list ? 4.