computer science department 1 - wordpress.com · and automata theory ta. hanouf aljlayl chapter 3 -...
TRANSCRIPT
CS314: FORMAL LANGUAGES
AND AUTOMATA THEORYTA. HANOUF ALJLAYL
Chapter 3 - Tutorial
1Computer Science Department
Exercise 3.1
2
This exercise concerns TM 𝑀2 whose description and state diagram
appear in Example 3.7. In each of the parts, give the sequence of
configurations that M2 enters when started on the indicated input
string.
Computer Science Department
Example 3.7 - State diagram
3
Computer Science Department
Solution 3.1
4
Computer Science Department
Solution 3.1
5
Computer Science Department
Solution 3.1
6
Computer Science Department
Solution 3.1
7
Computer Science Department
Exercise 3.2
8
This exercise concerns TM M1 whose description and state diagram
appear in Example 3.9. In each of the parts, give the sequence of
configurations that Al1 enters when started on the indicated input
string.
Computer Science Department
Example 3.9 - State diagram
9
Computer Science Department
Solution 3.2
10
Computer Science Department
Solution 3.2
11
Computer Science Department
Solution 3.2
12
Computer Science Department
Solution 3.2
13
Computer Science Department
Solution 3.2
14
Computer Science Department
Solution 3.2 – e. Cont’d
15
Computer Science Department
Chapter 4 - Tutorial
Computer Science Department
Exercise 4.1
17
Answer all parts for the following DFA M and give reasons for your
answers.
Computer Science Department
Solution 4.1
18
Yes, because M(0100) accepted.
No, because M(011) rejected.
Computer Science Department
Solution 4.1
19
No, because <M> is not correct Turing machine and a string
No, because <M, 0100> is not correct regular expression and a
string
Computer Science Department
Solution 4.1
20
No, because there is a string M(0100) that accepts ( L(M) is not empty)
Yes, 𝐸𝑄𝐷𝐹𝐴 contains < 𝑀1, 𝑀2 > such that 𝑀1 and 𝑀2 are Turing machines which
they generate the same language. So, 𝐿(𝑀1) = L(𝑀2). In this case 𝑀1= 𝑀2=𝑀
Computer Science Department