# Math Help - LEXICOGRAPHIC ORDER OF PERMUTATIONS

1. ## 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

2. Hello, dh214!

Could you explain the problem, please?

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!

3. 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
Lexicographical order - Wikipedia, the free encyclopedia

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.
there are 2 and 3 remained to be sitted :P Since 2<3, it'll be 1423.

For c) :
1623547
what if you permutate the last 2 digits ?
It'll give 1623574, and obviously, it is larger. You're done.

etc, etc...