ãµã¨2-SATã®äºãæ°ã«ãªã£ã¦ã復ç¿ãã¦ãPractice Roomã§SRM464ã®Div1 Mediumåé¡ãéãã¦ã¿ããï¼ã¡ãªã¿ã«SRM464ã«ã¯åºå ´ãã¦ããï¼ SAT (å 足å¯è½æ§åé¡, SATisfiability problem) ã«ã¤ãã¦ã¯ããã®èªè ã®çããã¯ãåç¥ã¨ã¯æãã¾ããNPå®å ¨åé¡ã§ããªãã¿ã®ããã§ã (x_0 ⨠¬x_1) ⧠(¬x_0 ⨠¬x_3) ⧠... ã¿ãããªè«çå¼ï¼ä¹æ³æ¨æºå½¢ï¼ãæºããçå½å¤ x_0, x_1, ... ã®çµã¿åãããåå¨ãããå¦ããï¼åå¨ããå ´åããã®çµã¿åãããç¥ãããã£ããããï¼ ä¸ã®ä¾ã§ã¯ãã¹ã¦ã®ç¯ã(é«ã )2å¤æ°ãªã®ã§2-SATã¨å¼ã°ããã ï¼2-SATã¯ç·å½¢æéã§è§£ãããããï¼ã è«çå x ⨠y ãè«çå å« Â¬xây ï¼ã¾ã㯠¬yâxï¼ã«æ¸ãæãå¯è½ãªãã¨ãå©ç¨ãã¦ãè«çå¼ãæåã°ã©ãã«å¤æãã¦ã¿ãã åºæ¥ä¸ãã£
è¶æ¬, Tips å¼·é£çµæåæåã°ã©ãã«ããã¦ãé ç¹ã®é¨åéåSããä»»æã®ï¼é ç¹u,vãã¨ã£ãã¨ããuããvã¸å°éã§ãããã¨ããSã¯å¼·é£çµã§ããã¨ããã é ç¹ã®å¼·é£çµãªéåSã«ãä»ã®ã©ã®é ç¹éåãä»ãå ãã¦ãå¼·é£çµã«ã§ããªãã¨ããSãå¼·é£çµæå(SCC:Strongly Connected Component)ã¨ããã ã¾ããä»»æã®æåã°ã©ãã¯ããã¤ãã®å¼·é£çµæåã®ãå ±éé¨åãæããªãåéåã«å解ãããã¨ãã§ããã å¼·é£çµæåå解任æã®æåã°ã©ããããã¤ãã®å¼·é£çµæåã®ãå ±éé¨åãæããªãåéåã«å解ãããã¨ã å¼·é£çµæåãï¼ã¤ã®é ç¹ã«ã¤ã¶ãï½ã¨ã§ãDAG(éè·¯ããããªãæåã°ã©ã)ã«ãªãã å¼·é£çµæåå解ã¯ï¼åã®ç°¡åãªDFSã§è¡ããã¨ãã§ããã ï¼åç®ã®DFSã§ã¯ãé©å½ãªé ç¹ããã¯ãããã¾ã éã£ã¦ããªãé ç¹ã帰ãããã®é ã§çªå·ãã¤ãã¦ãããã¾ã éã£ã¦ããªãé ç¹ãããå ´åã¯ãåã³ããããã¯
å¼·é£çµæåå解ã®ã¢ã«ã´ãªãºã ãã¼ãã§ãã£ãã®ã§ã¡ã¢ã 2SATã¯å¼·é£çµæåå解ãå©ç¨ãã¦è§£ããã 2SATã¯å¤é å¼æéã§è§£ãããã¡ãªã¿ã«3SATã¯NPå®å ¨ã解ãæ¹ã¯ï¼ã¤ããã (1)ããå¤æ°xã®å²ãå½ã¦ã0ã§åºå®ããã¨ã2SATãªã®ã§ãxãå«ãç¯ã®xã¨ã¯ç°ãªãå¤æ°ã®å²ãå½ã¦ã決ã¾ãã ãã®ããã«ãã¦çç¾ãèµ·ããã¨ãxã¸ã®å²ãå½ã¦ã決å®ããxãå«ãç¯ãæ¶å»ãã¦å帰ã (2)2SATãªã®ã§ç¯ã¯(xâ¨Â¬y)ã®ãããªå½¢ããã¦ãããããã¯yâxã¨åãã§ãã åè«çå¤æ°ãè«çå¦å®ããããã«é ç¹ãç¨æãã¦ãyâxãå¼ãå«ãã§ããã°æå¹è¾º(y,x)ãã°ã©ãã«å ããã ãã®ããã«ãã¦ã§ããã°ã©ãã«å¼·é£çµæåå解ã¢ã«ã´ãªãºã ãé©ç¨ããããå¼·é£çµæåãåãå¤æ°ã®çãªãã©ã«ã¨å½ãªãã©ã«ãå«ãã ã¨ãã«å 足å²ãå½ã¦ãåå¨ããªããªãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}