å®åè¾æ¸ï¼ç°¡æ½ããããã¯ãã«ï¼ã®è§£èª¬
以åãã簡潔データ構造 LOUDS の解説ãã¨ããã·ãªã¼ãºã®è¨äºãæ¸ãããã¨ãããã¾ãã
LOUDS ã¨ããã®ã¯æ¨æ§é ãtrieãç°¡æ½ã«è¡¨ããã¨ãã§ãããã¼ã¿æ§é ãªã®ã§ããããã®ä¸ã§ãç°¡æ½ããããã¯ãã«ãã¨ãããã®ã«ã¤ãã¦ã¯ãã©ãã¯ããã¯ã¹ã¨ãã¦æ±ã£ã¦ãã¾ããã
ã¾ãã中学生にもわかるウェーブレット行列ãæ¸ããã¨ããããã®ä¸ã§åºã¦ãããå®åè¾æ¸ãã®å®è£ ã«ã¯è§¦ãã¾ããã§ããã
ãã®ãç°¡æ½ããããã¯ãã«ããå®åè¾æ¸ãã¯ãåããã®ãæãã¦ãã¾ã*1ã
ä»åã¯ããã®ãã¼ã¿æ§é *2ã«ã¤ãã¦æ¸ãã¦ã¿ã¾ãã
å®åè¾æ¸ã§ã§ãããã¨
ãããåã«å¯¾ããå®æ°æéã® rank 㨠selectã§ã*3ã
rank()ã¯ãããããåã®å é ããä½ç½® k ã¾ã§ã«ã1 ã®ããããããã¤ãããã*4ã
select()ã¯ãããããåã®å é ããè¦ã¦ãn åç®ã® 1 ã®ãããã®æ¬¡ã®ä½ç½®ã¯ã©ããã*5ã
ããããä¾ãæãã¾ãã
"0100100111011110" ã¨ãããããåï¼B ã¨ãã¾ãï¼ã®ä¸ã§ãå é ããä½ç½® 12 ã¾ã§ã®éã«ããã㤠1 ããããã
ä¸ã®å³ã§ãå é ããç¢å°ã¾ã§ã®ç¯å²ã® 1 ãæ°ãããã¨ã«ãªãã¾ãã
æ°ãã¦ã¿ãã¨ã6ã¤ããã¾ãã
ã¤ã¾ããrank(B, 12) = 6 ã¨ãããã¨ã«ãªãã¾ã*6ã
ã¾ãããã®ãããåã®ä¸ã§ã4 åç®ã®ããã 1 ã®æ¬¡ã®ä½ç½®ã¯ã©ããã
ä¸ã®å³ã¯ãå é ãã 4 åã® 1 ã«è²ãã¤ãããã®ã§ãã
4çªç®ã® 1 ã¯ä½ç½® 8 ã«ããã®ã§ããã®æ¬¡ã§ããä½ç½® 9 ãæ±ãããã®ã§ãã
ã¤ã¾ããselect(B, 4) = 9 ã¨ãããã¨ã«ãªãã¾ã*7ã
å
é ããé ã«æ°ããã¨ããããæ¹ã§ã¯ããµã¤ãºã大ãããªãã¨ãããã®æä½ã«ã¯é·ãã«æ¯ä¾ããæéããããã¾ãããå®åè¾æ¸ã使ãã¨ããããã®æä½ãå®æ°æéã§å¯è½ã«ãªãã¾ãã
ä½ç½®ã¥ã
æåã«è¿°ã¹ãããã«ãLOUDSãウェーブレット行列ãªã©ãå¤ãã®ãã¼ã¿æ§é ã®åºç¤ã¨ãªã£ã¦ãã¾ãã
å®è£
ããã§ã¯ãå®åè¾æ¸ã®ä»£è¡¨çãªå®è£ ä¾ãæãã¾ãã
å ã®ãããé å B ã«å ãã3 ã¤ã®è£å©ãã¼ã¿ãæã¤ã¨ãããã®ã§ãã
ããã«ãã£ã¦ãå®æ°æéã§ã® rank() ãå¯è½ã«ãªãã¾ãã
ã¾ããä¸ã¤ç®ã®è£å©ãã¼ã¿ã§ãã
B ã®é·ãã n ã¨ããã¨ãB ãé·ã lg(n) ^ 2 ãã¨ã®å¤§ãããã¯ã«åå²ãã¦ãããããã®å¤§ãããã¯ã®å é ã® rank() ã®çµæãä¿åãã¦ããã¾ãã
ããã§ã仮㫠B ã®é·ã n ã 2 ^ 16, ã¤ã¾ã 65536 ãããã ã¨ãã¾ãã
ããã¨ãlg(n) = 16 ãªã®ã§ãlg(n) ^ 2 = 256 ã«ãªãã¾ãã
ã¤ã¾ããä¸ã¤ç®ã®è£å©ãã¼ã¿ã¯ 256 ããããã¨ã«æã£ã¦ãããã¨ã«ãªãã¾ãã
è¨é²ããã¹ããã®ã¯ã0, 256, 512, ... ã®ä½ç½®ã® rank() ã®çµæã§ãã
ã¾ããä½ç½® 0 ã® rank()ãã¤ã¾ããä½ç½® 0 ã®å·¦ã«ãã㤠1 ããããããèãã¾ãã
ä½ç½® 0 ã¯å·¦ç«¯ãªã®ã§ãçãã¯å½ç¶ 0 ã«ãªãã¾ãã
ããããè£å©ãã¼ã¿ã®æåã®ãã®ã«ãªãã¾ãã
次ã«ãä½ç½® 256 ã® rank() ã§ãã
ä½ç½® 256 ã¾ã§ï¼ä¸ã®å³ã® A ã®ç¯å²ï¼ã«ããã㤠1 ããããã¨ãããã¨ã§ãã
ãã®ç»åã§ã¯éä¸ãçç¥ããã¦ããã®ã§ãããå®éã«ã¯ãããåãããã®ã§ãæ°ããã°ãããã¾ãã
ãã¨ãã° 131åãã£ãã¨ããã¨ãrank(B, 256) = 131 ãè£å©ãã¼ã¿ã®æ¬¡ã®è¦ç´ ã¨ãã¦è¨é²ãã¾ãã
ãã®æ¬¡ã¯ä½ç½® 512 ã® rank() ã§ãã
ãã¨ãã°ã256ã511 ï¼å³ã® A' ã®ç¯å²ï¼ã« 1 ã 137 åãã£ãã¨ãã¾ãã
ãã®å ´åãè¨é²ãã rank() ã¯å é ããã®ãã®ãªã®ã§ãB ã®ç¯å²ã«ãã 1 ã®ãããã®æ°ã¨ãããã¨ã«ãªãã¾ãã
A ã®ç¯å²ã«ã¯ 131 åãã£ãã®ã§ãããã« 137 ãå ãã 268 ãæ¸ãè¾¼ããã¨ã«ãªãã¾ãã
åãããã«ãä½ç½® 768, 1024...ã«ã¤ãã¦ãå é ããã® rank() ãæ±ãã¦ãæå¾ã¾ã§åãã¾ãã
ããã¦ã次ã¯äºã¤ç®ã®è£å©ãã¼ã¿ã§ãã
ä»åº¦ã¯ãä¸ã¤ç®ã®è£å©ãã¼ã¿ã§åå²ãã大ãããã¯ããããã«å°ãããã¯ã«åå²ãã¾ãã
å°ãããã¯ã®ãµã¤ãºã¯ãB ã®é·ãã n ã®ã¨ããlg(n) / 2 ã®ããã«æ±ºãã¾ãã
ããã¨ãn = 65536 ã®ã¨ããå°ãããã¯ã®ãµã¤ãºã¯ lg(n) / 2 = 16 / 2 = 8 ã¨ãªãã¾ãã
äºã¤ç®ã®è£å©ãã¼ã¿ã§ã¯ããã®å°ãããã¯ãã¨ã« rank() ãä¿åããã®ã§ãããä¿åããã®ã¯å¤§ãããã¯ã®å é ã¨ã®å·®åã§ãã
ãã¨ãã°ããããå B ã® 512 ãããç®ããã®é¨åã次ã®ããã«ãªã£ã¦ããã¨ãã¾ãã
ããã¨ãå°ãããã¯ã¯æ¬¡ã®ããã«ã8 ããããã¨ã®åä½ã«ãªãã¾ãã
å°ãããã¯ã«ã¤ãã¦ããããã rank() ãè¨é²ããã®ã§ãããå°ãããã¯ã«ã¤ãã¦ã¯ããããå±ãã大ãããã¯ã®å é ããã®å·®åã¨ãã¦è¨é²ãã¾ãã
ä¸ã®å³ã§ã512 ããã®å°ãããã¯ã¯å¤§ãããã¯ã®å é ãªã®ã§ãè¨é²ãã rank()ï¼512ããã®å·®åï¼ã¯ 0 ã§ãã
次㮠520 ããã®å°ãããã¯ã¯ã512ã520 ã®éã« 5 åã® 1 ãããã®ã§ã5 ãæ¸ãè¾¼ã¿ã¾ãã
528 ããã®ãã®ã¯ã520ã528 ã®éã« 3 åã® 1 ãããã®ã§ã520 ã¾ã§ã®ãã®ã¨åãã㦠520ããã®å·®å㯠5 + 3 = 8 ã§ãã
åãããã«ãä½ç½® 536 以éã«ã¤ãã¦ããä½ç½® 512 ããã® 1 ã®ãããã®æ°ã®ç´¯è¨ãæ¸ãã¦ããã¾ãã
ããã¨ãå°ãããã¯ã«ã¤ãã¦æ¸ãè¾¼ãæ°åã¯æ¬¡ã®ããã«ãªãã¾ãã
ãã¦ããã®ããã«å¤§ãããã¯ã¨å°ãããã¯ã«ã¤ãã¦ããããã rank()ï¼ã¾ãã¯ãã®å·®åï¼ãè¨é²ããã¨ãä½ããããããã
ããã¯ãå°ãããã¯ã®å é ã¾ã§ã® rank() ãå®æ°æéã§æ±ãããã ã¨ãããã¨ã§ãã
ãã¨ãã°ããã®ãã¼ã¿ã使ã£ã¦ãä½ç½® 533 ã¾ã§ã® rank()ãã¤ã¾ã rank(B, 533) ãæ±ãããã¨ãã¾ãã
å³ã®ä¸ã§ã¯ã次ã®å ´æã§ãã
ãã®ä½ç½®ã® rank()ãã¤ã¾ãå
é ããã® 1 ã®ãããã®æ°ã¯ãä½ç½® 533 ãå±ãã大ãããã¯ã»å°ãããã¯ã調ã¹ãã°*8次ã®ããã«å解ã§ãã¾ãã
- ä½ç½® 0 ãã ä½ç½® 512 ã¾ã§ã® 1 ã®ãããã®æ°
- ä½ç½® 512 ãã ä½ç½® 528 ã¾ã§ã® 1 ã®ãããã®æ°
- ä½ç½® 528 ãã ä½ç½® 533 ã¾ã§ã® 1 ã®ãããã®æ°
æåã® 2 ã¤ã«ã¤ãã¦ã¯ãä¸ã§ä½ã£ã表ãåç
§ãããã¨ã§æ±ãããã¨ãã§ãã¾ãã
ã¾ããä½ç½® 0 ããä½ç½® 512 ã¾ã§ã® 1 ã®ãããã®æ°ã§ãã
ä½ç½® 512 ããå§ã¾ã大ãããã¯ã® rank() ã¨ãããã¨ã«ãªãã®ã§ãããããã¯æåã«ä½ã£ã表ã«æ¸ãã¦ããã¾ãã
表ã«ããã¨ãä½ç½® 512 ã¾ã§ã«ã¯ 268 åã® 1 ã®ãããããããã¨ããããã¾ãã
次ã«ãä½ç½® 512 ããä½ç½® 528 ã¾ã§ã® 1 ã®ãããã®æ°ã§ãã
å°ãããã¯ã«ã¤ãã¦ã¯ã大ãããã¯ã®å é ï¼ãã®å ´åãä½ç½® 512ï¼ããã®å·®åã® rank() ãè¨é²ãã¦ããã®ã§ããããè¦ã¾ãã
ä½ç½® 512 ããä½ç½® 528 ã¾ã§ã«ã¯ã8 åã® 1 ã®ããããããã¨ãããã¨ããããã¾ãã
ããã¾ã§ã§ãä½ç½® 528 ã¾ã§ã« 268 + 8 = 276 åã® 1 ã®ãããããããã¨ããããã¾ããã
æ®ãã¯ãä½ç½® 528 ãã ä½ç½® 533 ã¾ã§ã®ãããæ°ã¨ãããã¨ã«ãªãã¾ãã
ä½ç½® 528 ãã ä½ç½® 533 ã®ç¯å²ã¯ã次ã®ç°è²ã®é¨åã§ãã
ããã¨è¦ã§ã1 ã®ããã㯠2 åã ã¨ãããã¨ããããã¾ãã
ãã®ä¾ã§ã¯ãå°ãããã¯ã®ãããæ°ã¯ 8 ãªã®ã§ãä¸ç¬ã§æ°ãããã¨ãã§ãã¾ãã
ããããã³ã³ãã¥ã¼ã¿ã¯ç®ã§è¦ã¦æ°ããã¨ãããã¨ã¯ã§ããªãã®ã§ã3ã¤ç®ã®è£å©ãã¼ã¿ãç¨æãã¾ãã
ããã§ä½ãã®ã¯ããããåã«ãããæ°åã®ä½ç½®ã«ããã®ãããåãæ㤠1 ã®ãããã®æ°ãæ¸ãããã¼ãã«ã§ãã
ãã¨ãã° 8 ãããã®å ´åã8 ãããã§è¡¨ããæ°åã¯å ¨é¨ã§ 256 åãªã®ã§ããã®ã²ã¨ã¤ã²ã¨ã¤ã«å¯¾ã㦠1 ã®ãããã®æ°ãæ¸ãã¦ããã¾ã*9ã
次ã®ãããªè¡¨ã§ãã
æ·»åã 2 é²æ°ã§è¡¨ãã¨ãæ°åãæ·»åã® 1 ã®ãããã®æ°ã«å¯¾å¿ããã¨ããã®ããããããããã¨æãã¾ãã
ãã¦ãä»åã®ä¾ã§ç¥ãããã®ã¯ãä½ç½® 528 ããä½ç½® 533 ã®éã«ãã㤠1 ã®ãããããããã§ãã
ç¥ãããç¯å²ãå«ãå°ãããã¯ã®ãããã¯æ¬¡ã®ããã«ãªã£ã¦ãã¾ãã
ãã®ç¯å²ããå¤ããé¨åããããããã¹ã¯ã§ 0 ã«ãã¾ãã
ããã¦ãå ã»ã©ã®è¡¨ã§ã10010000ï¼144ï¼ã«ãããå ´æãè¦ã¾ãã
ããã§ã10010000 ã®ä¸ã® 1 ã®ãããã 2 åã§ããã¨ãããã¨ããããã¾ãã
ããã§ãä½ç½® 533 ã¾ã§ã« 268 + 8 + 2 = 278 åã® 1 ã®ãããããããã¨ããããã¾ããã
ä½ãè£å©ãã¼ã¿ãã¾ã¨ããã¨ã次ã®ããã«ãªãã¾ãã
- 大ãããã¯(é·ã lg(n) ^ 2)ãã¨ã«ãå é ããã® rank() ãè¨é²ãããã®
- å°ãããã¯(é·ã lg(n) / 2)ãã¨ã«ãæå±ãã大ãããã¯ã®å é ããã® rank() ãè¨é²ãããã®
- å°ãããã¯(é·ã lg(n) / 2)ã®ãã¹ã¦ã®ããããã¿ã¼ã³ã«å¯¾ãã¦ãããã®æ㤠1 ã®ãããæ°ãè¨é²ãããã®
ããã¾ã§ã®å
容ãç¥ã£ã¦ããã°ãå®åè¾æ¸ãä½ããæ¤ç´¢ããããã°ã©ã ãä½ããã¨ã¯ã§ãã¾ãã
ã§ãããå®åè¾æ¸ã«ã¯ããé½åã®ããæ§è³ªããããããããã®ãã¼ã¿æ§é ã®ç¹å¾´ã¨ãªã£ã¦ãã¾ãã
ããã¯ãå ãã¼ã¿ã®å¤§ãããå¢ãã¦ããè£å©ãã¼ã¿ã®å¤§ããã¯ãããªã«å¢ããªãã¨ãããã¨ã§ãã
ã©ããããã¨ããå ·ä½çã«è¦ã¦ã¿ã¾ãã
ã¾ããå ãã¼ã¿ B ã®ãããæ°ããä¸ã§ã®ä¾ã®ããã« n ã¨ããã¾ãã
ãã®ã¨ãã大ãããã¯ã®æ°ã¯ãn / (lg(n) ^ 2) ã¨ãªãã¾ãã
ããã§ãããããã®å¤§ãããã¯ã«å¯¾ãã¦å é ããã® rank() ãè¨é²ããã®ã§ããããã®ãã¼ã¿ã²ã¨ã¤ãããä½ãããå¿ è¦ããããã§ããããã
ãã㯠lg(n) ã§ãã
å ãã¼ã¿ B ã®ä¸ã§ã®å é ããã® rank() ã¯ãn 以ä¸ã«ãªããã¨ã¯ããã¾ããã
0 ä»¥ä¸ n æªæºã®æ°ã表ãã®ã«ã¯ãn ã 2 ^ m ã§è¡¨ããå½¢ã§ããã°*10ãm ããããå¿ è¦ã§ãã
ã¤ã¾ããlg(n) ããããå¿ è¦ã¨ãããã¨ã«ãªãã¾ãã
ä»åã®ä¾ã§è¨ãã¨ãrank() 㯠0 ä»¥ä¸ 65536 æªæºã§ã65536 = 2 ^ 16 ãªã®ã§ãrank() ã²ã¨ã¤ã表ãã®ã« 16 ããããå¿ è¦ã¨ãããã¨ã«ãªãã¾ãã
大ãããã¯ã®æ°ã¯ n / (lg(n) ^ 2) åãªã®ã§ãããã« lg(n) ãããããããã¨ãåè¨ n / lg(n) ãããã«ãªãã¾ãã
ãããã大ãããã¯ã®ãã¼ã¿æ ¼ç´ã«å¿ è¦ãªå®¹éã§ããã n / lg(n) ãªã®ã§ãn ãå¢ããã«å¾ã£ã¦å ãã¼ã¿ã«å¯¾ããå²åã¯å°ãããªãã¾ãã
次ã«ãå°ãããã¯ã«ã¤ãã¦èãã¾ãã
ããããã®å°ãããã¯ã«å¯¾ãã¦ã¯ã大ãããã¯å é ããã® rank() ãè¨é²ããã¨ãããã¨ã«ãªã£ã¦ãã¾ãã
ã¤ã¾ãããã®å·®åã® rank() ã¯ã大ãããã¯ã®å¤§ããã§ãã lg(n) ^ 2 以ä¸ã«ã¯ãªãã¾ããã
æ°åã²ã¨ã¤ãè¨é²ããã®ã«ã¯ãlg(lg(n) ^ 2)ãã¤ã¾ã 2 * lg(lg(n)) ã ãã®ããããå¿ è¦ã¨ãããã¨ã«ãªãã¾ãã
å°ãããã¯ã®åæ°ã¯ n / (lg(n) / 2) åãªã®ã§ãå°ãããã¯å ¨ä½ã¨ãã¦å¿ è¦ãªãããæ°ã¯ (n / (lg(n) / 2)) * (2 * lg(lg(n))) = n * 4 * lg(lg(n)) / lg(n) ã§ãã
lg(lg(n)) ãã lg(n) ã®ã»ãããªã¼ãã¼ã大ããã®ã§ãããããã¯ã n ãå¢ããã«å¾ã£ã¦å ãã¼ã¿ã«å¯¾ããå²åãå°ãããªãã¾ãã
æå¾ã«ãå°ãããã¯ã®ããããã¿ã¼ã³ããããã«å¯¾ãããããæ°ã®è¡¨ãèãã¾ãã
å°ãããã¯ã®å¤§ãã㯠(lg(n) / 2) ãªã®ã§ãè¦ç´ ã²ã¨ã¤ãããã«å¿ è¦ãªãããæ°ã¯ lg(lg(n) / 2)ãã¤ã¾ã lg(lg(n)) - 1 ã§ãã
ããã¦ã表ã®è¦ç´ æ°ã¯ (lg(n) / 2) åã®ãããã§è¡¨ããæ°ã ãå¿ è¦ãªã®ã§ã2 ^ (lg(n) / 2) = n ^ (1 / 2)ãã¤ã¾ã ân ã§ãã
ã¾ããããããã¹ã¯ãããªãå ´åï¼ä¸ã§è注ã¨ãã¦æ¸ããé¨åï¼ãèããã¨ãæ¤ç´¢ä½ç½®ãã¨ã«è¡¨ãä½ããã¨ã«ãªãã®ã§ãå°ãããã¯ã®å¤§ããã§ãã lg(n) / 2 åã¨ãªãã¾ãã
表ã®è¦ç´ æ°ã¨ãè¦ç´ ã²ã¨ã¤ãããã«å¿ è¦ãªãããæ°ãããã«è¡¨ã®åæ°ããããã¨ãân * (lg(lg(n)) - 1) * lg(n) / 2 ãªã®ã§ããã¯ã n ãããå°ãããªã¼ãã¼ã¨ãããã¨ã«ãªãã¾ãã
ããããããã§ãå ãã¼ã¿ãããå°ããªãªã¼ãã¼ã®è£å©ãã¼ã¿ã使ã£ã¦ãä»»æã®ä½ç½®ã® rank() ãå®æ°æéã§æ±ããããã¨ãã話ã§ããã
ãã話ã§ããã
ãã¦ãè¨äºã®æåã®ã»ãã§ãrank() ã«å¯¾å¿ãã select() ã¨ãããã®ã«è§¦ããã®ãè¦ãã¦ããã§ããããã
select()ã¯ãããããåã®å é ããè¦ã¦ãn åç®ã® 1 ã®ãããã®æ¬¡ã®ä½ç½®ã¯ã©ãããã
ãã® select() ã¨ããã®ã¯ãrank() ã«æ¯ã¹ãã¨ã使ãã©ããã¯ã ãã¶å°ãªãã®ã§ããããã¨ãã° LOUDS ãªã©ã§ã¯ä½¿ãã¾ããã®ã§ããããå®æ°æéã§ã§ãã¦ã»ããã¨ããã§ãã
ã§ããããä¸å¿ãå ãã¼ã¿ãããå°ãããªã¼ãã¼ã®è£å©ãã¼ã¿ã使ã£ã¦ãå®æ°æéã§èª¿ã¹ããã¨ãã§ããããã§ããããã£ã¡ã®ã»ãã¯å®è£ ãããªã大å¤ãªãããè£å©ãã¼ã¿ãæ¤ç´¢æéã®å®æ°é ã大ããã£ããããã®ã§ãæ¥åã£ã¦ rank() ç¨ã®ãããã¯ãäºåæ¢ç´¢ããããããç·å½¢æ¢ç´¢ãããããã®ãæ®éã§ãã
ããã¾ããã話ãããªãã§ããã
rank() ã®ã»ãããn ã«ãã£ã¦å¤§ãããå¤ãããããªãã§ã大ãããã¯ã¨å°ãããã¯ã®å¤§ãããé©å½ã«æ±ºãã¦å®è£ ããã®ãæ®éã§ãã
å°ãããã¯ä¸ã® 1 ã®ããããæ°ããã®ããè注ã§æ¸ããããã«ãæ¤ç´¢ä½ç½®ãã¨ã®è¡¨ãä½ããã¨ãããã¨ã¯æ®éããã¾ããã
çµå±ãå®æ°æéã¨ãã¯ããã¾ãé¢ä¿ãªãã¦ãrank() 㨠select() ãããã¾ã容éãåããªãã§ãã£ããéãã§ããã¨ããã®ãéè¦ãªãã¤ã³ããªã®ã§ãå®è£ ãããéã«ã¯æéãè¨ã£ããããªããé©å½ã«è©¦è¡é¯èª¤ããã®ãããã®ããããã¾ããã
ã¨ããã§ãå®è£ æã«æ³¨æãããã¨ã¨ãã¦ãå°ãããã¯ã® rank() ãè¨é²ããã®ã«ããµãã£ã¦ 32bit åãªã©ã使ããªã ã¨ãããã¨ãããã¾ãã
ãããã大ãããã¯ã¨å°ãããã¯ãåããæå³ã¯ãå°ãããã¯ã«å¯¾ãã¦è¨é²ãã rank() ãå°ãããã¦ãªã¼ãã¼ãæããã¨ãããã¨ãªã®ã§ãå°ãããã¯ã® rank() ã¨å¤§ãããã¯ã® rank() ã«åããµã¤ãºã®åã使ããªãã大ãããã¯ãä½ãæå³ãããã¾ããã
ãã£ã¨ãã大ãããã¯ãä½ããªãã§å°ãããã¯ã ãã§å®è£ ããã¨ããã®ãã²ã¨ã¤ã®ããæ¹ã ã¨æãã¾ããããã®å ´åãç°¡æ½ãã¼ã¿æ§é ãã§ã¯ãªããªãã¾ãï¼å ãã¼ã¿ã¨åããªã¼ãã¼ã®è£å©ãã¼ã¿ãå¿ è¦ã«ãªãããï¼ã
ããã«æ¸ãããããªå 容ã¯ããé«éæåå解æã®ä¸çãããæ¥æ¬èªå ¥åãæ¯ããæè¡ãã«ãæ¸ãã¦ããã¾ãã
ãã®è¨äºãæ¸ããªããããããã¾ã§è©³ããæ¸ãå¿ è¦ãããã®ããã¨æã£ã¦ãå¹¼ç¨åå ã«ããããå®åè¾æ¸ãã¨ããã¿ã¤ãã«ã«ããããã¨æãã¾ãããããããã«æãã¨ã©ã¾ãã¾ããã
ã§ããã¾ãæ®éã®å¤§å¦çãçé¢ç®ã«èªãã°ãããããããªãã®ããªããããã«ã¯èãã¦ãã¾ãã
*1:Wikipedia ã§ã¯ã簡潔データ構造ã®é ã§ç°¡æ½è¾æ¸ã¨ããååã§æ±ããã¦ããããã§ãã
*2:ä»åã®è¨äºã§ã¯ãå®åè¾æ¸ãã§çµ±ä¸ãã¾ãã
*3:å®ã¯ãselectã¯å¾è¿°ããããã«å®æ°æéã§ãªãå®è£ ãä¸è¬çã§ãã
*4:rank1ã¨ãããã¨ãå¤ãã®ã§ãããããã§ã¯ç¥ãã¾ããã
*5:rank ã¨ã®å¯¾ç§°æ§ã®ããã«ãç´æçã«å°ããããã«ãããªã£ã¦ãã¾ãã
*6:å¼æ°ã¯åãããããåãä½ç½®ã§ãã
*7:å¼æ°ã¯åãããããåã1 ã®åæ°ã§ãã
*8:ãããã·ãããªã©ã§æ±ãããã¾ãã
*9:ããã¯å®ç¨å¯ãã®è©±ã§ããçè«çã«ã¯ããããã¹ã¯ã lg(n) ãªã®ã§ããããé¿ããããããå°ãããã¯ä¸ã®æ¤ç´¢ä½ç½®ãã¨ã«è¡¨ãä½ãã¨ãããã¨ãããããã§ãããã®ä¾ã§ã¯ããã®ãããªè¡¨ã 8 åä½ããã¨ã«ãªãã¾ãããããããããè¨ããªã表ã®ã¤ã³ãã¯ã·ã³ã°ã¨ããå®æ°ã§ã¯ãªããããªæ°ãããã®ã§ããã
*10:ããã§ãªãå ´åã¯åãä¸ãã¾ãã