ç¥ïŒãŽãŒã«ãã³ãŠã£ãŒã¯
ïŒæïŒã»ïŒæ¥ãèªäž»çã«äŒã¿ã«ããŠããŸãã°ãä¹é£äŒãšãªãä»å¹Žã®ãŽãŒã«ãã³ãŠã£ãŒã¯ããã®é£äŒãåŸåã«å
¥ããããããç²ããåºãŠããããã
次ã®åé¡ã§ãç²ããçããŠãã ããã
é·ãïœã®æ°åïœïœïœïœïŒïœïŒïŒãïŒãã»ã»ã»ãïœïŒãããã次ã®æ§è³ªãæºããã
ïŒïŒïŒåé
ã¯ãïŒä»¥äžïŒä»¥äžã®æŽæ°
ïŒïŒïŒïœâ ïœã§ãïœïœïŒïœïœããªãã°ãïœ(ïœ+1)â ïœ(ïœ+1)
ãã®æ§è³ªãæã€æ°åã§ãïœãæ倧ãšãªããã®ãæ§æããŠãã ããã
å€åmã®æ倧ã¯17ã§ãããã
é©åœã«èããã®ã§å
šã綺éºã§ã¯ãªãã§ãããäŸãã°
2,1,3,1,4,2,3,2,4,3,3,4,4,1,1,2,2
m=17 ã§äœããš
å³ç«¯ãšå·Šç«¯ãšã¯åããã®ã«ãªãããã§ããã
ã¯ãã䞡端ã¯åãæ°åã«ãªããŸãã
ãŸãç®ãå
¥ã£ãŠãããšã¡ãã£ãšãããããã®ã§ã11,22,33,44ãé€ããm=13ã§èããŸãã
ïŒm=17ã®ãã¿ãŒã³ããåãæ°åã®é£ç¶ã1æåæžããã°ãã®ãã¿ãŒã³ã«ãªããŸããïŒ
ãŸãå
é ã®æ°åã¯2ãšããŸãã
2ã§å§ãŸã2æ¡ã¯21,23,24ã®3å
2ã§çµãã2æ¡ã¯12,32,42ã®3å
ãå¿
èŠã§ãããå³ç«¯ã2ã§ãªããšä»®å®ãããš
2aâŠA2bâŠB2câŠ
ã®ããã«ãªãã2a,2b,2cã®3åã§21,23,24ã¯ãã¹ãŠçµãããŸããã
ãããããš2ã§çµãããã®ãA2,B2ã®2åãããªãã®ã§è¶³ããŸããã
ãã£ãŠ2ã§å§ãŸããã®ãš2ã§çµãããã®ãåæ°ã«ãªãããã«ã¯
2aâŠA2bâŠB2câŠC2
ã®ããã«2ã§å§ãŸã£ãã2ã§çµãããªããã°ãªããŸããã®ã§ã
巊端ãšå³ç«¯ã®æ°åã¯åžžã«åãã«ãªããŸãã
1 ãŸã§ã䜿ãå Žåãæé·ã® 1 ã€ã¯
1,1
2 ãŸã§ã䜿ãå Žåãããã®ã©ããã® 1 ã 1,2,1 ã«å€ããããã«ã©ããã® 2 ã 2,2 ã«å€ãããš
1,2,2,1,1
3 ãŸã§ã䜿ãå Žåãããã®ã©ããã® 1 ã 1,3,1 ã«å€ããããã«ã©ããã® 2 ã 2,3,2 ã«å€ãããããŠã©ããã® 3 ã 3,3 ã«å€ãããš
1,3,3,1,2,3,2,2,1,1
以äžåæ§ã«ç¹°ãè¿ãã°ãn ãŸã§äœ¿ããšãã® n^2+1 é
ã®æ°åã®äžäŸãé¬æã§ããŸããã
m=17 ã§ææã®æéæ°åãæ±ããã«ãããã
ïŒåã®ç¹ããã§ã¯ãªãã
m-1=16 ã®æ°ãããªãåç°ããŸãã¯æ§æããã®ãé¢çœãã§ããã
DD+ããã«ããæ§æãç䌌ããã° n ã 4 ã®ãšãã n^2 ããã¹ããªããã§ããm-1=16ã¯ãããæºãããŠããŸãã
åè²ã®ããŒãºã«ç³žãéããŠã¯ãã«ã«ã
æºã®äžã«ããããšãã«
茪ãå³åãã«æ¹åã€ããŠã
åããŒãºã®å³é£ãå·Šé£ã®è²ã®ãã¿ãŒã³ããããã
茪ã®ãªãã§ããã«ããšããªãããã«ããã«ã¯
(åè²ã§ãããã)
4â4 = 16 ãæ倧ã§ããããšèŠåœãã€ããŸãã
ããŸã䞊ã¹ãããšãã§ãããã
茪ã£ãã®ç³žãäžç®æã§åæã
ããŒãºãïŒåã«äžŠã¶ããã«ããŸãã
ãã®ãšããåæã®ãããã§ã
è²ã®äžŠã³ã®ã²ãšã€ãæ¶å€±ããŸãã
ãããè£åããããã«
ããŒãºãïŒåè£å
ããŠ
å·Šå³ã®ç«¯ã®è²ãåãã«ãªãããã«ããŸãã
ããã«ãŠã17åã§ãå·Šå³ã®ç«¯ãåãã«ãªã
åãã§ãããããŸãã
è«çãé£ãã§ããŸããã容赊ãã ããã
䜿ããæ°åã{1,2}ã{1,2,3}ãªãã©ããªãã®ã ãããšæã£ãã®ã§èª¿ã¹ãã
{1,2}=>[1,2,2,1,1],[1,1,2,2,1] (ãªã1,2ã®æ°åãå
¥ãæ¿ããŠãå¯)ã§<1ã3å;2ã2å䜿çš>
{1,2,3}=>[1, 1, 2, 1, 3, 2, 2, 3, 3, 1] (1,2,3ã®æ°åã¯ãµã€ã¯ãªãã¯ã«å€æŽã§ããã)ã§<1ã4å;2ã3å;3ã3å䜿çš>
ããããããã®äŸã(1->4.2->1,3->2,4->3)ã«èªã¿æ¿ãããš
{1,2,3,4}=>[1,4,2,4,3,1,2,1,3,2,2,3,3,4,4,1,1]ã§<1ã5å;2ã4å;3ã4å;4ã4å䜿çš>
ããã§äžè¬ã«
{1,2,3,,n}
ã®æ°åã§æ¡ä»¶ãæºããæé·ã®ãã¿ãŒã³ã¯,<1ãn+1å;2ãnå;3ãnå;4ãnå;,nãnå䜿çš>ããŠæé·n^2+1ã®æ°åãäœãããã§ãã
蚌æã¯æ°åŠçåž°çŽæ³ãæåã ã瀺ãæ¹ãåãããªãã
ãããäœéãæ§æå¯èœãã¯
1ãä»ãã1åå€ã䜿çšãããã¿ãŒã³ã«éã£ãŠèª¿ã¹ãã
n=2;2éãïŒäŸã§æãããã®)
n=3;72éã
1;[1, 1, 2, 1, 3, 2, 2, 3, 3, 1]
2;[1, 1, 2, 1, 3, 3, 2, 2, 3, 1]
3;[1, 1, 2, 2, 1, 3, 2, 3, 3, 1]
4;[1, 1, 2, 2, 1, 3, 3, 2, 3, 1]
5;[1, 1, 2, 2, 3, 1, 3, 3, 2, 1]
6;[1, 1, 2, 2, 3, 2, 1, 3, 3, 1]
7;[1, 1, 2, 2, 3, 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 1, 1, 2, 1]
70;[1, 3, 3, 2, 2, 3, 1, 2, 1, 1]
71;[1, 3, 3, 2, 3, 1, 1, 2, 2, 1]
72;[1, 3, 3, 2, 3, 1, 2, 2, 1, 1]
n=4; 82944éã
1;[1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 2, 4, 3, 3, 4, 4, 1]
2;[1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 2, 4, 4, 3, 3, 4, 1]
3;[1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 3, 2, 4, 3, 4, 4, 1]

