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

Slides:



Advertisements
Similar presentations
Formal Models of Computation Part III Computability & Complexity
Advertisements

Problem: Give as many proofs as you can for the Pythagorean Theorem. i.e., a 2 + b 2 = c 2 holds for any right triangle with sides a & b and hypotenuse.
1 If we modify the machine for the language from F12 p. 47 we can easily construct a machine for the language Observation Turing machine for the language.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 2- Visual Basic Schneider
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
1 Lecture 4 Topics –Problem solving Subroutine Theme –REC language class The class of solvable problems Closure properties.
1 Module 3: Classifying Problems One of the main themes of this course will be to classify problems in various ways –By solvability Solvable, “half-solvable”,
1 Lecture 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Lecture 9 Recursive and r.e. language classes
1 Lecture 14 Language class LFSA –Study limits of what can be done with FSA’s –Closure Properties –Comparing to other language classes.
1 Module 9 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
Lecture 8 Recursively enumerable (r.e.) languages
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Lecture 6 Performance Measurement and Improvement.
Lecture 2: Fundamental Concepts
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
1 Lecture 1: Course Overview Course: CSE 360 Instructor: Dr. Eric Torng TA: Huamin Chen.
1 Lecture 10 Proving more specific problems are not recursive Reduction technique –Use subroutine theme to show that if one problem is unsolvable, so is.
Complexity Analysis (Part I)
Algorithms. Problems, Algorithms, Programs Problem - a well defined task. –Sort a list of numbers. –Find a particular item in a list. –Find a winning.
CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in.
1 Lecture 18 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
1 Strings and Languages Operations Concatenation Exponentiation Kleene Star Regular Expressions.
1 Lecture 10 Universal Algorithms –moving beyond one problem at a time –operating system/general purpose computer.
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Graphical representation –Formal.
1 Lecture 7 Topics –Problems about program behavior At least problem input is a program/algorithm –Halting Problem Fundamental problem about program behavior.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
1 Lecture 13 Turing machine model of computation –Sequential access memory (tape) –Limited data types and instructions –Formal Definition –Equivalence.
1 Module 25 Decision problems about regular languages –Basic problems are solvable halting, accepting, and emptiness problems –Solvability of other problems.
1 Module 4: Formal Definition of Solvability Analysis of decision problems –Two types of inputs:yes inputs and no inputs –Language recognition problem.
1 Module 8 Halting Problem revisited –Universal Turing machine half-solves halting problem –A universal Turing machine is an operating system/general purpose.
1 Lecture 11 Proving more specific problems are not solvable Input transformation technique –Use subroutine theme to show that if one problem is unsolvable,
1 Strings and Languages Operations Concatenation Exponentiation Kleene Star Regular Expressions.
1 Module 10 Recursive and r.e. language classes –representing solvable and half-solvable problems Proofs of closure properties –for the set of recursive.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Lecture 11 Studying structure of REC –Complexity theory overview –Automata theory preview Motivating Problem –string searching.
1 Lecture 14 Studying the internal structure of REC, the set of solvable problems –Complexity theory overview –Automata theory preview Motivating Problem.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Theory of Computation. Computation Computation is a general term for any type of information processing that can be represented as an algorithm precisely.
Algorithms: Selected Exercises Goals Introduce the concept & basic properties of an algorithm.
Studies in Big Data 4 Weng-Long Chang Athanasios V. Vasilakos MolecularComputing Towards a Novel Computing Architecture for Complex Problem Solving.
Computer Architecture Computational Models Ola Flygt V ä xj ö University
Discussion of Assignment 9 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
How computers work The CPU & Memory. The parts of a computer.
CMP-MX21: Lecture 5 Repetitions Steve Hordley. Overview 1. Repetition using the do-while construct 2. Repetition using the while construct 3. Repetition.
Scientific Debugging. Errors in Software Errors are unexpected behaviors or outputs in programs As long as software is developed by humans, it will contain.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
Text Chapters 2 Analyzing Algorithms.  goal: predicting resources that an algorithm requires memory, communication bandwidth, hardware, memory, communication.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Recursively Enumerable and Recursive Languages
1 Module 17 Closure Properties of Language class LFSA –Remember ideas used in solvable languages unit –Set complement –Set intersection, union, difference,
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Complexity Analysis (Part I)
Introduction to Algorithms
Unit 1. Sorting and Divide and Conquer
Lesson 15: Processing Arrays
Decidable Languages Costas Busch - LSU.
Introduction to Algorithms
P.V.G’s College of Engineering, Nashik
Type Topic in here! Created by Educational Technology Network
Complexity Analysis (Part I)
Complexity Analysis (Part I)
Presentation transcript:

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(A[6]) { Input int i,temp; for (i=1;i<=3;i++) A[1] = 6 if (A[i] > A[i+3]) {A[2] =4 temp = A[i+3];A[3] = 2 A[i+3] = A[i];A[4] = 3 A[i] = temp;A[5] = 5 }A[6] = 1 for (i=1; i<=5; i++) for (j=i+1;j<=6;j++) if (A[j-1] > A[j]) { temp = A[j]; A[j] = A[j-1]; A[j-1] = temp; }

5 Organization Universal Program’s Memory Program P Program P’s Memory Program P int main(A[6]){ int i,temp; for (i=1;i<=3;i++) if (A[i] > A[i+3]) { temp = A[i+3]; A[i+3] = A[i]; A[i] = temp; } for (i=1; i<=5; i++) for (j=i+1;j<=6;j++) if (A[j-1] > A[j]) { temp = A[j]; A[j] = A[j-1]; A[j-1] = temp; } Program Counter int A[6],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 P’s 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 1930’s –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 debugger’s 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 REC RE  ll Languages H HcHc

12 Summary Universal Programs –1930’s, 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