{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-nondeterministic-finite-automaton-01",
  "mko_id": "mko-nondeterministic-finite-automaton",
  "title": {
    "zh-Hant": "NFA的existential有限路徑",
    "en": "An existential finite accepting NFA path"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-nondeterministic-finite-automaton-01",
    "source": {
      "mko_id": "mko-nondeterministic-finite-automaton",
      "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
      "sha256": "4ac739d18d7d5b29bc3d146c9707a5cbf0e98a1bd3b66ce6a5b064ec83f1380b",
      "english_sha256": "d3037e441fbf749593b9c7847ce52c1e4d383a9b8dacdbe3f2068aec86b4f406"
    },
    "mode": "worked_example",
    "audience_prerequisites": [
      "calc"
    ],
    "goal": {
      "zh-Hant": "指定NFA接受aab，即使另一分支dead；epsilon loop本身不接受。",
      "en": "The specified NFA accepts aab despite a dead alternative branch; an epsilon loop alone does not accept."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "Q={q0,q1,qf,qd}，Σ={a,b}，start q0，finals{qf}；全部edges為[q0,null,q1],[q0,null,q0],[q0,a,qd],[q1,a,q1],[q1,b,qf],[qd,a,qd],[qd,b,qd]；word aab。",
          "en": "Q={q0,q1,qf,qd}, alphabet={a,b}, start q0,finals {qf}; all edges are [q0,null,q1],[q0,null,q0],[q0,a,qd],[q1,a,q1],[q1,b,qf],[qd,a,qd],[qd,b,qd]; word aab."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "Q\\ne\\varnothing,\\quad Q\\cap\\Sigma=\\varnothing",
        "after_tex": "\\{[q_0,\\text{null},q_1],[q_0,\\text{null},q_0],[q_0,a,q_d],[q_1,a,q_1],[q_1,b,q_f],[q_d,a,q_d],[q_d,b,q_d]\\}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "明列全部七條合法relation；可有epsilon、多分支與缺邊，不要求DFA總決定表。",
          "en": "All seven legal relation entries are explicit; epsilon, branching and missing edges are allowed without a total deterministic table."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1"
          ],
          "explanation": {
            "zh-Hant": "qf沒有輸出邊仍合法；start必在非空Q。",
            "en": "qf may have no outgoing edges; the start lies in nonempty Q."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S02",
        "uses": [
          "G1",
          "S01"
        ],
        "before_tex": "w=aab,\\quad|w|=3",
        "after_tex": "[q_0,0]",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "初始化state與已讀位置，尚未消耗a。",
          "en": "Initialize state and consumed-input position before reading any a."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01"
          ],
          "explanation": {
            "zh-Hant": "position0是初始值，不是接受條件。",
            "en": "Position zero is an initial value, not acceptance."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S03",
        "uses": [
          "G1",
          "S01",
          "S02"
        ],
        "before_tex": "[q_0,0]",
        "after_tex": "[q_1,0]\\text{ via }[q_0,\\text{null},q_1]",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "epsilon選擇進入q1，位置不變。",
          "en": "Choose the epsilon edge to q1 without advancing position."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S02"
          ],
          "explanation": {
            "zh-Hant": "不能把epsilon當成讀第一個a。",
            "en": "The epsilon edge does not read the first a."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S04",
        "uses": [
          "G1",
          "S01",
          "S03"
        ],
        "before_tex": "[q_1,0],\\quad w_1=a",
        "after_tex": "[q_1,1]",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "用a-loop消耗首a，state留q1。",
          "en": "The a-loop consumes the first a while staying at q1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S03"
          ],
          "explanation": {
            "zh-Hant": "同state不代表epsilon，這步確實消耗一字。",
            "en": "An unchanged state is not epsilon; this step consumes a symbol."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S05",
        "uses": [
          "G1",
          "S01",
          "S04"
        ],
        "before_tex": "[q_1,1],\\quad w_2=a",
        "after_tex": "[q_1,2]",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同一合法loop讀第二a。",
          "en": "The same legal loop reads the second a."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S04"
          ],
          "explanation": {
            "zh-Hant": "不可直接跳到position3，b仍未讀。",
            "en": "One cannot jump to position 3; b is still unread."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S06",
        "uses": [
          "G1",
          "S01",
          "S05"
        ],
        "before_tex": "[q_1,2],\\quad w_3=b",
        "after_tex": "[q_f,3]",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "b-edge消耗末字到final，位置等word長度。",
          "en": "The b-edge consumes the last symbol and reaches a final state at word length."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S05"
          ],
          "explanation": {
            "zh-Hant": "qf雖沒有輸出邊，接受只需已完成的有限路徑。",
            "en": "qf needs no outgoing edge; acceptance requires only the completed finite path."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S07",
        "uses": [
          "G1",
          "S02",
          "S03",
          "S04",
          "S05",
          "S06"
        ],
        "before_tex": "[q_f,3],\\quad q_f\\in F,\\quad3=|w|",
        "after_tex": "aab\\text{ accepted}",
        "relation": "implies",
        "rule": "mko_definition",
        "conditions": [],
        "explanation": {
          "zh-Hant": "存在這條有限讀完路徑就夠，不要求所有分支接受。",
          "en": "Existence of this finite consuming path suffices; not every branch must accept."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S02",
            "S03",
            "S04",
            "S05",
            "S06"
          ],
          "explanation": {
            "zh-Hant": "起點、每條邊與終點均已列，不用有界搜尋未命中的推斷。",
            "en": "Start, every edge and endpoint are explicit; no bounded no-hit inference is used."
          }
        },
        "leaf_basis": "mko_definition"
      },
      {
        "id": "S08",
        "uses": [
          "G1",
          "S01",
          "S07"
        ],
        "before_tex": "[q_0,0]\\xrightarrow{a}[q_d,1]\\xrightarrow{a}[q_d,2]\\xrightarrow{b}[q_d,3]",
        "after_tex": "q_d\\notin F\\text{ on this branch, but the accepting branch still exists}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "另一條完整分支到dead非final qd，不會否證先前existential接受witness。",
          "en": "A different complete branch ends at nonfinal dead state qd without refuting the existential witness."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "將NFA誤當all-branches接受會錯拒這個word。",
            "en": "Requiring every branch to accept would incorrectly reject this word."
          }
        },
        "leaf_basis": "calc"
      },
      {
        "id": "S09",
        "uses": [
          "G1",
          "S01",
          "S07",
          "S08"
        ],
        "before_tex": "[q_0,0]\\xrightarrow{\\varepsilon}[q_0,0];\\quad F'=\\varnothing",
        "after_tex": "\\text{epsilon cycle alone does not accept};\\quad F'=\\varnothing\\text{ is a valid empty-language NFA}",
        "relation": "implies",
        "rule": "calc",
        "conditions": [],
        "explanation": {
          "zh-Hant": "loop本身未到final且未讀input；空final集合仍是合法模型，只是不可能滿足末態final。",
          "en": "The loop alone neither reaches a final nor consumes input; an empty final set is valid but can never meet final-state acceptance."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "S01",
            "S07",
            "S08"
          ],
          "explanation": {
            "zh-Hant": "empty alphabet也可合法，例如只含start與final同一state、無edges的NFA接受ε。",
            "en": "An empty alphabet is valid too; a one-state start/final NFA with no edges accepts epsilon."
          }
        },
        "leaf_basis": "calc"
      }
    ],
    "result": {
      "zh-Hant": "指定NFA接受aab，即使另一分支dead；epsilon loop本身不接受。",
      "en": "The specified NFA accepts aab despite a dead alternative branch; an epsilon loop alone does not accept."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "有一條dead分支就必拒絕aab。",
          "en": "One dead branch forces rejection of aab."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "已列另一條完整accepting path。",
          "en": "Another complete accepting path is explicitly given."
        }
      },
      {
        "claim": {
          "zh-Hant": "epsilon cycle本身即接受。",
          "en": "An epsilon cycle is itself acceptance."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "仍須有限路徑讀完input並到final。",
          "en": "A finite path must still consume all input and end final."
        }
      },
      {
        "claim": {
          "zh-Hant": "NFA必有非空alphabet與final set。",
          "en": "An NFA needs a nonempty alphabet and final set."
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "本模型容許兩者empty；只要求start使states非空。",
          "en": "Both may be empty; only states must be nonempty to contain a start."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "calc",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "假設有限集合、有限字串與索引、逐步函數更新及自然數歸納；ε表示長度0字串。",
          "en": "Assume finite sets, finite strings and indices, stepwise function updates and induction on natural numbers; epsilon denotes the length-zero word."
        }
      },
      {
        "id": "mko_definition",
        "kind": "cited",
        "statement": {
          "zh-Hant": "transition序列固定[from_state,input_symbol_or_null,to_state]；null是epsilon且不消耗input。states因含start而nonempty；alphabet與final-state set都允許empty。relation可empty或multi-valued，不要求deterministic/total。empty word可經finite epsilon path接受；empty final set合法並辨識empty language。一條finite accepting path證membership；bounded search failure不證rejection。epsilon cycle本身不接受，也不要求all branches接受。",
          "en": "Transitions are [from state,input symbol or null,to state]; null is epsilon and consumes no input. States are nonempty because they contain the start, while the alphabet and final-state set may be empty. The relation may be empty or multivalued and need not be deterministic or total. An empty word may be accepted by a finite epsilon path. An empty final set is valid and recognizes the empty language. One finite accepting path proves membership; bounded-search failure does not prove rejection. An epsilon cycle alone does not accept, and all branches need not accept."
        },
        "source": {
          "mko_id": "mko-nondeterministic-finite-automaton",
          "sha256": "4ac739d18d7d5b29bc3d146c9707a5cbf0e98a1bd3b66ce6a5b064ec83f1380b",
          "commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f"
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": []
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "完整finite relation，null不耗輸入；不推DFA等價或subset theorem。",
      "en": "A complete finite relation with input-free null; no DFA-equivalence or subset-construction claim."
    },
    "md_symbols": [
      [
        "q_d",
        "非final dead state",
        "nonfinal dead state"
      ],
      [
        "F",
        "接受狀態集合",
        "final-state set"
      ],
      [
        "null",
        "epsilon transition標記",
        "epsilon-transition marker"
      ]
    ],
    "md_error_controls": [
      {
        "title": "存在量詞 / Existential quantifier",
        "zh": "一條完整接受路徑就證membership，dead branches不推拒絕。",
        "en": "One full accepting path certifies membership; dead branches do not prove rejection."
      },
      {
        "title": "epsilon位置 / Epsilon position",
        "zh": "null邊位置保持，符號邊才增加1。",
        "en": "null edges keep position; input-symbol edges advance by one."
      }
    ],
    "md_open_items": []
  },
  "revision": {
    "id": "ocme-new142-reader-adoption-20261021",
    "collection": "coverage-20261021",
    "source_commit": "b1b2f1dcf8c50d67a93fe52d95f8eef7b3abba9f",
    "adopted_source_sha256": "2f202837026e2fb8c1a908dc18766c8e59c70be3d98e1011ca235aa4e3cd7172",
    "original_source_sha256": "2f202837026e2fb8c1a908dc18766c8e59c70be3d98e1011ca235aa4e3cd7172",
    "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."
  }
}
