ãããDPã¨ã¯ ãããDP(bit DP) ã¨ã¯ããããã§è¡¨ç¾ããéåãæ·»ãåã«æã¤åçè¨ç»æ³(DP)ã®ãã¨ã§ãã åºæ¬çã«ã¯ã以ä¸ã®ãã㪠DPãèãã¾ãã 漸åå¼ã®æ´æ°å¼ã¨ãã¦ã¯ã $$dp[ S \cup \{v\} ] = dp[ S ] + cost(S, v)$$ ã®ããã«éåã1ã¤ãã¤å¢ããã¦ããå½¢ã«ãªããã¨ãå¤ãã§ãã ãã®éåã«å¯¾ããDPã«ãã£ã¦ã\(n\) åã®ãã®ã«å¯¾ãã¦\(n!\) éãã®é åºã®ä¸ããæé©ãªãã®ãè¨ç®ããã®ãé«éåã§ããå ´åãããã¾ãã éåããããã§è¡¨ç¾ãã å®éã«ã¯éåãé
åã®å¼æ°ã«ããããã«ãéåã2é²æ°ã§è¡¨ç¾ãã¾ããå
¨ä½éå {0,1,2,â¦,n-1} ã®é¨åéå S ã n æ¡ã®2é²æ°ã§è¡¨ç¾ããã®ã§ãã ä¾ãã°ãå
¨ä½éå {0,1,2,â¦,9} ã®é¨åéå {0,3,5} ã«ã¤ãã¦ã¯ã0bitç®ã¨3bitç®ã¨5bitç®ã 1ã§ããã以å¤ã0
{{#tags}}- {{label}}
{{/tags}}