computer has a single unbounded precision counter


Computer has a single unbounded precision counter which you can only increment, decrement and test for zero. (You may assume that it is initially zero or you may include an explicit instruction to clear.) Limit your program to a single unsigned integer variable, and limit your methods of accessing it to something like inc(i), dec(i) and a predicate zero?(i) which returns true i? i = 0. This integer has unbounded precision-it can range over the entire set of natural numbers-so you never have to worry about your counter over?owing. It is, however, restricted to only the natural numbers-it cannot go negative, so you cannot decrement past zero.

(a) Sketch an algorithm to recognize the language: {aibi| i ≥ 0}. This is the set of strings consisting of zero or more ‘a's followed by exactly the same number of ‘b's.

(b) Can you do this within the ?rst model of computation? Either sketch an algorithm to do it, or make an informal argument thatit can't be  done.

(c) Give an informal argument that one can't recognize the language: {aibici| i ≥ 0} within this second model of computation (i.e, with
a single counter)

Request for Solution File

Ask an Expert for Answer!!
Theory of Computation: computer has a single unbounded precision counter
Reference No:- TGS0217858

Expected delivery within 24 Hours