CompilerDesign 个人答案 - Ch1
摘要:E 1.1.1:Compilier: translate code from source language to target languageInterpreter: translate code + execution (code + input + interpreter -> output)E1.1.2:Pro of compiler: simpler design; multiple runPro of interpreter: realtime runningE1.1.3:Easier to debug the compilerCan do an extra level o
阅读全文
算法导论(CLRS, 2nd) 个人答案 Ch34.1
摘要:34.1-1:Assumption: the graph is unweightedLONGEST-PATH-LENGTH ∈P=> LONGEST-PATH∈P:Suppose there's a problem solves LHS in polynomial time, gives result k; then for the problem of RHS, it returns true if the given k' <= k.LONGEST-PATH∈P:=> LONGEST-PATH-LENGTH ∈P:Guess the k to the po
阅读全文