{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-subset-construction-nfa-to-dfa-01",
  "mko_id": "mko-subset-construction-nfa-to-dfa",
  "title": {
    "zh-Hant": "epsilon-NFA的完整reachable subset DFA",
    "en": "The complete reachable-subset DFA of an epsilon-NFA"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-subset-construction-nfa-to-dfa-01",
    "source": {
      "mko_id": "mko-subset-construction-nfa-to-dfa",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "813266740a8269286c26a644c634a9940342e8c8909e1d7fd8233daa628c68b3",
      "english_sha256": "3b47add3d1dae221afbd48a68b2b959bf3bedd4a4bf2ee1185dc04047932c28e"
    },
    "mode": "algorithm_trace",
    "audience_prerequisites": [
      "work"
    ],
    "goal": {
      "zh-Hant": "完整列轉移並以prefix induction證語言等價。",
      "en": "List every transition and prove language equivalence by prefix induction."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "Q={0,1,2}，Σ={a,b}，start=0，finals={2}。完整NFA表：(0,ε)={1}，(1,a)={1}，(1,b)={2}；其餘所有(q,s)∈Q×{ε,a,b}轉移為空。",
          "en": "Q={0,1,2}, Sigma={a,b}, start0, finals{2}. The full NFA table has(0,epsilon)={1},(1,a)={1},(1,b)={2}; all other pairs in Q times{epsilon,a,b} have empty transitions."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1",
          "work"
        ],
        "before_tex": "\\operatorname{cl}_\\varepsilon(\\{0\\})",
        "after_tex": "S=\\{0,1\\}\\text{ is the DFA start}",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "0可免費到1，因此起始subset先epsilon封閉。",
          "en": "State0 reaches1 without input, so epsilon-close the start subset first."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "work"
          ],
          "explanation": {
            "zh-Hant": "只從{0}起步會漏a與b的路徑。",
            "en": "Starting from{0} alone would miss a and b paths."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01",
          "work"
        ],
        "before_tex": "\\delta_D(S,s)=\\operatorname{cl}_\\varepsilon(\\operatorname{move}(S,s))",
        "after_tex": "\\delta_D(S,a)=A=\\{1\\},\\quad\\delta_D(S,b)=F=\\{2\\}",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "S兩個symbol的move分別為{1}、{2}，再封閉不變。",
          "en": "For both symbols, the moves from S are{1},{2}; closure leaves them unchanged."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "work"
          ],
          "explanation": {
            "zh-Hant": "NFA原表所有states均納入move，不只任選一路。",
            "en": "Move includes every active NFA state, not one chosen path."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S02",
          "work"
        ],
        "before_tex": "A=\\{1\\}",
        "after_tex": "\\delta_D(A,a)=A,\\quad\\delta_D(A,b)=F",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "A的兩個symbol分支完整列出。",
          "en": "List both symbol branches from A."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "work"
          ],
          "explanation": {
            "zh-Hant": "沒有epsilon邊離開1，封閉仍是單點。",
            "en": "No epsilon edge leaves1, so closure remains singleton."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S03",
          "work"
        ],
        "before_tex": "F=\\{2\\}",
        "after_tex": "\\delta_D(F,a)=D=\\varnothing,\\quad\\delta_D(F,b)=D",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "接受state2沒有任何消耗input轉移，後續symbol進dead state。",
          "en": "Accepting state2 has no input-consuming transitions; either next symbol reaches dead state."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S03",
            "work"
          ],
          "explanation": {
            "zh-Hant": "接受subset也必須有完整DFA轉移。",
            "en": "An accepting subset still needs complete DFA transitions."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S04",
          "work"
        ],
        "before_tex": "D=\\varnothing",
        "after_tex": "\\delta_D(D,a)=D,\\quad\\delta_D(D,b)=D",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "空subset在兩symbol下自迴圈，使DFA total。",
          "en": "The empty subset loops on both symbols, making the DFA total."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S04",
            "work"
          ],
          "explanation": {
            "zh-Hant": "刪empty state又不處理incoming dead transitions會不完整。",
            "en": "Deleting the empty state without handling incoming dead transitions leaves an incomplete DFA."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S05",
          "work"
        ],
        "before_tex": "S\\xrightarrow{a}A,\\ S\\xrightarrow{b}F,\\ S\\xrightarrow{ba}D",
        "after_tex": "Q_D=\\{S,A,F,D\\},\\quad F_D=\\{F\\}",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "四subset皆reachable；八轉移已封閉，不再產生其他subset。",
          "en": "All four subsets are reachable; the eight transitions are closed and generate no others."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S05",
            "work"
          ],
          "explanation": {
            "zh-Hant": "接受條件是與{2}交集非空，不是subset等於全部finals的一般規則。",
            "en": "Acceptance means nonempty intersection with{2}, not general equality to the final set."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S06",
          "work"
        ],
        "before_tex": "w=\\varepsilon",
        "after_tex": "\\delta_D^*(S,\\varepsilon)=S=\\operatorname{cl}_\\varepsilon(\\{0\\})=R_N(\\varepsilon)",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "prefix invariant的base把兩台機器的初始可達集合對齊。",
          "en": "The prefix-invariant base aligns the machines' initial reachable sets."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S06",
            "work"
          ],
          "explanation": {
            "zh-Hant": "R_N表示讀完prefix後所有epsilon-closed可達states。",
            "en": "R_N denotes all epsilon-closed reachable states after a prefix."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S07",
          "work"
        ],
        "before_tex": "\\delta_D^*(S,w)=R_N(w),\\quad s\\in\\Sigma",
        "after_tex": "\\delta_D^*(S,ws)=\\operatorname{cl}_\\varepsilon(\\operatorname{move}(R_N(w),s))=R_N(ws)",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "以NFA語義與subset轉移定義證任意下一symbol保持invariant。",
          "en": "NFA semantics and the subset transition definition preserve the invariant for any next symbol."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S07",
            "work"
          ],
          "explanation": {
            "zh-Hant": "w任意、s兩種皆涵蓋，因此是全word induction。",
            "en": "w is arbitrary and both symbols are covered, giving induction over all words."
          }
        },
        "leaf_basis": "work"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S08",
          "work"
        ],
        "before_tex": "\\delta_D^*(S,w)\\cap\\{2\\}\\ne\\varnothing\\iff R_N(w)\\cap\\{2\\}\\ne\\varnothing",
        "after_tex": "L(D)=L(N)",
        "relation": "implies",
        "rule": "work",
        "conditions": [],
        "explanation": {
          "zh-Hant": "由全prefix invariant與相同接受條件得完整語言等價。",
          "en": "The all-prefix invariant and common acceptance condition give full language equivalence."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S08",
            "work"
          ],
          "explanation": {
            "zh-Hant": "沒有以幾個測試words替代歸納證明。",
            "en": "A few tested words have not replaced the induction proof."
          }
        },
        "leaf_basis": "work"
      }
    ],
    "result": {
      "zh-Hant": "reachable DFA共有四state、八轉移，與原epsilon-NFA對所有words等價。",
      "en": "The reachable DFA has four states and eight transitions and is equivalent to the epsilon-NFA for every word."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "DFA start={0}。",
          "en": "The DFA starts at{0}."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "0可epsilon到1，故應{0,1}。",
          "en": "0 epsilon-reaches1, so the start is{0,1}."
        }
      },
      {
        "claim": {
          "zh-Hant": "empty subset不是合法state。",
          "en": "The empty subset is not a legal state."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "它表示所有NFA分支都消失，且是total DFA所需dead state。",
          "en": "It represents loss of all NFA branches and is the dead state needed for totality."
        }
      },
      {
        "claim": {
          "zh-Hant": "測過a、b就證完整等價。",
          "en": "Testing a,b proves full equivalence."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "完整等價由任意prefix induction，不由有限tests。",
          "en": "Full equivalence comes from arbitrary-prefix induction, not finite tests."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "DFA start state是epsilon-closure({q0})。對subset S與symbol a，delta_D(S,a)=epsilon-closure(move(S,a))；accepting subset恰與NFA final-state set有非空交集。empty subset是合法dead state，可只保留reachable subsets但須明示。任意word invariant是DFA讀完每個prefix的subset恰等於NFA所有epsilon-closed reachable states；有限words測試不足以證language equivalence。",
          "en": "The DFA start is epsilon-closure({q0}). For subset S and symbol a, delta_D(S,a)=epsilon-closure(move(S,a)). A subset accepts exactly when its intersection with the NFA final set is nonempty. Empty subset is a legal dead state. Restriction to reachable subsets is allowed only when explicit. For every word prefix, the DFA subset equals all epsilon-closed NFA states reachable after that prefix; finite-word testing alone does not prove language equivalence."
        },
        "source": {
          "mko_id": "mko-subset-construction-nfa-to-dfa",
          "sha256": "813266740a8269286c26a644c634a9940342e8c8909e1d7fd8233daa628c68b3",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      },
      {
        "id": "work",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "epsilon-closure包含零次與有限次epsilon步；move合併全部active states的symbol後繼；word長度歸納與DFA/NFA接受定義。",
          "en": "Epsilon closure includes zero or finitely many epsilon steps; move unions symbol successors of every active state; word-length induction and DFA/NFA acceptance definitions."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N01",
        "lhs": "4*2",
        "rhs": "8"
      },
      {
        "id": "N02",
        "lhs": "3*3-3",
        "rhs": "6"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只保留reachable subsets，明確包含empty dead state。",
      "en": "Only reachable subsets are retained, explicitly including the empty dead state."
    },
    "md_symbols": [
      [
        "S,A,F,D",
        "四個reachable subsets",
        "four reachable subsets"
      ],
      [
        "R_N(w)",
        "NFA讀w後封閉可達集",
        "epsilon-closed NFA states reachable after w"
      ]
    ],
    "md_error_controls": [
      {
        "title": "closure次序 / Closure order",
        "zh": "起始先closure，每次move後再closure。",
        "en": "Close the start and close again after every move."
      },
      {
        "title": "完整八轉移 / All eight transitions",
        "zh": "四reachable states各有a、b兩轉移。",
        "en": "Each of four reachable states has transitions on both a,b."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "66fd6e76217271463939e2074eb9e586f0571bdfa596621064cb082086e08ad0",
    "original_source_sha256": "66fd6e76217271463939e2074eb9e586f0571bdfa596621064cb082086e08ad0",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "reader_review": "142_of_142_source_bound",
    "wording_review": "original_Lead_decisions_resolved",
    "glossary_reader_paraphrases": [],
    "independent_AI_concurrence": "SCOPED_LEAD_AND_BILINGUAL_CONTEXT_REVIEW",
    "issue_ids": [],
    "parent_manifest_sha256": "d29f4cae8229ebd24f60d496cb1d3cd4ad8c0a4dca9d44daab0c3245c544283a",
    "scope": "Owner-adopted reader revision. Lead and bilingual review concern the recorded text and premises; no new universal or Lean proof, canonical promotion or historical-label rewrite."
  }
}
