Unlimited Register Machine Outline What Is Effective Procedure Intuitive

Unlimited Register Machine Outline What Is Effective Procedure Intuitive

Effective Procedures Effective Procedures Unlimited Register Machine Unlimited Register Machine Computable and Decidable Computable and Decidable Notations Notations Outline 1 Effective Procedures Basic Concepts Unlimited Register Machine ∗ Computable Function 2 Unlimited Register Machine Definition Xiaofeng Gao Instruction Department of Computer Science and Engineering An Example Shanghai Jiao Tong University, P.R.China 3 Computable and Decidable URM-Computable Function CS363-Computability Theory Decidable and Computable 4 Notations Register Machine Joining Programs Together ∗ Special thanks is given to Prof. Yuxi Fu for sharing his teaching materials. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 1/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 2/45 Effective Procedures Effective Procedures Unlimited Register Machine Basic Concepts Unlimited Register Machine Basic Concepts Computable and Decidable Computable Function Computable and Decidable Computable Function Notations Notations What is Effective Procedure Intuitive Definition Methods for addition, multiplication · · · ⊲ Given n, finding the nth prime number. An algorithm or effective procedure is a mechanical rule , or automatic ⊲ Differentiating a polynomial. method , or programme for performing some mathematical operations. ⊲ Finding the highest common factor of two numbers HCF (x, y) → Euclidean algorithm ⊲ Given two numbers x, y, deciding whether x is a multiple of y. Blackbox: input −→ −→ output Their implementation requires no ingenuity, intelligence, inventiveness. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 4/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 5/45 Effective Procedures Effective Procedures Unlimited Register Machine Basic Concepts Unlimited Register Machine Basic Concepts Computable and Decidable Computable Function Computable and Decidable Computable Function Notations Notations What is “effective procedure”? Algorithm An Example : Consider the function g(n) defined as follows: 1, if there is a run of exactly n consecutive 7 ′s g(n) = in the decimal expansion of π, 0, otherwise . An algorithm is a procedure that consists of a finite set of instructions which, given an input from some set of possible inputs, enables us to Question: Is g(n) effective? obtain an output through a systematic execution of the instructions ⊲ The answer is unknown = the answer is negative. that terminates in a finite number of steps. Other Examples: Theorem Proving is in general not effective/algorithmic. Proof Verification is effective/algorithmic. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 6/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 7/45 Effective Procedures Effective Procedures Definition Unlimited Register Machine Basic Concepts Unlimited Register Machine Instruction Computable and Decidable Computable Function Computable and Decidable An Example Notations Notations Computable Function Unlimited Register Machine When an algorithm or effective procedure is used to calculate the An Unlimited Register Machine ( URM ) is an idealized computer. value of a numerical function then the function in question is ⊲ No limitation in the size of the numbers it can receive as input. effectively calculable (or algorithmically computable , effectively ⊲ No limitation in the amount of working space available. computable , computable ). ⊲ Inputs and outpus are restricted to natural numbers. (coding for others) From Shepherdson & Sturgis [1963]’s description. Examples: ⊲ Shepherdson, J. C. & Sturgis, H.E., Computability of Recursive HCF x y is computable; ( , ) Functions, Journal of Association for Computing Machinery g(n) is non-computable. (Journal of ACM) , 10, 217-55, 1963. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 9/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 11/45 Effective Procedures Effective Procedures Definition Definition Unlimited Register Machine Unlimited Register Machine Instruction Instruction Computable and Decidable Computable and Decidable An Example An Example Notations Notations Register Program A URM has an infinite number of register labeled R1, R2, R3,... R1 R2 R3 R4 R5 R6 R7 · · · r1 r2 r3 r4 r5 r6 r7 · · · A URM also has a program , which is a finite list of instructions . Every register can hold a natural number at any moment. An instruction is a recognized simple operations (calculation with numbers) to alter the contents of the registers. ( I , · · · , I ) The registers can be equivalently written as for example 1 s 3 4 ∞ [r1r2r3]1[r4]4[r5r6r7 . ]5 or simply 3 4 7 [r1, r2, r3]1[r4]4[r5, r6, r7]5. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 12/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 14/45 Effective Procedures Effective Procedures Definition Definition Unlimited Register Machine Unlimited Register Machine Instruction Instruction Computable and Decidable Computable and Decidable An Example An Example Notations Notations Instruction Configuration and Instructions Example : The initial registers are: Type Instruction Response of the URM R1 R2 R3 R4 R5 R6 R7 · · · Zero Z(n) Replace rn by 0. ( 0 → Rn, or rn := 0) 9 7 0 0 0 0 0 . Successor S(n) Add 1 to rn. ( rn + 1 → Rn, or rn := rn + 1) Transfer T(m, n) Copy rm to Rn. ( rm → Rn, or rn := rm) The program is: Jump J(m, n, q) If r = r , go to the q-th instruction; m n I : J(1, 2, 6) otherwise go to the next instruction. 1 I2 : S(2) I3 : S(3) I4 : J(1, 2, 6) I5 : J(1, 1, 2) Z(n), S(n), T(m, n) are arithmetic instructions. I6 : T(3, 1) CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 15/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 17/45 Effective Procedures Effective Procedures Definition Definition Unlimited Register Machine Unlimited Register Machine Instruction Instruction Computable and Decidable Computable and Decidable An Example An Example Notations Notations Configuration and Computation Operation of URM under a program P P = {I1, I2, · · · , Is} → URM URM starts by obeying instruction I1 Configuration: When URM finishes obeying Ik, it proceeds to the next instruction in the computation, the contents of the registers + the current instruction number. ⊲ if Ik is not a jump instruction, then the next instruction is Ik+1; ⊲ if I = J(m, n, q) then next instruction is (1) I , if r = r ; or (2) Initial configuration, computation, final configuration. k q m n Ik+1, otherwise. Computation stops when the next instruction is Iv, where v > s. ⊲ if k = s, and Is is an arithmetic instruction; ⊲ if Ik = J(m, n, q), rm = rn and q > s; ⊲ if Ik = J(m, n, q), rm = rn and k = s. CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 18/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 19/45 Effective Procedures Effective Procedures Definition Definition Unlimited Register Machine Unlimited Register Machine Instruction Instruction Computable and Decidable Computable and Decidable An Example An Example Notations Notations Flow Diagram Some Notation 7]1H:CHQJ`1$%`: 1QJ J(m, m, q) is alertunconditional jump ` Y` - 6 7 < 888 Computations that never stop Suppose P is the program of a URM and a1, a2, a3,... are the Q numbers stored in the registers. `7Y` U P(a1, a2, a3,... ) is the initial configuration. ` V`@H7HCV`Q%JR .V CQQ]1J .1]`Q$`:I `7Y` U P(a1, a2, a3,... ) ↓ means that the computation converges . Q `7Y` U V 6 7U@ <U@ 888 P(a1, a2, a3,... ) ↑ means that the computation diverges . `Y` - P(a1, a2,..., am) is P(a1, a2,..., am, 0, 0,... ). '`6Y7U@7 V `b <U@ 7U@ <U@ 888 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 20/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 21/45 Effective Procedures Effective Procedures Unlimited Register Machine URM-Computable Function Unlimited Register Machine URM-Computable Function Computable and Decidable Decidable and Computable Computable and Decidable Decidable and Computable Notations Notations URM-Computable Function URM-Computable Function What does it mean that a URM computes a (partial) n-ary function f ? Let P be the program of a URM and a1,..., an, b ∈ N. When computation P(a1,..., an) converges to b if P(a1,..., an) ↓ and r1 = b in the final configuration. We write P(a1,..., an) ↓ b. P URM-computes f if, for all a1,..., an, b ∈ N, P(a1,..., an) ↓ b iff f (a1,..., an) = b Function f is URM-computable if there is a program that URM-computes f . (We abbreviate “URM-computable” to “computable”) CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 23/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 24/45 Effective Procedures Effective Procedures Unlimited Register Machine URM-Computable Function Unlimited Register Machine URM-Computable Function Computable and Decidable Decidable and Computable Computable and Decidable Decidable and Computable Notations Notations Computable Functions Examples Construct a URM that computes x + y. Let I1 : J(3, 2, 5) I2 : S(1) C be the set of computable functions and V I3 : S(3) `Y` - I : J(1, 1, 1) @Y7- C be the set of n-ary computable functions. 4 n Q `7Y` U `7Y` U @7Y@U CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 25/45 CSC363-ComputabilityTheory@SJTU XiaofengGao UnlimitedRegisterMachine 26/45 Effective Procedures Effective Procedures Unlimited Register Machine URM-Computable Function Unlimited Register Machine URM-Computable

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us