82942;[1, 4, 4, 3, 4, 2, 4, 1, 3, 3, 2, 2, 3, 1, 2, 1, 1]
82943;[1, 4, 4, 3, 4, 2, 4, 1, 3, 3, 2, 3, 1, 1, 2, 2, 1]
82944;[1, 4, 4, 3, 4, 2, 4, 1, 3, 3, 2, 3, 1, 2, 2, 1, 1]
æªããããã°ã©ã ã§æ¢ããŠããã®ã§ã誰ã確èªé¡ãã
2,72,82944ã¯æ£ããã§ãã
ãŸããn=5ã¯4976640000éãã§ãã
ããããããããã€ãããããšãããããŸãã
n=4ã§ã®çµæãåŸããŸã§ã«åªã«ïŒæé以äžã¯èŠããã®ã§
n=5ã§ã¯ææ°é¢æ°çã«æéãå¢å ããèªåã®ããã°ã©ã ã§ã¯ãã¶ãïŒå¹Žä»¥äžããã£ãŠãç¡çãšæãããã®ã«ãªããŸãã
ãããn=5ã¯4976640000éããšãã¡ã©ããã«ç®åºã§ããããããããã®æã«é©ããããŸãã
管ç人ããããåºé¡ãããåé¡ã«ãã©ããªããšãæå³ããŠããã®ããç解ãããŸã§ã«ãŸãæéãããããããããããã®è§£çãã¿ãŠ
ãã£ãšãã®æå³ãåããå§ããå§ãã¯é
åãæäœæ¥ã§äœãããšè©Šã¿ããçµå±æ··ä¹±ããŠãããäœãšãèªååã§é
åã決ããããªãããš
ãããããã°ã©ã ã§äœãåºããŸã§ã«ãŸãäœåºŠãè©Šè¡é¯èª€ãç¹°ãè¿ããŠãããŸããã
å§ãå
šéšã§é
åãäœåã§ããããæ¢ãçåã«ééã£ãèãæ¹ã§ç®åºããŠããããçµæãç¹æ€ããããã®èãéãã«æ°ä»ããŠã³ãŒãã
å
šé¢çã«ä¿®æ£ããŠãã£ãšäœãšãçµæãåŸããããã§ã¯ãªãããšããé¡æ«ã蟿ããŸããã
èªåãªãã«ãä¿®æ£ãç¹°ãè¿ããªãããããããããšåãçµæãåŸãããããšã«ãšãŠãããããæ°æã¡ã§ãã
ãããããŠ
n=6 㯠23219011584000000
n=7 㯠11800915893414789120000000
n=8 㯠873120530892689265453642547200000000
ã ã£ããããŸãïŒ
ã³ã³ãã¥ãŒã¿ã§ãæµç³ã«ãã®æ¡æ°ã¯å³ããã§ãããïŒ
n=5ã¯æ°åã ã£ãã®ã§ãããn=6ã«ãããæéã¯ãã£ãšèããŠã1å
å以äžããããããªã®ã§ã
ã³ã³ãã¥ãŒã¿ã§ã«ãŠã³ãããæ¹åŒã§ã¯è©ŠããŸã§ããªãå
šãç¡çã§ããã
n ãŸã§äœ¿ããå Žåã«æé·æ°åãäœéãæ§æã§ãããã
ãã®çãã¯å
šãå¥ã®ãããåé¡ãã®çãã足ãããã«ãããšããããšãããšãããŸã§æšæ©å°éããå®éã« n=8 ãŸã§ã®è§£ãïŒåã£ãŠãããã©ãããŸã äžæã§ããïŒæ±ããŸããã
ãããããããã®ãããåé¡ããäžè¬ã® n ã§è§£ãããšããŠäžæ©èããŠãæ¹éãå
šãæãæµ®ãã³ãŸããã
ã¿ãªããã®ååãæ±ããã¹ããå¥ã¹ã¬ããã§ããŸã¡éã®æšããšããŠåºé¡ããŠããŸãã
ãã£ã¡ã解ããã°ãã£ã¡ã解ããã®ã§ãææŠãããããé¡ãããŸãã
ããããã°ãèšäºäžã®
> éããã¿ãŒã³ã§èããŠã¿ããšã
> ïŒãïŒãïŒãïŒãïŒãïŒãïŒãïŒãïŒãïŒãïŒãïŒ
> ã§ã第ïŒïŒé
ç®ã«å
¥ãæ°ã¯ãªãã®ã§ã
ã®äŸã§ã¯ã第 11 é
ã®æç¹ã§ã1, 2ãã 2 åç»å ŽããŠã«ãŒã«éåã«ãªã£ãŠããŸããã
ãããããããæ¢ã«èšŒæããŠããéãããæ°åããã以äžç¶ããããªãããšããçŸè±¡ã¯å¿
ãã¹ã¿ãŒãã«äœ¿ã£ãæ°åã§èµ·ããã¯ãã§ãã
n=9
gp > prod(i=0,8,floor((80+i)/9)!)
%368 = 12123409823952368497816099928432676175872000000000
n=10
gp > prod(i=0,9,floor((99+i)/10)!)
%369 = 39594086612242519324387557078266845776303882240000000000000000000
äžè¬ã«nãªã
prod(i=0,n-1,floor((n^2-1+i)/n)!)
ãšãªããŸãããïŒ
(n!)^n/n ãšåãåŒã§ãããïŒ
n=8 ãŸã§ã¯ç§ãçŽæ¥æ±ããã®ã§ãïŒç§ãèšç®ãã¹ãããŠããªãéãïŒãã®åŒã«äžèŽããçµæã«ãªã£ãŠããŸãã
ãããŠãnâ§9 ã§ãå€åæãç«ã€ãã ãããªãšç§ãæããŸãã
ã§ãããæãç«ã€ãšäºæ³ãããã ãã§ã¯è§£ãããšã¯èšããŸããã
解ãããšå®£èšããã«ã¯æãç«ã€èšŒæãŸã§å¿
èŠã§ãã
ãæé·æ°åã®ç·æ°ããšããŸã¡éã®æšãã®é¢ä¿ã«ã€ããŠæ²èŒããŠãããŸãã
äžè¬ã® n ã®ãŸãŸã ãšãããã«ããã®ã§ããæé·æ°åã®ç·æ°ãã® n=4 ãšããå
·äœçãªè©±ã§é²ããæ¢ã«åºãŠãã 82944 éããšããæ°ãå°åºããŠã¿ãŸãã
ãŸãã
ãæ°åã®çŸåšã®æ«å°Ÿã®æ°ã 4 åç®ä»¥å
ã®ç»å Žãªãã°ã次ã«æžãããšãã§ããæ°ããŸã æ®ã£ãŠãããã¯æ°åã®äœãæ¹ããæããã§ãã
ãã£ãŠå¯Ÿå¶ãèããã°
ã次ã«æžãããšã®ã§ããæ°ããããªããªãã°ãçŸåšã®æ«å°Ÿã®æ°ã¯ 5 åç®ä»¥éã®ç»å ŽãããŠããã
ããšãããããŸãã
ããããæ¡ä»¶
ãsâ t ã§ãa[s]=a[t] ãªãã°ãa[s+1]â a[t+1]ã
ã®å¯Ÿå¶
ãsâ t ã§ãa[s+1]=a[t+1] ãªãã°ãa[s]â a[t]ã
ãããåãæ°ãè€æ°åç»å Žããå ŽåãçŽåã®æ°åã¯å
šãŠç°ãªããªããŠã¯ãããŸããã
ã€ãŸãã5 å以äžç»å Žã§ããæ°ã¯ãå
é ã«ãã 1 ã«éãããŸãã
ã€ãŸãã次ã«æžãããšã®ã§ããæ°ããããªããªã£ãæ°åã¯ãå¿
ã 1 ããå
é ãã1 ã®æ¬¡ãã2 ã®æ¬¡ãã3 ã®æ¬¡ãã4 ã®æ¬¡ããé äžåã« 1 åãã€èš 5 åç»å ŽããçŽåŸã§çµãã£ãŠããŸãã
ããŠãæé·æ°åã®åæ°ãèããŸãããã
ãŸããn=4 ã®æé·æ°åãå®éã«ããããäœã£ãŠãã1 以å€ã®åæ°ã«ã€ããŠã4 åç®ã®ç»å Žã®æ¬¡ã«äœãæžããããã§åé¡ããŸãã
äŸãã°ãGAI ããã®ãªã¹ãã®å
é ã®ãã®ã¯ã4 åç®ã® 2 ã®æ¬¡ã¯ 4ã4 åç®ã® 3 ã®æ¬¡ã¯ 4ã4 åç®ã® 4 ã®æ¬¡ã¯ 1ããšãªã£ãŠããã®ã§ã
1;[1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 2, 4, 3, 3, 4, 4, 1] -> [2->4, 3->4, 4->1]
ãšåé¡ããŸãã
ããŠãã§ã¯åã [2->4, 3->4, 4->1] ã«åé¡ãããæ°åã¯äœåäœããã§ããããã
å®ã¯ããã¯éåžžã«ç°¡åãªåé¡ã§ãã
å
ã«ç€ºããéãããã®ãããªæ°åã¯æé·ã§ãããã§ãªããŠããè¡ãè©°ãŸãã®ã¯å¿
ã 5 åç®ã® 1 ãç»å Žãããšãã§ãã
ãããŠãããã¯ãå
é ãã1 ã®æ¬¡ãã2 ã®æ¬¡ãã3 ã®æ¬¡ãã4 ã®æ¬¡ããå
šãŠæã£ããšãã«ãªãã¯ãã§ãã
ãšãããã4->1 ãšããé¢ä¿ããã以äžã4 ã 4 åç»å ŽããåŸã§ãªããšã4 ã®æ¬¡ãã¯èµ·ãããŸããã
ãããã£ãŠã4->1 ãšããäŸåé¢ä¿ãããã°ãã©ããªã«éã«æ°åãäœã£ãŠããè¡ãè©°ãŸãåã« 4 ã 4 åç»å Žããããšã¯çµ¶å¯Ÿã«ä¿èšŒãããã®ã§ãã
ããã«ã4 ã 4 åç»å Žããã®ã¯ã1 ã®æ¬¡ãã2 ã®æ¬¡ãã3 ã®æ¬¡ãã4 ã®æ¬¡ããå
šãŠæã£ããšãã«ãªãã¯ãã§ããã2->4, 3->4 ãšããé¢ä¿ãããã®ã§ãåæ§ã« 2 ãš 3 ãã©ããªã«éã«äœã£ãŠã 4 åç»å Žããããšãä¿èšŒãããã®ã§ãã
ã€ãŸãã
ã1 ã®ç»å Ž 4 åç®ãŸã§ã¯æ¬¡ã®æ°ã« 1,2,3,4 ãä»»æã®é ã§äœ¿ãã
ã2 ã®ç»å Ž 3 åç®ãŸã§ã¯æ¬¡ã®æ°ã« 1,2,3 ãä»»æã®é ã§äœ¿ãã
ã3 ã®ç»å Ž 3 åç®ãŸã§ã¯æ¬¡ã®æ°ã« 1,2,3 ãä»»æã®é ã§äœ¿ãã
ã4 ã®ç»å Ž 3 åç®ãŸã§ã¯æ¬¡ã®æ°ã« 2,3,4 ãä»»æã®é ã§äœ¿ãã
ãå®ãéããäœããã£ãŠãèªåçã« [2->4, 3->4, 4->1] ã«åé¡ãããæé·æ°åãã§ããããã®ã§ãã
ãã£ãŠããã®ç·æ°ã¯ 4!*3!*3!*3! = 5184 éãã§ãã
ãã㯠[2->4, 3->4, 4->1] ã«éã£ã話ã§ã¯ãªãã®ã§ãåé¡ããããã®äžã§å¿
ã 5184 åã®æé·æ°åãäœããããšã«ãªããŸãã
ã§ã¯ããã®ãããªåé¡ã¯äœçµã§ããããšããããšãèããŸãã
[2->a, 3->b, 4->c] ã® a, b, c ãé©åœã«éžã¹ã°ããããšãããšããã§ã¯ãããŸããã
äŸãã° [2->4, 3->2, 4->2] ã®å Žåã
2 ãš 4 ã¯ãäºãã« 4 åç®ã®ç»å Žããããšãããçžæã® 4 åç®ããåŸã§ãªããšãããªããšããã«ãŒããçºçããŠããŸãã
ã€ãŸãã©ããªã«ããŸããã£ãŠã 2 ã 4 ã® 4 åç®ãç»å ŽããªããŸãŸ 5 åç®ã® 1 ãæ¥ãŠæ°åãçµãã£ãŠããŸãããšãæå³ããŸãã
ãã£ãŠã[2->4, 3->2, 4->2] ãšããåé¡ã¯ååšããŸããã
ããã㯠[2->1, 3->2, 4->4] ã®å Žåã
2 ãš 3 ã«ã€ããŠã¯ 4 åã®ç»å Žãä¿èšŒãããŸãã
ãããã4 ã«ã€ããŠã¯ 4 åç®ã®ç»å Žããããšããã 4 åç®ã® 4 ããåŸã§ãªããšãããªããšããèªå·±ã«ãŒããçºçããŠããŸãã®ã§ã4 㯠4 åç®ã®ç»å ŽããããŸããã
ãã£ãŠãããæé·æ°åã«ã¯çµ¶å¯Ÿã«ãªããã[2->1, 3->2, 4->4] ãšããåé¡ã¯ã§ããŸããã
ã€ãŸã [2->a, 3->b, 4->c] ãšããåç®ã®åé¡ãååšãããåŠãã¯ãäŸåé¢ä¿ã«ãã®ãããªã«ãŒããçºçããªããåŠããèããã°ããããšã«ãªããŸãã
ãããŠããã¯ãããŸã¡éã®æšã㧠1 ãšããé山㚠2, 3, 4 ãšãããŸã¡éãçšæããŠã
2 㯠a ã®é ïŒa=1 ãªãéå±±ïŒã«åºã
3 㯠b ã®é ïŒb=1 ãªãéå±±ïŒã«åºã
4 㯠c ã®é ïŒc=1 ãªãéå±±ïŒã«åºã
ãšããæšãååšãããåŠããèããã°ããããšã«ãªããŸãã
3 æ¬ã®ãŸã¡éã§äœãæšã¯ 16 éãã ãšããã£ãŠããŸãã
ãã£ãŠããã®ãããªäŸåé¢ä¿ã®äœãæ¹ã¯ 16 éããããã«ãæé·æ°åã®åé¡ã 16 çµã§ããããšãããããŸãã
ãããã£ãŠãn=4 ã®æé·æ°åã®ç·æ°ã¯ 5184*16 = 82944 ãšãªããŸãã
äžè¬ã® n ã®å Žåãåæ§ã«èããããšãã§ããŠã
ãn-1 æ¬ã®ãŸã¡éã®æšã®ç·æ°ã * n! * (n-1)! * (n-1)! * âŠâŠ * (n-1)! ïŒ (n-1)! ã¯å
šéšã§ n-1 åïŒ
ãšæ±ããããããšãããããŸãã
ããŠãã§ã¯ããŸã¡éã®æšãã®ç·æ°ãæ±ããåŒïŒèšŒæä»ãïŒã¯ïŒããšããã®ãçŸç¶ç§ããã©ãçããŠããæå
端ã§ãã
ã©ããã
de Bruijn sequence
ãšå¯æ¥ãªé¢ããããããããªæ°ãããŠãŸãããŸããã
管ç人ããã«ãããé¡ã¯ïŒåã§ããã
ãã®å·Šç«¯ãšå³ç«¯ãšãç¹ããŠèŒªã«ããŸãã
ç¹ããã«ãããã䞡端ã¯åãã§ããããçæ¹ã¯é€å»ããŸãã
äžåã« n^2+1 ã®èŠçŽ ããã£ããã®ã
n^2 ã®èŠçŽ ã®ãã茪ã«ããŸãã
de Bruijn sequence ã«ã€ããŠã¯ä»¥äžã
埡åç
§ãã ããã
https://en.m.wikipedia.org/wiki/De_Bruijn_sequence
äžã®èšäºäžã§
"The number of distinct de Bruijn sequences B(k, n) is"
ãšãããŸãã
ãã®èšäºã§ã管ç人ããããã®
ãé¡ã調ã¹ãŠããç§éã®ç®çã«ãããŠã¯
n=2
ã§åºå®ã§èããŠããã§ãã
B(k, n)ã§ã¯ãªããB(k, 2)
ãç¥ãããã®ã§ãã
ãŸãããã®èšäºã«ããã k ã¯
ç§éã解ãããšããŠããåé¡ã® n ã«çžåœããŸãã
ãã®ããšãæèããŠ
B(k, 2) ãæ±ããåŒãã¿ãŠãã ããã
ããŠãããããŠåŸãããæ°ã¯
茪ã«ããŠãããã®ã«å¯Ÿå¿ããŠæ°ããŠããŸãã
茪ãåæããŠå
ã®äžåã«ããã«ã¯
kåããå¿
èŠããããŸãã
ãšãã£ãâŠâŠâŠ
æµ
ãèªã¿æ¹ãããŠãããŸãã
çæ§ããã®åŸ¡æ¹æ£ããé¡ãããããŸãã
ãªãã»ã©ãå¯æ¥ãªé¢ããã©ããããã»ãŒãã®ãã®ã§ããã
ãããã2 çš®é¡ã® n é£ç¶ã§éè€ãé¿ããæ¹åããçºå±ããŠããéœåäžãn çš®é¡ã® 2 é£ç¶ã§ã®è©±ã¯ãããŸããªãã¿ããã§ããã
ã§ãããšããããäºæ³ããŠããåŒãæ£ãããšããä¿èšŒãã§ããããšã¯å€§ããªäžæ©ã§ãã
ããããšãããããŸãã
ããã®åé¡ã¯ã¡ãããšè§£ããåé¡ã§ããããšããã®ã¯æ°åŠã«ãããŠæ倧ã®ãã³ãã§ããããã
ãã®åŸããã°ã©ã ãäœåºŠãé«éåããŠ
n=5ã®æã®4976640000éããäžç¬ã§æ±ããããããã«ãªãã
ãã®ããã°ã©ã ã§n=6ã«ã€ããŠæ±ãããšãã
çŽ23åã§ã23219011584000000éãããšæ±ãŸããŸããã
ïŒåäžæ°åã®é£ç¶ããªããããã®ãæ°ããŠn(n-1)^(n-1)ãæããããã«ããã®ãäž»ãªé«éåïŒ
ããã§ãn=7ã¯æ°ãæ¹ãæ ¹æ¬ããå€ããªããšç¡çããã§ãã
prod(i=0,n-1,floor((n^2-1+i)/n)!)
ãš
(n!)^n/n
ã®çµæãåããã®ã«ãªãã®ãé¢çœããæ§é ãåæãããš
n=3
3!*2!*2!*(3^1)=3!*3!*2!=3!*3!*(3!/3)=(3!)^3/3
n=4
4!*3!*3!*3!*(4^2)=4!*4!*4!*3!=4!*4!*4!*(4!/4)=(4!)^4/4
n=5
5!*4!*4!*4!*4!*(5^3)=5!*5!*5!*5!*4!=5!*5!*5!*5!*(5!/5)=(5!)^5/5
n=6
6!*5!*5!*5!*5!*5!*(6^4)=6!*6!*6!*6!*6!*5!=6!*6!*6!*6!*6!*(6!/6)=(6!)^6/6
n=7
7!*6!*6!*6!*6!*6!*6!*(7^5)=7!*7!*7!*7!*7!*7!*6!=7!*7!*7!*7!*7!*7*(7!/7)=(7!)^7/7

