Computation and Turing Machines
Nabil Mustafa Computability and Complexity
Nabil Mustafa Computation and Turing MachinesInput/Output Assumptions
I/O Assumption Input: Finite string of bits, i.e., sequence of 0’s and 1’s. Output: Finite string of bits. Claim Without loss of generality, one can always assume the above input. Set of all strings of length n denoted by {0, 1}n. Set of all strings: {0, 1}∗ =
n≥0{0, 1}nCan represent Integers Alphabets Graphs, using adjacency matrix Use ⌊x⌋ to represent the encoding of x
Nabil Mustafa Computation and Turing MachinesRepresenting tuples
Use notation x, y to represent the pair x and y Can encode x, y as follows: First encode x, y as ⌊x⌋ # ⌊y⌋ Use mapping 0 → 00, 1 → 11, and # → 01, Can decode properly by Scanning left to right, Read two consecutive bits and decode
Nabil Mustafa Computation and Turing MachinesRepresenting Problems
Example Problem: Given a graph G = (V , E) and an integer k, does there exist an independent of size k in G? Answer is a ‘yes’ or a ‘no’ Can encode output ‘yes’ by 1 and ‘no’ by 0 Can assume that G is given by a string of bits. Then, can model this problem by a boolean function. Boolean function Given a boolean function f : {0, 1}∗ → {0, 1}, define Lf = {x : f (x) = 1} as the set of inputs on which f accepts x.
Nabil Mustafa Computation and Turing Machines