# Question 24749: A Canonical Scan Schema Has an All-Input Ranking and Correct Answers

[Return to catalogue page 124](https://ocme.evemisslab.com/en/questions/page/124/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261015-advance-20261113-r05-turing-machine-decision-model-foundations/#q-20261015-advance-20261113-r05-turing-machine-decision-model-0074)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

R0048-24749 · q-20261015-advance-20261113-r05-turing-machine-decision-model-0074



## Original question and givens

Use deterministic single-tape states=[scan, accept, reject], input_alphabet=[a23, b23], tape_alphabet=[a23, b23, _], blank=_, start=scan, accept=accept, reject=reject, transitions=[[scan, a23, scan, a23, R], [scan, b23, accept, b23, S], [scan, _, reject, _, S]]. Each transition is [state,read,next,write,L/R/S]; keys [state,read] are unique and halting states have no outgoing transitions. Input symbols form a blank-free tape subset. The integer-indexed tape is blank at every unlisted cell, with configuration [state,head,sparse nonblank tape]; L may move left of0. Canonical answer transitions/tape cells retain the source sort convention. Target input symbol=b23. Give (states, input_alphabet, tape_alphabet, blank, start, accept, reject, transitions, target_symbol, ranking, decrease_rule, step_bound, schema_decider_certificate, certificate).


- G001 — Use deterministic single-tape states=[scan, accept, reject], input_alphabet=[a23, b23], tape_alphabet=[a23, b23, _], blank=_, start=scan, accept=accept, reject=reject, transitions=[[scan, a23, scan, a23, R], [scan, b23, accept, b23, S], [scan, _, reject, _, S]]. Each transition is [state,read,next,write,L/R/S]; keys [state,read] are unique and halting states have no outgoing transitions. Input symbols form a blank-free tape subset. The integer-indexed tape is blank at every unlisted cell, with configuration [state,head,sparse nonblank tape]; L may move left of0. Canonical answer transitions/tape cells retain the source sort convention. Target input symbol=b23. Give (states, input_alphabet, tape_alphabet, blank, start, accept, reject, transitions, target_symbol, ranking, decrease_rule, step_bound, schema_decider_certificate, certificate).





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


- [mko-turing-machine-decision-model](https://ocme.evemisslab.com/en/mko/mko-turing-machine-decision-model/)





## Step-by-step derivation

S001 · impliesBefore

source roles = [tm-global-decider-ranking]

After

derived = [[states, input_alphabet, tape_alphabet, blank, start, accept, reject, transitions, target_symbol, ranking, decrease_rule, step_bound, schema_decider_certificate, certificate]]

Conditions: none

List the full source field order without JavaScript,keeping original data,Boolean flags,mathematical objects and nonclaims distinct.

Step identifiers and dependenciesRule: source_ordered_fields_without_JS · Uses: G001





S002 · impliesBefore

source roles = [[scan, accept, reject], [a23, b23], [a23, b23, _], _, scan, accept, reject, [[scan, a23, scan, a23, R], [scan, b23, accept, b23, S], [scan, _, reject, _, S]]]

After

derived = [[accept, reject, scan], [a23, b23], [_, a23, b23], [[scan, _, reject, _, S], [scan, a23, scan, a23, R], [scan, b23, accept, b23, S]], Yes]

Conditions: none

All three lists are nonempty and unique;input is a blank-free tape subset,but state and alphabet labels may overlap.Source NUL-joined(from,read) keys are unique,and halting states have no outgoing rules.A partial table is legal,not filled with rejection;transition collation and UTF16 set order differ.

Step identifiers and dependenciesRule: TM_complete_signature_partial_transition_table_allowed · Uses: G001, S001





S003 · impliesBefore

source roles = [b23, No, [[accept, reject, scan], [a23, b23], [_, a23, b23], _, scan, accept, reject, [[scan, _, reject, _, S], [scan, a23, scan, a23, R], [scan, b23, accept, b23, S]]]]

After

derived = [[[accept, reject, scan], [a23, b23], [_, a23, b23], _, scan, accept, reject, [[scan, _, reject, _, S], [scan, a23, scan, a23, R], [scan, b23, accept, b23, S]]], Yes]

Conditions: none

Require the exact full signature and all schema transitions;sample successful traces do not certify an arbitrary TM.

Step identifiers and dependenciesRule: TM_EXACT_canonical_scan_schema_not_sampled_machine · Uses: G001, S002





S004 · impliesBefore

source roles = [b23, [a23, b23], [[scan, _, reject, _, S], [scan, a23, scan, a23, R], [scan, b23, accept, b23, S]]]

After

derived = [ANY legal w:scan head k<=|w|,first k symbols target-free,tape unchanged, scan rank=|w|-k+1;halting rank=0, nontarget R step lowers rank by1;target accept or blank reject lowers to0, EVERY word halts within |w|+1;accept iff target occurs]

Conditions: none

Induct over any input prefix:Nontarget symbols are copied with R,target accepts,and blank rejects.Assign rank0 after halting to cover the final strict decrease.Blank-free inputs give |w|+1 steps.The same invariant proves answer correctness,not merely termination.

Step identifiers and dependenciesRule: TM_ANY_word_prefix_invariant_rank0_after_halt_bound · Uses: G001, S003









## Reverse checks


- S004 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S003 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.





## Result

([accept, reject, scan], [a23, b23], [_, a23, b23], _, scan, accept, reject, [[scan, _, reject, _, S], [scan, a23, scan, a23, R], [scan, b23, accept, b23, S]], b23, ranking=unscanned_input_cells_plus_one, strictly_decreases_on_every_scan_step, |w|+1, Yes, global_termination_and_answer_correctness_certificate_for_all_words)

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: 234aa93ef9ce23a46c12cdfba4f09c2b97e664f97984da44ba6346d91f21b866
- candidate record SHA-256: 205e012fe1d95c3c304c5ec139552801113df668f294aed59e41102b8a528be4
- semantic review receipt SHA-256: 049a9e07e69fead88d93b34f0937b9470a06d71c1a8d097058fc83554529bdd0
- question-first witness SHA-256: 0c71ebb418f3de347d232d159fc25e93036f4ab9166bcfb5ee5b4be86d5c55b9
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261113-r05-turing-machine-decision-model-0074.json)




