ã«ãŒãããžãã¯ïŒ
ããŒãã«ã§æ«é²ãããã«ãŒãããžãã¯ã§ãã
æååž«ãšãã®å©æãšãããŒãã«ã«éã客ã®ãªãããéžã°ããïŒåãèšïŒåãããžãã¯ã®äž»åœ¹ãšãªããŸãã
ããžãã¯ã®éå§æç¹ã§æååž«ã¯ç®é ããããŸãã
ãã©ã³ãã«ãŒãããžã§ãŒã«ãŒãå«ããŠïŒïŒæãã客ã«ã·ã£ããã«ããŠããããŸãã
ã·ã£ããã«ã®ä»æ¹ã¯ç¹å¥ã®ãã®ãšãªããŸãã
ïŒïŒæã®ããã¯ã®ã»ãŒååãåãã ããŠè¡šãšè£ãšãå
šéšå転ãã æ®ãã®ååãšäœµããŠã·ã£ããã«ããŸãã
ãªãã«ã·ã£ããã«ã䟿å©ã§ããããã³ãºãŒã·ã£ããã«ã§ãå¯ã§ãã
äœåããã®ã·ã£ããã«ãç¹°ãè¿ããã²ãšãŸãšãã«ããŠè¡šãšè£ãšãæ··åšããããã¯ã«ããŸãã
客ã¯ããã®ããã¯ããïŒæãæãåºããŠãä»ã®å®¢ãšå©æã«è¡šãèŠããŸãã
ããªãã¡ïŒããšãã°ã¯ã©ãã®ïŒãªã©ãšïŒå
±æç¥ãšããŸããç¡è«ãæååž«ã¯ãããç¥ãããšã¯ãããŸããã
ããã第äžã®ã«ãŒããšããŸãã
å
šãåæ§ã«ããŠã客ã¯ç¬¬äºã®ã«ãŒããæãåºããŸããä»åºŠã¯ãã¹ãã¬ãããããäžããè£ã«ãªã£ãŠããã«ãŒããïŒææããŸãã
ããã§ãæ®ãã®ïŒïŒæã®ããã¯ããå©æãããŒãã«äžã«ãªãã³ã¹ãã¬ããããŸããè¡šãšè£ãšãæ··åšããŠããŸãã
客ã第äžã®ã«ãŒããããªãã³ã¹ãã¬ããã®ä»»æã®äœçœ®ã«ããè£ã«äŒããŠãæ¿å
¥ããŸãã
次ã«ãå©æã第äºã®ã«ãŒããããªãã³ã¹ãã¬ããã®ç¹å®ã®äœçœ®ã«ãïŒæååž«ãšæã¡åããæžã¿ã«ïŒæ¿å
¥ããŸãã
ãã®éã«ã¯ãè¡šãšè£ã®ã©ã¡ãã§æ¿å
¥ãããã¯ãæååž«ãšæã¡åããæžã¿ã®æ¹æ³ã§æ±ºããããŸãã
第äžãšç¬¬äºã®ã«ãŒããæ¿å
¥ãããåŸã客ã«ãã«ãŒãã®é çªãå€ããªãããã«ããªãããªãã³ã¹ãã¬ããã
ãã¡ããšæããŠããã¯ã«ããŠããããŸãã ããã¡ããšæããããšãã匷調ããŸãã
ãã®æç¹ã§å©æã«ã¯ãããã«ãŒã®äžã«å
¥ã£ãŠããããŸãã
æåŸã«ãæååž«ãç®é ããã¯ãããŸãã
æååž«ã¯ãããã¯ãåã³ãªãã³ã¹ãã¬ããããŸãã
æååž«ã¯ãïŒäŒããŠããã¯ãã®ïŒç¬¬äžã®ã«ãŒããäœã§ããããèšãåœãŠãŸãã ããšãã°ãã¯ã©ãã®ïŒãªã©ãšã
以äžããæ°çããžãã¯ãšããŠæç«ãããšããããšãæ¬æ¥ããããã§ç¥ããŸããã
æ°æ¥åŸã«å
ãã¿ããæ¡å
ãããããåããŸãã
ããžãã¯ã®ã¿ããã©ã®ãããªãã®ã§ããããçããããèãã«ãªã£ãŠããã ããã°ãšã
ãããããªããšãèãã€ããªããšãä¿¡ããããŸããã§ããã
質åã3ã€ã»ã©
ïŒ;éåžžãžã§ãŒã«ãŒã¯å€ãããšãå€ãã®ã§ããããã®å Žåã¯ïŒïŒæã«ããŠããå¿
èŠããããŸããïŒ
ïŒ;ïŒïŒæã®ããã¯ã®ã»ãŒååãåãã ããŠè¡šãšè£ãšãå
šéšå転ãã æ®ãã®ååãšäœµããŠã·ã£ããã«ããŸãã
ãªãã«ã·ã£ããã«ã䟿å©ã§ããããã³ãºãŒã·ã£ããã«ã§ãå¯ã§ãã
äœåããã®ã·ã£ããã«ãç¹°ãè¿ãã
ãšãããŸãããïŒåç®ãååå
šéšãã²ã£ããè¿ããŠãªãã«ã·ã£ããã«ããŠããããã§ããïŒ
3ïŒãªãã³ã¹ãã¬ãããããŸãŸã®ç¶æ
ã§ãæååž«ã¯åœãŠãã®ã§ããïŒ
ããåœç¶åœãŠãã«ãŒãã¯è£åãç¶æ
ã§ãããã
æžãæ¹ãææ§ã§ç³ãèš³ããããŸããã§ããã
ãã®ïŒ
ïŒïŒ;éåžžãžã§ãŒã«ãŒã¯å€ãããšãå€ãã®ã§ããããã®å Žåã¯ïŒïŒæã«ããŠããå¿
èŠããããŸããïŒ
âç§ã®æµ
çœãªç解ã§ã¯ïŒïŒæã«ããå¿
èŠã¯ãªãããšããšåããŸãã
ïŒæå
ã§ã¯å®¢ãããå°ãªãææ°ã®äžããïŒæãæããã¹ãã¬ããããã®ã¡ã«ç¬¬äžã®ã«ãŒãã客ãè£åãã«
äŒããŠå床æ¿å
¥ããã®ã¡ã«ãå©æã第äºã®ã«ãŒããæŽã«æ¿å
¥ããå Žåã§ãæååž«ãåœãŠãã±ãŒã¹ãæ€èšã
ããã®ããããŸããå¯èœã§ãããïŒ
ãåŸæ¥ã«ã¯ïŒ·ïŒ¥ïŒ¢äžã«ããå
ãã¿ã®ããŒãžã®ïŒµïŒ²ïŒ¬ããæ¡å
ããæåã§ãããå
ãã¿ã§ã¯ïŒïŒæãšãªã£ãŠ
ããŸããå®ã¯ãäžã§æžãããææ°å°ãªãããŒãžã§ã³ã®ãã®ã¯ãç§ãã»ãŒåæ¥ã§ããæ¹ãäœæãããã®ã§ã
ããå®éã®æŒæã¯ïŒå€æè¡šãèŠãããªã©ã®è² è·ãããïŒããªã倧å€ã§ãããšãããå
ãã¿ã§ã¯ãã¡ãã£ãš
ããæç®èœåãããã°ã§ããããã«ãªããã³ããã䜵ããŠæžããŠãããŸãããç·Žç¿ããã°ã§ãããããšæ
ãããŠãããŸããã
ãã®ïŒ
ïŒïŒåç®ãååå
šéšãã²ã£ããè¿ããŠãªãã«ã·ã£ããã«ããŠããããã§ããïŒ
ã¯ããã²ã£ããããããŠããããŸãã奜ããªã ãç¹°ãè¿ããŠè¡šãšè£ãšãã©ãã©ããšæ··ãã£ãŠããããšã
芳客ãã¡ãäœæããããšãç®çãšããŸãã
ãã®ïŒ
ïŒãªãã³ã¹ãã¬ãããããŸãŸã®ç¶æ
ã§ãæååž«ã¯åœãŠãã®ã§ããïŒåœç¶åœãŠãã«ãŒãã¯è£åãç¶æ
ã§ãããã
ãã£ãããéãã§ãã
ä»ã«ãã質åãããããŸãããããé¡ãããããŸãã
ã«ãŒããïŒïŒæã®ã±ãŒã¹ã«ãããªãåãçµãã®ã¯é£ãããããããŸããã®ã§ãä»åã®æçš¿ã§ã¯ãã«ãŒãïŒæã®ãããã¥ã¢ããŒãžã§ã³ã§ã
ãªããšãèŸãããŠå¯èœãªçš®æãããããããŸãããã ããã®ãŸãŸã§ã¯ïŒïŒæã®å Žåã«ã¯äœ¿ããŸããã®ã§ãããããããè©«ã³ããããŸãã
ãžã§ãŒã«ãŒããã³ã«ã¹ããŒããããŒãããã€ã€ãã¯ã©ãã®åãšãŒã¹ãèšïŒæã«å€æŽããŠã§ã®æåã®ããæ¹ã§ãã
ãŸãã¯å¥è¡šããããé ããŸãã
ââââââ
âå¥è¡šâ
ã¹ããŒãã®ïŒ¡
10000
00110
01001
11010
10111
ããŒãã®ïŒ¡
01000
00101
10110
11001
01111
ãã€ã€ã®ïŒ¡
00010
10100
01101
10011
11110
ã¯ã©ãã®ïŒ¡
00001
01100
10010
01011
11101
ãžã§ãŒã«ãŒ
00100
00011
11000
01110
10101
11111
ââââââ
5ãããã®åã26åã¶ããäžã®å¥è¡šã®ããã«çšæããŸãã
æååž«ããã³ã«å©æã¯ãã®å¥è¡šãäžžæèšããŸãã
ã«ãŒããè¡šãªã0ãè£ãªã1ãšçŽæããŠãããŸãã客ã第äžã®ã«ãŒãããªãã³ã¹ãã¬ããã«æ¿å
¥ãã段éã§ã¯ã
ãŸã 4ãããã®åã§ãã
å©æã¯ç¬¬ïŒã®ã«ãŒããããªãã¡ïŒé©å®0/1ãéžæããïŒãã1ããããããªãã³ã¹ãã¬ããã®ãªãã®é©åãªäœçœ®ã«
æ¿å
¥ããããšã§ãæååž«ã«ãã©ã®ã«ãŒãã第äžã®ã«ãŒãã§ãã£ãããäŒããŸãã
ããšãã°ã客ã®ç¬¬äžã®ã«ãŒãããã€ã€ã®ïŒ¡ã§ãã£ããšããŸãããã
ãŸãã第äžã®ã«ãŒããæ¿å
¥ãããåŸã®ãªãã³ã¹ãã¬ããã®æ§åã次ã®ããã§ãã£ããšããŸãããã
0101
å©æã¯å¥è¡šã®ãªããã
01101ãéžæããŸãã
0101 ã®ããã ã®
01X01
Xã§ãããããäœçœ®ã«ã
1 ãæ¿å
¥ããã°
01101
ãšãªãããã§ããå©æãããã«ãŒã«ã¯ãããæååž«ãç®é ããã¯ããã段éã§ãæå垫㯠01101ãã¿ãŠã
ãã€ã€ã®ïŒ¡ã§ãã£ããšãããã®ã§ãã
ä»»æã®ç¬¬äžã®ã«ãŒããšãä»»æã®4ãããã®ãªãã³ã¹ãã¬ããã«ã€ããŠãå©æã第äºã®ã«ãŒããããªãã¡
é©åã«éžãã 0ãŸãã¯1ã®1ããããé©åãªäœçœ®ã«æ¿å
¥ããã°ã å¥è¡šã«åŸã£ãŠå©æã¯æååž«ã«ç¬¬äžã®
ã«ãŒãã®å
容ãäŒããããšãã§ããããã«ãªã£ãŠããŸããïŒãã®ããã«å¥è¡šãã€ãã£ãŠãããŸããïŒ
ããŠãå¥è¡šæèšæ¹åŒã¯ã«ãŒãïŒæã§ã¯ãããããŠåºæ¥ããããããŸããããã©ãããžã§ãŒã«ãŒãã¿ã®
ïŒïŒæã®å Žåã§ã¯äºå®äžäžå¯èœã§ãã
èšå€§ãªå€§ããã®å¥è¡šãæèšããããšãªã©ã¯ãšãŠãåºæ¥ããã«ãããŸããã
ããŠãã©ããããããã®ã§ããããâŠâŠ
ä»åã®å¥è¡šã«å
åšããŠããä»æãã«æ°ãã€ããã°ãïŒïŒæã§ãã§ããããªããªãã¯ã«ãªããããããŸããã
次åã®æçš¿ã§ã¯ããã®ã«ãŒãããžãã¯ã®åºå
žïŒµïŒ²ïŒ¬ããæ¡å
ããããŸãã
æéãããã°ãã¿ãæ¢ããè©Šã¿ãŠããã®ã§ãã
ã«ãŒãã®æ
å ±ãšããŠã¯è¡šåã(0)ãè£åã(1)ãªã®ã§ããã§ã«ãŒããåœãŠãããã«ã¯
ããŒã¯ïŒïŒã¿ã€ãïŒã§2ããããæ°å(1ïœ13ïŒã§4ãããèš6ãããã®èå¥ãå¿
èŠãªãã ãã客ãè¡ãã©ã³ãã ã·ã£ããã«
ã®ããã«äžŠã¶ã«ãŒãã¯åå·®äžå¥ãªãé
åãšãªãããããå©æãæ¿å
¥ããã«ãŒããã©ãã«ãªãã®ãåãããªããªãããã§ã
éåžžã§ã¯ãšãŠãäžå¯èœã«è¿ãæ¡ä»¶ã«èŠããŸãã
ããã§ã«ãŒããåœãŠãããã«ã¯ãè¡šåãã®ã«ãŒãã¯å¯Ÿè±¡ããå€ããã®ã ãããéåžžçŽåæ°ã®è£åãã«ãŒãã®äžã«é ãã
ïŒæ¥µç«¯ãªè©±ã·ã£ããã«ã®çµæå
šéšã®ã«ãŒããè¡šåããè£åãã«ãªãäºã£ãŠèµ·ããåŸãŸããããïŒãããã§ãåœãŠãããïŒïŒ
客ã®ã«ãŒãã®ããŒã¯ãšæ°åããå©æãå·®ã蟌ããã«ãŒãã®äœçœ®ãšãè¡šãè£ãã®æ
å ±ããåŸãããæã¯ç¡ããšæãããã
åœãŠã人ã¯å©æãã©ãã«ã«ãŒããå·®ã蟌ãã§ããã®ããã©ã®ããã«ããŠå€æã§ããã®ãå
šãããããŸããã
è¡šè£ãé£ç¶ããéšåã¯äžæ¬ããŠäžæãšè§£éããŠããã°ãäžãã5ã€åã¯äŸãšããŠç€ºããŠããé
åã®ã©ããã«åœãŠã¯ãŸãããã§ãã
5æã«å¯ŸããŠã¯ãã®è§£æ±ºæ¹æ³ããããããªã®ã§ïŒãŸã 詳ããã¯ç¢ºèªããŠãŸãããã»ã»ã»ïŒããã®æã䜿ã£ãŠå©æãã«ãŒããå·®ã蟌ãã°
äœãšããªããã§ã¯ãšæã£ãŠããŸããã§ãæ°åã®å€ã¯ã©ãããã®ã ããïŒ
ãªã«ãæä»çè«çåãšé¢ä¿ãããããªæ°ãããŸããããŸãã¡æ§é ãããããŸããã
ãããã解説ã®ã»ã©ãé¡ãããŸãã
https://mathlog.info/articles/1342
ãã¡ãã«è©³çŽ°ãªè§£èª¬ããããŸãã
å
š49æã§3åã»ã©è©ŠããŸãããããããæåããŸãããããã°ã4çŽãªãããã§ãã4ææžããã°ãžãŠãŠãã³ãå®è¡å¯èœã§ããã
Dengan kesaktian Indukmu ãããæ²ç€ºæ¿ã«æžã蟌ã¿ãã§ããããã«ãªã£ããã§ãã!
ããã§ãšãããããŸããä»åŸãšããããããé¡ãããããŸãã
管ç人ãããããããšãããããŸãã
æ°æ²ç€ºæ¿ã«ãªã€ãŠãããããŸã§ã代çã§æçš¿ãããŠããã ããŸããããšãæ¬åœã«ããããšãããããŸããã
ããŸã ãããç°å¢ã®åæ§ç¯äžã§ãã
ãã«ãŒãã¥ãŒã¹ã®ããŒããŒããããŸãã€ãªããããå
¥åããŸãŸãªããŸããã
å
šè§åè§ã®åãæ¿ããã§ããããã§ããŸãã
ããã¯ããŒã¯ãå
šéšãšãã ã®ã§ãæ®å¿µã§ãã
ãããããããéªéããããŸããå®ãããé¡ãããããŸãã
VT笊å·ã®å®çŸ©ã
æ°ã®åå²æ³ãäžãããã®
èªç¶æ°nãè² ã§ãªãæŽæ°(x1,x2,x3,,xn)ã§
ïœ1+2*x2+3*x3++n*xn==ïœ
ã®æ¹æ³ãäœåãããã察å¿ããããã®ã«äŒŒãŠããŠ
ãŸãç°ãªã£ãæ§é ãçºçããŠããã®ãé¢çœãã§ãã
玹ä»ããããªã³ã¯ã§å®å
šã«ã¯ç解ããŠããªããšæããŸãã
äŸãã°11æã®è¡šè£ãå
¥ãæ··ãã£ãã«ãŒãã®é
åãã©ããã(2048éãããã)
ããã«ããäžæã®ã«ãŒããè¡šã«ããããè£ã«ãããã¯èªç±ã«éžæã§ã
å§ãã®é
åã«å¯ŸããŠé©åãªå Žæã«ã«ãŒããå·®ã蟌ãã°(èš12æ)ã瀺ãåããã
第äžè
ã«å¿
ãã«ãŒãã®é
åã§1ãã13ã®æ°åã®ã©ãããäŒããããšãã§ããã
äœãäœåŠã«ã«ãŒããè¡šåããè£åãããå³åº§ã«å€æãå·®ã蟌ãã®ã¯ææ©ãèšç®ãšçµéšã
å¿
èŠãšãããã§ãã
ãããã£ãŠå
ã
ã®52æã®æ£èŠã®ãã©ã³ãã§è¡šè£ãå
¥ãæ··ãã£ãã©ã³ãã ãªã«ãŒãã®å Žåã
客ãéžãã ã«ãŒãã®æ°åã¯å©æAããžã§ãŒã«ãŒãããäžæè¿œå ãããç¹ã«ãªãã³ã¹ãã¬ãã
ãããå§ãã®11æã®è¡šè£ã®æ§é ãã¿ãŠãé©åãªäœçœ®ã«å·®ã蟌ãã°å©æBã«äŒããã¯ã§ããŸãã
ãã®ããŒã¯ãŸã§ã¯äŒããããªãã®ã§ã¯ãªãããšæãããŸãã
ããŒã¯ãŸã§åœãŠãããã«ã¯æ£ã«52æã®é
åç¶æ³ãå
šéšäœ¿ããªããšãããªããªãããšãŠãæç®ã«
é Œãããšã¯å°é£ã«ãªãããã§ãã(解決ã®æ¹åæ§ãéã£ãŠããããç¥ããŸããã)
ããŒã¯ãŸã§åœãŠãããæ¹æ³ã
ïŒïœïŒãŸã§ã®æ°åãæã€
ããŒã¯ãD,C,H,S(ãã€ã€,ã¯ã©ã,ããŒã,ã¹ããŒã)ãæã€èš24æã®å Žåã«ã€ããŠ
次ã®å Žé¢ã§ã®è§£èª¬ããé¡ãããŸãã
â 24æã®ã«ãŒããè¡šè£ã°ãã°ãã§é
åãããŠããã
â¡å®¢ã¯ãã®äžã®ä»»æã®ã«ãŒããéžãã§ãåã³ã«ãŒããè£åãã§è¿ãã
(客ã«ããã§ã·ã£ããã«ãããŠãæ§ããªãããããããå¯èœãªãå
¥ããŠäžãããïŒ
â¢ãªãã³ã¹ãã¬ããããã24æã«ããäžæã®ãžã§ãŒã«ãŒ(ãžã§ãŒã«ãŒã«ã¯æããªããŠã
ãéåžžã®ã«ãŒãã§ããããšæããïŒãå©æAããã¡ã
ãé©åãªäœçœ®ã«å
¥ãããã«ãŒãã®é çªãçãã¬ããã«æããã
â£å©æB(â¡,â¢ã®æã¯ãã®å Žã«ããªãã)ãçŸãã25æã®ã«ãŒãã®æã
ããŒãã«ã«ãªãã³ã¹ãã¬ããããã
ãã®é
åç¶æ³ãèŠãŠå®¢ãéžãã ã«ãŒãã®ããŒã¯ãšæ°åãåœãŠãã
ïŒè¿œäŒžïŒ
ããããå®éšããŠã¿ãŠãã£ãšç解ã§ããŸããã
ãã®äŸãè¡ãã«ã¯24æã®ã«ãŒããè£è¡šãåãæ··ããŠãŸãåæã«ã·ã£ããã«ãããŠ
ãªãã³ã¹ãã¬ããããŠã¿ãã
客ã«ã«ãŒããäžæéžã°ããã
ãããã©ãã§ãããã®ã§è£åãã§æ»ããããšãããæŽã«åæã«ã·ã£ããã«ãããŠæ§ããªãã
ïŒæ¬äººãã©ãã«ããã®ãããããªããªãããããå©æAã¯ã«ãŒãã®ååã¯ç¥ã£ãŠãããïŒ
åã³ã«ãŒãããªãã³ã¹ãã¬ããããæãè£åãã«ãŒãã¯1ãè¡šåãã®ã«ãŒãã¯0ã§èªã¿
24åã®0,1ã§äœãããé
åãã§ããã
äŸãšããŠããã
gp > M=vector(24,i,random(2))
%231 = [1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
ã§ã©ã³ãã ã«æ§æããŠçœ®ãã
Mã®å
é ã«1ãæ¿å
¥ããŠ
gp > Ma=concat([1],M)
%232 = [1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
gp > sum(i=1,25,i*Ma[i])%26
%233 = ïŒïŒ
ãš
Mã®æåŸå°Ÿã«0ãæ¿å
¥ããŠ
gp > Mb=concat(M,[0])
%234 = [1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0]
gp > sum(i=1,25,i*Mb[i])%26
%235 = ïŒ
ãèšç®ããŠçœ®ãã
ãããŠ2人ã®å©æA,Bã¯æ°åãšã«ãŒãã®ååã
D;1,2,3,4,5,6ãïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒ
C;1,2,3,4,5,6ãïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒ
H:1,2,3,4,5,6ãïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒ
S:1,2,3,4,5,6ãïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒïŒ
ãšå¯Ÿå¿ãããŠããã
ãã客ã®ã«ãŒããD6ãªããã®ã«ãŒãã®ã³ãŒãã¯ïŒãªã®ã§äžã®ïŒã€ã®æ°ïŒïŒãšïŒã§ã¯ïŒãããè¿ãã®ã§
ã¯ããã®é
åMã«å¯Ÿã0ã®æ°åãå³ç«¯ããå
¥ããŠè¡ããšããç°ãªãé
åãã§ãããã®ãèãããš
MïŒ[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1] ã«å¯Ÿã
M2ïŒ[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0]
M3ïŒ[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1]
M4=[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1]
M5ïŒ[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1]
M6=[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
ãšäœãããŠããããã®M6ã
gp > sum(i=1,25,i*M6[i])%26
%237 = 6
ãšç¢ºãã«ã³ãŒãå€ïŒãäœããã
å³ã¡å©æAã¯ããäžæã®ã«ãŒããè¡šåãã«Mã®é
åã®åŸããã9ãš10çªç®ã®éã«æ¿å
¥ããäœæ¥ãããã°ããã
次ã«å®¢ã®ã«ãŒããH5ãªãã³ãŒãæ°ã¯ïŒïŒã§ããã®ã§ïŒïŒã«è¿ããªãã
ããã§1ã®æ°åãMã®é
åã§å·Šç«¯ããå³åŽãžå
¥ããŠè¡ãããšããã£ãŠãããšæ°åãäžã€ãã€å¢å ããã
M=[1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
M14=[1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
M15=[1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
M16=[1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
M17=[1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1]
ããã§sum(i=1,25,i*M17[i])%26
%239 = ïŒïŒ
ã埩å
ãããã
泚æç¹ã§0ã1ã®æ°åãããããªããæ§æããŠãããšãããããæ§æããVT(23)ã®ç¬Šå·ããã©ã³ãã®ã³ãŒãå€
ãè¶ããŠããŸãããšããããïŒïŒïŒïŒïŒïŒâ¡0 (mod 26))
ãã®å€ãåœãŠã¯ãŸãé
åã¯é£ã°ãããšã«ãªãã®ã§ãã«ãŒãæ¿å
¥æãããèæ
®ããŠããããšã
ãã®åçã¯ãã©ã³ãæ°ãæ£èŠã®52æã§ãéçšããã®ã§ãè¡šè£æ··åšã®ã«ãŒãã§ã客ã®ã«ãŒãã1ïœ52ã®æ°åã«å¯Ÿå¿ãããŠãã
ãã®é
åã«å¯Ÿãå©æAã¯ãžã§ãŒã«ãŒã䜿ãé©åãªäœçœ®ã«è¡šåã(0)ãè£åã(1)ã®ç¶æ
ã§ã«ãŒããæ¿å
¥ããã°
ãã®ã«ãŒãã®é
åMaãã
sum(i=1,53,i*Ma[i])%54ã§1ïœ52ã®æ°åãå¿
ãäœãåºãããšããã©ããªåæé
åããã§ãå¯èœãšãªãã
æç®ã§ãããã®ä»çµã¿ãåŠçããã«ã¯ç·Žç¿ãç·Žç¿ã§ããã
https://mathlog.info/articles/1342
äžã®åèè³æãšã¯ã»ãã®å°ã
å³ä»ããéããŸããã
éã¿ãã¯ãã«ãšã®å
ç©ãããã§ã¯ïŒ¬å€ãšåŒã¶ããšãšããŸãã
å©æãšæååž«ã¯ãšãã«ïŒåã ãå
ç©ã®èšç®ãããããšãšãªããŸãã
ãããã ãªïŒæã®ãã€ã¢ãã«ã§äŸç€ºããŸãã
å©æãã¿ã笊å·ã
1010
ã ãšããŸãããã
Lå€ã¯ 4 ã§ãã
å³ä»ããç°ãªããŸããã
ã«ãŠã³ãã¢ããç³»ãšã«ãŠã³ãããŠã³ç³»ãšã
ç§ãªãçšæããŸããmod 6 ã§ã
âã«ãŠã³ãã¢ããç³»
1010
ã®å³ç«¯ã« 0 ãã€ããã
Lå€ã¯å€ããã 4 ã®ãŸãŸã
èšæ³ãå€ããŸãã
æäžã®4æã«ã€ããŠã¯ã0ãŸãã¯1ã®ä»£ãã«ãoãšiãšã䜿ããŸããïŒæç®ã®ã«ãŒãã«ã€ããŠã¯
0ãš1ãšã䜿ããŸããæ¿å
¥äœçœ®ã®å€åãšLå€ã®å€åãèŠèªããããããã«ã§ãã
ãŸãLå€ãšãããåãšã䞊ã¹ãŠæžãããšã«ããŸãã
4:ioio ã®å³ç«¯ã«0ãè¿œå ã
4:ioio0
ãã®0ãå³ããå·Šã«ã¹ã©ã€ãããŠããã
iããŸããããéœåºŠã«ãLå€ãã«ãŠã³ãã¢ããããŸããLå€ã®å®çŸ©ãããŸãããšã«ãªã£ãŠããŸãã®ã§ãããå¯èœã§ãã
4:ioio
------
4:ioio0
5:io0io
0:0ioio
ãã以äžãŸãããããŸããã
âã«ãŠã³ãããŠã³ç³»
oioiã®å³ç«¯ã« 1 ãè¿œå ãããšãLå€ã¯ã²ãšã€æžããŸããä»¥åŸ 1 ãå·Šã«ã¹ã©ã€ãããŠããoããŸããããéœåºŠã«ãLå€ãã«ãŠã³ãããŠã³ããŸãã
4:ioio
------
3:ioio1
2:io1io
1:1ioio
ãã以äžãŸãããããŸããã
åèè³æã§ã¯ã«ãŠã³ãã¢ããã®ã¿ã䜿ã£ãŠããŸããã
ãã©ã³ãäžåŒã§ã®ããžãã¯ãã³ã³ãã¥ãŒã¿äžã§åçŸããŠã¿ãŸããã
ã³ãŒãã¯PARI/GPã§ãã
M=vector(52,i,random(2));è¡šè£æ··åšã®ã·ã£ããã«åŸã®èšå®ã§ãã
VT=sum(i=1,52,i*M[i])%54
end=if(VT>52,end=VT-54,VT)
top=(end+vecsum(M)+1)%54
onemax=vecsum(M)
zeromax=52-vecsum(M)
L=List(M)
ïŒå®è¡éšïŒ
M=vector(52,i,random(2))
[0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0]
gp > VT=sum(i=1,52,i*M[i])%54
%425 = 3
gp > end=if(VT>52,end=VT-54,VT)
%426 = 3 ----------->Mã®é
åã®æåŸå°Ÿã«0ãè¿œå ãã笊å·é·53ã®VT笊å·ã¯å°äœ3ãæ§æããã
gp > top=(end+vecsum(M)+1)%54
%427 = 28 ------------>Mã®é
åã®æååã«1ãè¿œå ãã笊å·é·53ã®VT笊å·ã¯å°äœ28ãæ§æããã
gp > onemax=vecsum(M)
%428 = 24ã ------------>Mã«å«ãŸãã1ã®åæ°ã
gp > zeromax=52-vecsum(M)
%429 = 28 ------------>Mã«å«ãŸãã0ã®åæ°ã
gp > L=List(M);ã1,0æ°åã®æ¿å
¥ãåé€ãããæãã®ã§ãªã¹ã圢åŒã«ããŸããã
Search0(k)={t=0;}for(i=1,#L,if(L[i]==0,t++;\
if(t==k && t<=52-vecsum(M),print((top+t)%54";"i+1))));ãªã¹ãäžã®0ã®ååšäœçœ®ã®èª¿æ»ã§ãã(è£åãã«ãŒãã®æ¿å
¥äœçœ®ã)
ïŒ-->å³ã®æ°å:Mã®é
åã®äœåŠã«ãžã§ãŒã«ãŒã«ãŒããè£åãã«æ¿å
¥ããããããã
å·Šã®æ°å:å·®ã蟌ãã åŸã®ç¬Šå·é·53ã®VT笊å·ã§ã®å°äœã®å€ïŒ=客ã®éžãã ãã©ã³ãã®ã³ãŒãå€ïŒ
gp > for(k=0,zeromax,Search0(k)
29;2
30;3
31;4
32;6
33;9
34;10
35;12
36;13
37;14
38;15
39;16
40;18
41;21
42;23
43;24
44;25
45;28
46;31
47;34 *
48;36
49;37
50;39
51;40
52;42
53;46
0;49
1;51
2;53 *
*å°ã®ç¢ºèª
gp > listinsert(L,1,34);Vec(L)ã-->1ã®æ°åãLã®34ã®äœçœ®ã«æ¿å
¥ããŸãã
%487 =
[0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0]
gp > sum(i=1,53,i*L[i])%54
%488 = 47
ïŒå¿
ãåæç¶æ
ã«æ»ããŠããããšãïŒïŒ
listpop(L,34);ã-->34ã®äœçœ®ã«ããèŠçŽ ãåé€ããŸãã
ãã®åŸæ¬¡ã®äœæ¥
gp > listinsert(L,1,53);Vec(L)
%509 =
[0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1,
0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1]
gp > sum(i=1,53,i*L[i])%54
%510 = 2
listpop(L,53);
-------------------------------------------------------------------------
Search1(k)={t=0;}forstep(i=52,1,-1,if(L[i]==1,t++;\
if(t==k && t<=onemax,print((end+t)%54";"i))))ã;ãªã¹ãäžã®1ã®äœçœ®ã調æ»ããŸãã(è¡šåãã«ãŒãã®æ¿å
¥äœçœ®ãïŒ
ïŒ-->å³ã®æ°å:Mã®é
åã®äœåŠã«ãžã§ãŒã«ãŒã«ãŒããè¡šåãã«æ¿å
¥ããããããã
å·Šã®æ°å:å·®ã蟌ãã åŸã®ç¬Šå·é·53ã®VT笊å·ã§ã®å°äœã®å€
gp > for(k=0,onemax,Search1(k))
4;51
5;49
6;47
7;46
8;44
9;43
10;42
11;40
12;37
13;34
14;32
15;31
16;29
17;28
18;26
19;25
20;21 *
21;19
22;18
23;16
24;10
25;7
26;6 *
27;4
*å°éšåã®ç¢ºèª
gp > listinsert(L,0,21);Vec(L)
%493 =
[0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1,
1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0]
gp > sum(i=1,53,i*L[i])%54
%494 = 20
listpop(L,21);L
gp > listinsert(L,0,6);Vec(L)
%519 =
[0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1,
1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0]
gp > sum(i=1,53,i*L[i])%54
%520 = 26
listpop(L,6);L
èšç®äžãã©ã³ãã«ãªãæ°å53,54(â¡0 ;mod (54))ãåºãŠããæãèµ·ããã®ã§ããããé€å€ããªããèããªããã°
ãªããªããšãããé¢åã§ããã
ããã§ãã¶ããããããåææ¡ä»¶ã§ãäœåŠã«ã«ãŒããè¡šãè£ããå€æããŠæ¿å
¥ããããåãã£ãŠãããšæããŸãã
#èããããªããããªçŸè±¡ãèµ·ãããããã§ããïŒãææ¿ããŸããã