Sunteți pe pagina 1din 5

Assignment No: 2

MS080400040

CS701

Question No: 1
:Formal Description
We are going to design a Turing Machine M that decides the language L =
{0n1n: n1}. This language consist of the strings starting with 0 and
.having equal number of 0's and 1's
Some valid strings that are in this language are: { 01,0011,000111, }
Some strings that are not in the language are: {001, 0001111, 00000,
.}
Now we have understood our language for which we have to desing the
.Turing machine. We will define 7 members of the machine
M = {Q , , , qa ,qr , q0, }
:Now we will define each member of the machine one by one
1234567-

Q = Set of States = { q0, q q qr1, qr2, qa}


= Language Alphabet = { 0,1 }
= Work Alphabet = { 0,1, }
Accept State = qa
Reject States = qr1 and qr2
Start State = q0
Transition Table = Transition functions are shown in this table

Current
State

q0
q0
q1
q1
q1
q2
q2
q2
q2

1,

Tape 1

Tape 2

Repla
ce
With
0

1
1
1

1
1
1

Symb
ol

2,

Symb
Move
ol
R

S
R
S
S
S

Repla
ce
With
0

Move
R
R
R
S
L
L
S
S
S

Next
State

q1
qr2
q1
qr1
q2
q2
qr2
qr1
qa

State Diagram shows the functionality of the machine M:

Example: on the sample string "0011" the working of


machine can be shown in this figure

Implementation Level Description:


Turing machine M has to accept the strings starting with 0 and
containing equal number of 0s and 1s. Our machine will follow
these steps to identify the input string belongs to the language L or
not.
i- Turing machine M is a 2-tape Turing machine
ii- Input string is on tape-1 and second contains blanks
iii- In the first step machine will identify 0 on first tape and will
replace the value on the first cell of second tape to 0
iv- For all of the 0s blanks on the second tape will be replaced
with 0s.
v- When the head of the first tape reaches a 1 it will move right
without changing the value of first tape and the second tape
will move left
vi- For all 1s head of the first tape will keep moving to right
without changing the value and head of the second tape will
keep moving left.
viiAfter all 1s are finished all 0s must also be finished
and both heads will reach blanks.

viiiIf both heads reach blank M will Accept otherwise


Reject.

High Level description:


The Language L accepts the strings with these two qualities
iii-

Strings should start with 0


Number of 0s and 1s must be equal

Lets suppose language L contains the strings 0a1b where a = b.


After making sure string starts with 0 number of 0s a and 1s b
will be calculated and compared. If both are same the string will be
in the language.

Question No: 2

1) How can you examine the generic algorithm for Turing


machines as discussed in the paper?

Answer: Hamkins and Miasnikov proved in their thesis that


Halting Problem is decidable on generic inputs. So Halting Problem
is generically solvable. They showed that Halting problem can be
solved for the machines that have one-way infinite tape. A
machines whose head starts from the empty tape before repeating
a state is called generic. They showed that generic machines are a
subset of all Turing machines that is solvable by a universal Turing
machine. The idea was to decide most of the input machines and
ignoring the hard ones. According to them a great probability is
there to solve the Halting Problem using generic algorithm. But it
was proved by Alexander Rybalov that generic algorithm is not
good enough to solve the strongly generic problems. So Halting
Problem is not decidable using Generic Algorithm.

2) How can you describe the undecidability of the Halting


Problem with one-way and two-way tape Turing
Machines?

Answer: In the paper it is shown that the generic subset is a


subset that is solvable and a set is strongly generic if it can solve
most of the problems. It is show that the problems that can be
solved using the generic algorithm are not enough to say that the
subset is strongly generic. As normalized turing machines are very
hard to decide using generic algorithm. And every turing machine
can be converted to a similar Normalized Turing machine that is
performing the same task. So we say the Turing machines that are
decidable using generic algorithm are not enough. So Halting
Problem still remains undecidable.

S-ar putea să vă placă și