% 例題A1.2.4:辞書式配列 (One More)★★
a,b,c,d,eの5文字を並べた文字列を,アルファベット順に,1番目をabcde,2番目をabced,$\cdots$,120番目をedcbaと番号を付ける. (1)dbecaは何番目にあるか. (2)50番目の文字列は何か.
% 解答(例題A1.2.4)
(1)$\mathrm{a} \square \square \square \square$の形の文字列は,$4!=24(\text{通り})$$\mathrm{b} \square \square \square \square$の形の文字列は,$4!=24(\text{通り})$$\mathrm{c} \square \square \square \square$の形の文字列は,$4!=24(\text{通り})$$\mathrm{da} \square \square \square$の形の文字列は,$3!=6(\text{通り})$$\mathrm{dba} \square \square$の形の文字列は,$2!=2(\text{通り})$$\mathrm{dbc} \square \square$の形の文字列は,$2!=2(\text{通り})$$\mathrm{dbeac}$の形の文字列で1通り,$\mathrm{dbeca}$の形の文字列で1通りある. よって,$24+24+24+6+2+2+1+1=84 (\text{番目})$(2)$\mathrm{a} \square \square \square \square$の形の文字列は,$4!=24(\text{通り})$$\mathrm{b} \square \square \square \square$の形の文字列は,$4!=24(\text{通り})$ここまでの合計は,$24+24=48(\text{通り})$49番目がcabdeであるから, 50番目の文字列は,cabed
% 問題A1.2.4
1,2,3,4,5の5つの数字を並べた数列を,数値順に,1番目を12345,2番目を12354,$\cdots$,120番目を54321と番号を付ける. (1)32415は何番目にあるか. (2)74番目の数列は何か.
% 解答A1.2.4
(1)$\mathrm{1} \square \square \square \square$の形の数列は,$4!=24(\text{通り})$$\mathrm{2} \square \square \square \square$の形の数列は,$4!=24(\text{通り})$$\mathrm{31} \square \square \square$の形の数列は,$3!=6(\text{通り})$$\mathrm{321} \square \square$の形の数列は,$2!=2(\text{通り})$$\mathrm{32415}$の形の数列で1通り よって,$24+24+6+2+1=57 (\text{番目})$(2)$\mathrm{1} \square \square \square \square$の形の数列は,$4!=24(\text{通り})$$\mathrm{2} \square \square \square \square$の形の数列は,$4!=24(\text{通り})$$\mathrm{3} \square \square \square \square$の形の数列は,$4!=24(\text{通り})$ここまでの合計は,$24+24+24=72(\text{通り})$73番目が41235であるから, 74番目の数列は,41253