Randomized Turing Machines

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Cook’s Theorem The Foundation of NP-Completeness.
Order Statistics Sorted
Randomized Algorithms Kyomin Jung KAIST Applied Algorithm Lab Jan 12, WSAC
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Variants.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 10/23/2009.
CS 310 – Fall 2006 Pacific University CS310 Turing Machines Section 3.1 November 6, 2006.
Quantum Automata Formalism. These are general questions related to complexity of quantum algorithms, combinational and sequential.
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
Finite State Machines Data Structures and Algorithms for Information Processing 1.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Section 11.4 Language Classes Based On Randomization
Turing Machines A more powerful computation model than a PDA ?
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
CSCI 2670 Introduction to Theory of Computing September 28, 2005.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
CPSC 335 Randomized Algorithms Dr. Marina Gavrilova Computer Science University of Calgary Canada.
Computation Model and Complexity Class. 2 An algorithmic process that uses the result of a random draw to make an approximated decision has the ability.
A Universal Turing Machine
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Part 1 – Pages COMPUTABILITY THEORY.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
ICS 353: Design and Analysis of Algorithms
Lecture 9  2010 SDU Lecture9: Turing Machine.  2010 SDU 2 Historical Note Proposed by Alan Turing in 1936 in: On Computable Numbers, with an application.
NP-Completness Turing Machine. Hard problems There are many many important problems for which no polynomial algorithms is known. We show that a polynomial-time.
Lecture 17 Undecidability Topics:  TM variations  Undecidability June 25, 2015 CSCE 355 Foundations of Computation.
1 Section 13.1 Turing Machines A Turing machine (TM) is a simple computer that has an infinite amount of storage in the form of cells on an infinite tape.
1 IDT Open Seminar ALAN TURING AND HIS LEGACY 100 Years Turing celebration Gordana Dodig Crnkovic, Computer Science and Network Department Mälardalen University.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Lecture 24UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 24.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
INTRO2CS Tirgul 8 1. Searching and Sorting  Tips for debugging  Binary search  Sorting algorithms:  Bogo sort  Bubble sort  Quick sort and maybe.
1 8.4 Extensions to the Basic TM Extended TM’s to be studied: Multitape Turing machine Nondeterministic Turing machine The above extensions make no increase.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
More variants of Turing Machines
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
Busch Complexity Lectures: Turing Machines
Lecture 8 Randomized Algorithms
Turing Machines 2nd 2017 Lecture 9.
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
COSC 3340: Introduction to Theory of Computation
Theory of Computation Turing Machines.
Recall last lecture and Nondeterministic TMs
CS21 Decidability and Tractability
CSE 105 theory of computation
CS203 Lecture 15.
Turing Machines Everything is an Integer
CSE 105 theory of computation
Presentation transcript:

Randomized Turing Machines

Deterministic Algorithm Is the algorithm which, given a particular input, will always produce the same output, with the underlying machine always passing through the same sequence of states.  Is the algorithm that always solve the problem correctly.

Randomized Algorithm Is the algorithm that employs a degree of randomness as part of its logic, The algorithm typically uses a sequence of random bits as an auxiliary input to guide its behavior, in the hope of achieving good performance. So, in addition to input the algorithm takes a source of random numbers and makes random choices during execution. Its Behavior can vary even on a fixed input. Different runs of a randomized algorithm may give different results.

Randomized vs. Deterministic Algorithm There are two principal advantages to randomized algorithms. The first advantage is performance; randomized algorithms run faster than the best-known deterministic algorithms for many problems. The second advantage is that many randomized algorithms are simpler to describe and implement than deterministic algorithms of comparable performance.

Monte Carlo algorithm A Monte Carlo algorithm is a randomized algorithm  that its running time is deterministic, but its output may be incorrect with a certain (typically small) probability . The concept of a Monte Carlo algorithm applies in situations where the algorithm makes a decision, its output is either yes or no . If the answer is yes, then it confirms it with probability larger than 1/2, but if the answer is no, then it simply remains silent.

Las Vegas algorithm Las Vegas algorithm is a randomized algorithm that always gives correct results or it informs about the failure. In other words, Las Vegas algorithm does not gamble with the correctness of the result; it gambles only with the resources used for the computation. Las Vegas algorithm as an algorithm that runs for an unpredictable amount of time but always succeeds. A simple example is randomized quicksort, where the pivot is chosen randomly, but the result is always sorted.

Quicksort: A Randomized Algorithm Given a list of elements, randomly select one element. Split the list into those above and those below the selected element. Recursively repeat the process on each new list. Put the new lists back together, resulting in a completely sorted list. Complexity Range: O(n log n) to O(n2).

A Turing Machine Using Randomization Use a multi tape Turing Machine The first tape contains the input. The second tape is called the random tape. When blanks are scanned, they are filled with randomly chosen 0’s and 1’s with a probability of ½ (“coin- flip”) and never changed. The third and subsequent tapes are blank scratch tapes.

Quicksort on A Randomized Turing Machine 1) Select Pivot (Random Aspect of The Algorithm) The first tape contains the delineated sub-list of length m. Use O(log m) new random bits from tape 2 to select a random number. Since the value may not be a power of 2, we may not be able to select every integer between 1 and m with equal probability. Take 2 log2 m bits from tape 2,divide by m, and add 1. This yields a value between 1 and m with a probability close to 1/m.

Quicksort On A Randomized Turing Machine 2) Place Pivot on Tape 3 3) Copy Values <= Pivot To Tape 4 (Sub-Sublist) 4) Copy Values > Pivot To Tape 5 (Sub-Sublist) 5) Copy The Sub-Sublists From Tapes 4 & 5 Back To The Space on Tape 1 That Held The Sublist, Placing A Marker Between The Two Sub-Sublists 6) If The Size of either or both Sub-Sublists > 1, Recursively Perform Quicksort on those Sub- Sublists.

Language of A Randomized Turing Machine Every Turing machine ,FA, or PDA accept some language, even if that language is empty set. But Randomized Turing machine may accept no languages at all. When considering what randomized TM M does in response to an input w, all possible contents of the random tape must also be considered. Some of the strings on the random tape may result in an accept state while others a reject state.

Cont. Each input w to randomized Turing machine M has some probability of acceptance. which is the fraction of the possible contents of the random tape that lead to acceptance. Any sequence of moves that leads to acceptance uses only a finite section of the infinite random tape . If m is the number of random tape cells scanned, the probability of what is seen there is 2-m .

Example of a randomized Turing Machine Transition Function of a Randomized Turing Function Each row corresponds to a state and each column to a pair of XY symbols where X is from the input tape and Y is from the random tape. The table entries qUVDE means the Turing enters state q, writes U on the input tape, writes V on the random tape, moves the input head in direction D, and moves the random head in direction E.

Thank You