Presentation is loading. Please wait.

Presentation is loading. Please wait.

Markov Algorithms An Alternative Model of Computation.

Similar presentations


Presentation on theme: "Markov Algorithms An Alternative Model of Computation."— Presentation transcript:

1 Markov Algorithms An Alternative Model of Computation

2 An Algorithm Scheme Example 4.1.1. Let  be alphabet {a, b, c, d}. By a Markov algorithm scheme or schema we shall mean a finite sequence of productions or rewrite rules. As a first example, consider the following two-member sequence of productions. (i) a  c (ii) b  

3 Another Example Example 4.1.2. Let  be alphabet {a, b, c, d}. Next, consider the following three-member sequence of productions. (i) a  c (ii) bc  cb (iii) b .cd

4 Appends ab Example 4.1.3. Let input alphabet  = {a, b}. Let work alphabet  be  {#}. We see that the Markov algorithm scheme consisting of the four-member production sequence (i) #a  a# (ii) #b  b# (iii) # .ab (iv)   # has the effect of appending string ab to any word over .

5 Reverse Word Input word w over  = {a, b} transformed by A S into output word w R

6 Markov Algorithms We can implement each of our three computational paradigms Language acceptance (recognition)‏ Function computation Transduction

7 A Formal Definition Markov algorithm schema S = any triple , ,   nonempty input alphabet  finite work alphabet with     finite, ordered sequence of productions of form    or of form  .   and  (possibly empty) words over 

8 Language Acceptance Example 4.2.1 Input alphabet  = {a, b} Work alphabet  =  {@, %, $, 1}. Six productions/one of them terminal Transforms all and only words in language {a n b m |n  0, m  1} to word 1

9 Some Conventions S a Markov algorithm schema Input alphabet  work alphabet  with 1 . S accepts word w if w  * 1

10 Markov-Acceptable Language Schema S accepts language L if S accepts all and only words in L. A language that is accepted by some Markov algorithm is said to be a Markov- acceptable language.

11 Example Language {a n b m |n  0, m  1} is accepted by Example 4.2.1

12 Language Recognition Input alphabet  and work alphabet  such that both 0, 1   \  S recognizes language L over  S transforms w  L into 1, that is, w  * 1 (accepting 1)‏ S transforms w  L into 0, that is, w  * 0 (rejecting 0)‏ Language recognized by some Markov algorithm S is said to be Markov-recognizable

13 Resources (Time)‏ Definition time S (n) = the maximum number of steps in any terminating computation of S for input of length n

14 Resources (Space)‏ Computation of a Markov algorithm = sequence of computation words Definition space S (n) = the maximum length of any computation word in any terminating computation of S for input of length n

15 Resource Analysis Example 4.2.3 accepts language {w  *|n a (w) = n b (w)} with  = {a, b} time S (n) = (n/2) 2 + n + 2 for even n so O(n 2 )‏ space S (n) = n + 1 so O(n)‏ Compare single-tape Turing machine Same Number of as and bs

16 Function Computation Example One terminal production 1 .11 Computes unary successor function

17 Formal Definition S computes unary partial number-theoretic function f S applied to input 1 n + 1 yields output 1 f(n) + 1 If S applied to input 1 n + 1, where function f is not defined for n, then either S’ computation never terminates or its output is not of form 1 m

18 Two More Examples log n computes f(n) =  log 2 n  if n > 0 and undefined otherwise Example 4.3.6 computes binary function f(n, m) =. |n  m| mod 3

19 Labeled Markov Algorithm That Accepts {w|n a (w) = n b (w) = n c (w)} L 1 : a  ; L 2   ; L 4 L 2 : b  ; L 3   ; L 5 L 3 : c  ; L 1   ; L 5 L 4 : b  ; L 5 c  ; L 5   1 ; L 5  L 5 :  . 

20 Other Examples Palindromes m divides n log n – labeled algorithms

21 Equivalence Result Let S be labeled Markov algorithm with input alphabet . Then there exists standard Markov algorithm S´ with input alphabet  that is computationally equivalent to S. Converse obvious

22 Equivalence Result Class of Markov-computable functions Is identical to the class of Turing- computable functions Function f is Markov-computable iff f is Turing-computable

23 Proof Example 4.5.1/Turing machine that simulates a Markov algorithm For the other direction, see Example 4.5.2/Markov algorithm that simulates a Turing machine Generalizations

24 Given Turing machine M accepting L, there exists Markov algorithm A S that accepts L in O(time M (n)) steps Given Markov algorithm A S accepting L, there exists Turing machine M that accepts L in O([time A S (n)] 4 ) steps

25 Another Example  =  and single production 11  1 Computes unary constant-0 function C 0 1 (n) = 0 for all n So C 0 1 is Markov-computable

26 Another Example  2n  1 if n  1 f(n) =   0 if n = 0 computed by $1  11$ 111$ .1 11$ .1   $

27 Computing k-ary Functions if S applied to input 1 n 1 + 1  1 n 2 + 1  …  1 n k + 1 then S yields output word 1 f(n 1, n 2, …, n k ) + 1 if S applied to input 1 n 1 + 1  1 n 2 + 1  …  1 n k + 1 where function f is not defined for arguments n 1, n 2, …, n k, then either S never halts or output word not of form 1 m for m  1


Download ppt "Markov Algorithms An Alternative Model of Computation."

Similar presentations


Ads by Google