3
Princess Nora Bint Abdulrahman University CS314- Formal Languages and Automate theory Faculty of Computer and Information Sciences Second Semester 1434/1435H Department of the Computer Sciences Sheet #1 (Chapter 0 , 1 ) Name:……………………………………………………. Section:………………….. Q1: For S={1,2,3,4} find a relation that satisfies the condition. a. Reflexive and symmetric but not transitive. b. Reflexive and transitive but not symmetric. c. Symmetric and transitive but not reflexive. Example:( relation {having the same parity either odd or even} is reflexive and symmetric and transitive) Q2: for the following graph: a. What is the degree of node 5. b. Write the formal description for the graph. Q3: The formal description of DFA M is ({q1,q2,q3,q4,q5}, {u,d}, δ, q3, {q3}) where δ is given by the following table. Give the state diagram of this machine. Q4: Let x = 01101; y = 110 two strings over the set = {0, 1}. Best wishes

Web viewWhat is the degree of node 5. Write the formal description for the graph. Q3: The formal description of DFA M is ({q1,q2,q3,q4,q5}, {u,d}, δ

  • Upload
    hakhanh

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Web viewWhat is the degree of node 5. Write the formal description for the graph. Q3: The formal description of DFA M is ({q1,q2,q3,q4,q5}, {u,d}, δ

Princess Nora Bint Abdulrahman University CS314- Formal Languages and Automate theoryFaculty of Computer and Information Sciences Second Semester 1434/1435HDepartment of the Computer Sciences Sheet #1 (Chapter 0 , 1 )

Name:……………………………………………………. Section:…………………..

Q1: For S={1,2,3,4} find a relation that satisfies the condition.a. Reflexive and symmetric but not transitive.b. Reflexive and transitive but not symmetric.c. Symmetric and transitive but not reflexive. Example:( relation {having the same parity either odd or even} is reflexive and symmetric and transitive)

Q2: for the following graph:

a. What is the degree of node 5.b. Write the formal description for the graph.

Q3: The formal description of DFA M is ({q1,q2,q3,q4,q5}, {u,d}, δ , q3, {q3}) where δ is given by the following table. Give the state diagram of this machine.

Q4: Let x = 01101; y = 110 two strings over the set ∑= {0, 1}.

a. what is xy?

b. what is the length of the string x?

c. what is | ᵋ | ?

Best wishes

Page 2: Web viewWhat is the degree of node 5. Write the formal description for the graph. Q3: The formal description of DFA M is ({q1,q2,q3,q4,q5}, {u,d}, δ

Princess Nora Bint Abdulrahman University CS314- Formal Languages and Automate theoryFaculty of Computer and Information Sciences Second Semester 1434/1435HDepartment of the Computer Sciences Sheet #1 (Chapter 0 , 1 )

d. what is the reverse of y?

Q5. What is the state diagram for FA?

IF FA = (S, Ι, δ, s0, F) is a finite automaton with S= {s0, s1, s2}, I = {a, b, c, d, e, f}, F = {s0}, and with the following transition rules in δ:

fedcbaφφφφφS

1S0

φφS2S2

S1φS1

S0S0

φφφφS2

Q6. Convert the NFA to its equivalent DFA:

Q7. Convert the DFA to its equivalent Regular Expression.

Best wishes