• Tidak ada hasil yang ditemukan

Computation Theory Course, 6803415-3 Homework One

N/A
N/A
Protected

Academic year: 2024

Membagikan "Computation Theory Course, 6803415-3 Homework One"

Copied!
2
0
0

Teks penuh

(1)

1 Kingdom of Saudi Arabia

Ministry of Education Umm AlQura University

Adam University College, female branch Computer Science Department

ةيدوعسلا ةيبرعلا ةكلمملا ميلعتلا ةرازو ةعماج ىرقلا مأ تابلاطلا رطش ،مضأب ةيعماجلا ةيلكلا

يللآا بساحلا مولع مسق

First Semester of 2017-2018 Academic Year

Computation Theory Course, 6803415-3 Homework One

Solutions

Question One: 1 Mark

The following are the state diagrams of two DFAs, 𝑴𝟏 and 𝑴𝟐:

Answer the following questions about each of these machines.

a. What is the start state?

b. What is the set of accept states?

c. What sequence of states does the machine go through on input 𝑎𝑎𝑏𝑏?

d. Does the machine accept the string 𝑎𝑎𝑏𝑏?

e. Does the machine accept the string 𝜀?

The Answer of Qeustion One:

a.

M1 M2

q1 q1

b.

M1 M2

{q2} {q1, q4}

c.

M1 M2

q1, q2, q3, q1, q1 q1, q1, q1, q2, q4

d.

M1 M2

No, because the input has beed consumed and we ended up in a none final state.

Yes, because the input has been consumed and we ended up in a final state.

e.

M1 M2

No, it does not. Yes, it does because the start state is an accept state.

(2)

2 Question Two: 1 Mark

Give the formal description of the machines 𝑴𝟏 and 𝑴𝟐 pictured in Question One.

The Answer of Qeustion Two:

M1 M2

({q1, q2, q3}, {a, b}, 𝛿, q1, {q2}) 𝛿:

a B

q1 q2 q1

q2 q3 q3

q3 q2 q1

({q1, q2, q3, q4}, {a, b}, 𝛿, q1, {q1, q4}) 𝛿:

a B

q1 q1 q2

q2 q3 q4

q3 q2 q1

q4 q3 q4

Question Three: 1 Mark

The formal description of a DFA 𝑴 is ({𝒒𝒍, 𝒒𝟐, 𝒒𝟑, 𝒒𝟒, 𝒒𝟓}, {𝒖, 𝒅}, 𝜹, 𝒒𝟑, {𝒒𝟑}), where 𝜹 is given by the following table:

Give the state diagram of this machine.

The Answer of Qeustion Three:

Good Luck my Great Students 😉 T.Mariah Sami Ahmed Khayat

Teacher Assistant @ Adam University College [email protected]

u d d

u u u u

d d d

q1 q2 q3 q4 q5

Referensi

Dokumen terkait

Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Computing and Informatics ةيدوعسلا ةيبرعلا ةكلمملا ميلعتلا ةرازو ةينورتكللاا ةيدوعسلا

Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University ةكلمملا ةيبرعلا ةيدوعسلا ةرازو ميلعتلا ةينورتكللاا ةيدوعسلا ةعماجلا College of Computing and

Kingdom of Saudi Arabia Ministry of Higher Education Saudi Electronic University ةكلمملا ةيبرعلا ةيدوعسلا ةرازو يلاعلا ميلعتلا ةينورتكللاا ةيدوعسلا ةعماجلا College of Health

Kingdom of Saudi Arabia ةيدوعسلا ةيبرعلا ةكلمملا Ministry of Education ميلعتلا ةرازو Saudi Electronic University ةينورتكللاا ةيدوعسلا ةعماجلا First Session Second Session Third

Kingdom of Saudi Arabia ةيدوعسلا ةيبرعلا ةكلمملا Ministry of Education ميلعتلا ةرازو Saudi Electronic University ةينورتكللاا ةيدوعسلا ةعماجلا First Session Second Session Third

Kingdom of Saudi Arabia ةيدوعسلا ةيبرعلا ةكلمملا Ministry of Education ميلعتلا ةرازو Saudi Electronic University ةينورتكللاا ةيدوعسلا ةعماجلا First Session Second Session Third

Kingdom of Saudi Arabia ةيدوعسلا ةيبرعلا ةكلمملا Ministry of Education ميلعتلا ةرازو Saudi Electronic University ةينورتكللاا ةيدوعسلا ةعماجلا First Session Second Session Third

: ةيدوعسلا ةيبرعلا ةكلمملا ميلعتلا ةرازو ةعماج نارجن بيردتلاو ثاعتبلاا ةرادإ KINGDOM OF SAUDI ARABIA Ministry of Education Najran University MISSIONS & TRAINING