00:01
So we'd like to put some permutations in lexicographic order.
00:03
This is actually relatively straightforward.
00:05
That lexicography is the art or the construction of dictionaries.
00:10
So we're putting them in the order that they would be in if they were in a dictionary, which is the same thing as their numerical order.
00:16
So we're going to index first by the first digit in here.
00:19
Looks like we're going to get these two start with one and neither of the other ones do.
00:24
None of the other ones do.
00:25
So we just need to sort these.
00:28
That's going to be one five before one six.
00:30
So one five six four two three comes before one six five four three two.
00:39
Let's go ahead and cross these out because we're done.
00:43
Now i'm going to start highlighting instead of underlining in green so it doesn't get too messy.
00:46
I'm going to look at all the ones that start with two.
00:52
That's all those.
00:53
They all start with two three so we're going to have to go next two three one and then in fact these are both two three one four.
01:00
So we go two three one through five six before two three one four six five two three one four five six two three one four six five.
01:13
We're done with those.
01:16
I'll go ahead and unhighlight them as well if i can do that carefully.
01:20
And our remaining permutation starting with two is two three four five six one...