Module 10 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Module 10

Description:

This step only executed if first step halts. Behavior. What does MUP do on all yes instances of H? ... We now have a problem that is half-solvable but not solvable ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 13
Provided by: erict9
Category:
Tags: halfterm | module

less

Transcript and Presenter's Notes

Title: Module 10


1
Module 10
  • Universal Algorithms
  • moving beyond one problem at a time
  • operating system/general purpose computer

2
Observation
  • So far, each program solves one specific problem
  • Divisor
  • Sorting
  • Multiplication
  • Language L

3
Universal Problem/Program
  • Universal Problem (nonstandard term)
  • Input
  • Program P
  • Input x to program P
  • Task
  • Compute P(x)
  • Univeral Program
  • Program which solves universal problem
  • Universal Turing machine

4
Example Input
  • int main(A6)
    Input
  • int i,temp
  • for (i1ilt3i) A1 6
  • if (Ai gt Ai3) A2 4
  • temp Ai3 A3 2
  • Ai3 Ai A4 3
  • Ai temp A5 5
  • A6 1
  • for (i1 ilt5 i)
  • for (ji1jlt6j)
  • if (Aj-1 gt Aj)
  • temp Aj
  • Aj Aj-1
  • Aj-1 temp

5
Organization
Universal Programs Memory
  • Program P
  • int main(A6)
  • int i,temp
  • for (i1ilt3i)
  • if (Ai gt Ai3)
  • temp Ai3
  • Ai3 Ai
  • Ai temp
  • for (i1 ilt5 i)
  • for (ji1jlt6j)
  • if (Aj-1 gt Aj)
  • temp Aj
  • Aj Aj-1
  • Aj-1 temp

6 4 2 5 3 1
int A6,i,temp
Line 1
6
Description of Universal Program
  • Basic Loop
  • Find current line of program P
  • Execute current line of program P
  • Update program Ps memory
  • Update program counter
  • Return to Top of Loop

7
Past, Present, Future
  • Turing came up with the concept of a universal
    program (Universal Turing machine) in the 1930s
  • This is well before the invention of the general
    purpose computer
  • People were still thinking of computing devices
    as special-purpose devices (calculators, etc.)
  • Turing helped move people beyond this narrow
    perspective
  • Turing/Von Neumann perspective
  • Computers are general purpose/universal
    algorithms
  • Focused on computation
  • Stand-alone
  • Today, we are moving beyond this view
  • Computation, communication, cyberspace
  • However, results in Turing perspective still
    relevant

8
Halting Problem Revisited
  • Halting Problem is half-solvable
  • Modified Universal Program (MUP) half-solves H
  • Run P on x
  • Output yes
  • This step only executed if first step halts
  • Behavior
  • What does MUP do on all yes instances of H?
  • What does MUP do on all no inputs of H?

9
Debuggers
  • How are debuggers like gdb or ddd related to
    universal programs?
  • How do debuggers simplify the debugging process?

10
RE and REC
  • We now have a problem that is half-solvable but
    not solvable
  • What do we now know about the complement of the
    Halting Problem?
  • What additional fact about RE and set complement
    does this prove?

11
RE and REC
All Languages
RE
12
Summary
  • Universal Programs
  • 1930s, Turing
  • Introduces general purpose computing concept
  • Not a super intelligent program, merely a precise
    follower of instructions
  • Halting Problem half-solvable but not solvable
  • RE not closed under set complement
Write a Comment
User Comments (0)
About PowerShow.com