ïŒã€ç®ã®æãprod(i=0,n-1,floor((n^2-1+i)/n)!)ã§æåŸã®éšåã(n!)^n/n
ã«å¯Ÿå¿ããŠããã
ããã«DD++ããã®èšè¿°ãšéãåããããš
ãn-1 æ¬ã®ãŸã¡éã®æšã®ç·æ°ã * n! * (n-1)! * (n-1)! * âŠâŠ * (n-1)!
ïŒ (n-1)! ã¯å
šéšã§ n-1 åïŒ
ãšæ±ããããããšãããããŸãã
n=3ã§ããå Žåã®DD++ããã®è§£èª¬ã«ãã
ã€ãŸã [2->a, 3->b, 4->c] ãšããåç®ã®åé¡ãååšãããåŠãã¯ã
äŸåé¢ä¿ã«ãã®ãããªã«ãŒããçºçããªããåŠããèããã°ããããšã«ãªããŸãã
ãããŠããã¯ãããŸã¡éã®æšã㧠1 ãšããé山㚠2, 3, 4 ãšãããŸã¡éãçšæããŠã
2 㯠a ã®é ïŒa=1 ãªãéå±±ïŒã«åºã
3 㯠b ã®é ïŒb=1 ãªãéå±±ïŒã«åºã
4 㯠c ã®é ïŒc=1 ãªãéå±±ïŒã«åºã
ãšããæšãååšãããåŠããèããã°ããããšã«ãªããŸãã
3 æ¬ã®ãŸã¡éã§äœãæšã¯ 16 éãã ãšããã£ãŠããŸãã
ïŒç§ã¯ããŸãã¡ç解ãåãã§ããŸãããããã®æ°ã4^2ã®éšåã«çžåœããŠããã®ãïŒïŒ
n=5ãŸã§ã¯ã³ã³ãã¥ãŒã¿ã§
[1,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5]
ãåæã«äžŠã³å€ãããšããäŸã®æ°åã®æ¡ä»¶ãæºããããé
åç·æ°ã
4976640000
ãŸã§ç¢ºèªãããŠããã®ã§ããããn=5ã§ã®
5!*4!*4!*4!*4!*(5^3)=5!*5!*5!*5!*4!=5!*5!*5!*5!*(5!/5)=(5!)^5/5(=4976640000)
ã«ããã5^3=125ã¯ããŸã¡éã®æšã®ç·æ°ããšè§£éã§ãããã§ãããã
ãã®åœ¢åŒããã©ãã°äžè¬ã«nã§ã®ããŸã¡éã®æšã®ç·æ°ã= n^(n-2)
ãšãªããããªãã§ãããn>=8 ã§ãããã§ãããšãã蚌æãå¿
èŠãšããããšã§ããããïŒ
https://oeis.org/A000272