Você está na página 1de 15

INDIVIDUAL ASSIGNMENT

TECHNOLOGY PARK MALAYSIA

CT111-3-2-COMT

NAME: LEONG WENG FON

TP NO.: TP038881

LECTURER NAME: DR. VAZEERUDEEN ABDUL HAMEED

DATE ASSIGNED: 2/10/2017

DATE SUBMIT: 11/12/2017

WORD: 1404 WORDS


Table of Contents
Introduction .................................................................................................................................................. 3
Part A............................................................................................................................................................. 4
Part B............................................................................................................................................................. 8
Conclusion ................................................................................................................................................... 14
References .................................................................................................................................................. 15
Introduction

Computation is a general term for any type of information processing that can be represented as
an algorithm precisely. For example, adding two numbers in our brain, on a piece of paper or
using a calculator and converting a decimal number to its binary presentation or vice versa.

The computer theory is a scientific discipline concerned with the study of general properties of
computation be it natural, man-made, or imaginary. Most importantly, it aims to understand the
nature of efficient computation. A few examples that are related to the research interests. One
key question is which functions can be efficiently computed? For example, it is easy to multiply
integers, but it seems hard to take the product and factor it into its prime components. In general,
it seems that there are one-way computations, or put differently one-way functions: Such
functions are easy to evaluate but hard to invert. Do one-way functions exist? We don’t know,
though we believe they do exist, and can relate this belief to other important questions. (wisdom,
2017)
Part A

1 1
q0 q4 q7 1

0
0

1 1
q1 q5 q8 1

0
0

q2 q6 0

q9 1
q3
9
State Transition Table

0 1
q0 q1 q4, q5
q1 q2 q5
q2 q3 q6
q3 q3 q3
q4 q5 q7
q5 q6 q8, q9
q6 q3 q9
q7 q8 q7
q8 q9 q8
q9 q3 q9

Data Accepted by Automata:


101101
The String 101101 is the string that can accept only 2 zeros and 4 ones. First, q0 is the initial
stage for the String 101101. q0 as the initial stage, it will pass String “1” to q4. q4 will pass
String “0” to q5 and q5 will pass String “1” to q8. q8 with String “1” and it will stay back in q8.
q8 will pass String “0” to final stage q9 and q9 will loop with the String “1”. The String 101101
is accepted.

0111

The String 0111 is the string that can accept only 1 zero and 3 ones. First, q0 is the initial stage
for the String 0111. q0 as the initial stage, it will pass the String “0” to q1 and q1 will pass the
String “1” to q5. q5 is the String “1” and the machine switches the String “1” pass to q8. q8 and
pass the 0 to q9 which the final stage and it keep looping the String “1”.

11

The String 11 is the string that can accept only 2 ones. First, q0 is the initial stage for the String
0111. q0 as the initial stage, the machine switches the String “1” to q5. The q5 is the second
stage and the machine switch the String “1” to q9. The q9 is the final stage and the q9 keep
looping the String “1”.
Date Rejected by Automata:
1011010
The String 1011010 is the string that cannot accept 4 ones and 3 zeros. First, q0 is the initial
stage for the String 1011010. q0 as the initial stage, it will pass the String “1” to q5 as the second
stage. The q5 will switches the String”0” to q6. The q6 it will pass the String “1” to the final
stage which the q9 and it keep looping the String “1” in the q9.

01

The String 01 is the string that cannot accept 1 zero and 1 one. First, q0 is the initial stage for the
String 1011010. q0 as the initial stage, the machine switches the String “0” and it will pass to q1
as the second stage. The q1 will switches the String “1” and it pass the String “1” to q5. q5 will
switches the String “1” to q8. The q8 will keep looping the String “1” and it switches the String
“0” to the final stage which is q9. The q9 keep looping the String “1”. The String 01 cannot have
accepted because it keeps going on the and it not stop at q5.

0010

The String 0010 is the string that cannot accept one 1 and 3 zeros. First, q0 is the initial stage for
the String 0010. q0 as the initial stage, the machine switches the String “0” and it pass to q1 as
the second stage. The q1 will switches the String “0” and it pass to q2 as the third stage. The q2
will switches the String “0” and it pass the String “0” to q3. q3 will keeping looping the String
“0” or String “1”. So, The String 0010 is not accepted because it keeps going the String “0” in
three time.
Accepted Rejected
101101 *
0111 *
11 *
1011010 *
01 *
0010 *
Part B
0,1 q3

q0 q1 q4

q2 0,1

0,1

The q0 as the initial stage of the figure above. If q0 loop stop to the String “1” and it will switch
to the q1 when the String “0” in the second stage. q1 will move to q3 or q2. q3 will be moved by
the String “0” or String “1” and q2 is the final stage when the String “0”, q2 is keep looping
when the String “1” or String “0”. At q3, the q3 will moved forward when q3 get the String “0”
or String “1” to q4. When q4 get the String “0” or String “1”. It will not have accepted, and it
will return to q1 and run again.
(0+1) q3

q4
q0 q1

q2 (0+1)

(0+1)

As the q0 is the initial stage, if the String (0+1), it will stay back to q0. If the String is “0”, it will
move to q1. q1 will move to either q3 or q2 when the String “(0+1)” will move to q3 and the
String “0” will move to q2 which is the final stage. q2 will keep looping when the String
“(0+1)”. q3 is move to q4 when the String is “(0+1)”. The q4 will not accepted and it will stay
back to q1 and run again.
(0+1) (0+1)

(0+1)

q0 q1 q2 (0+1) q4

(0+1)

As q0 is the initial stage, the q0 will be stay back when the String “(0+1)”. q0 receive the 0 and it
will move to q1. Q1 will move to either to q4 or q2 which is the final stage. q2 will keep looping
the String “(0+1)”. When q1 is move q4 when the String is (0+1) (0+1). The q4 will move back
to q1 because it not accepted and run again.
(0+1) (0+1) (0+1)

(0+1)

q0 q1 q2 (0+1)

As the q0 is the initial stage, the q0 will be stay back when the String “(0+1)”. When the String
“0” and it will q1 from q0. The q1 will move to q2 and stay back to q1 and run again. The q2
will keep looping when the String “(0+1)”. Q1 will stay back when the String is” (0+1) (0+1)
(0+1).
(0+1) (0+1)(0+1)(0+1)

0 0
q1 q2 (0+1)
q0

As the q0 is the initial stage, the q0 will be stay back when the String “(0+1)”. When the String
“0”, it will move to q1 and when the String “(0+1) (0+1) (0+1)” it will stay back. When the
String “0”, q1 will move to q2 which the final stage and it will keep lopping when the String
“(0+1).
(0+1)

0 ((0+1)(0+1)(0+1))* 0
q2 (0+1)
q0

As the q0 is the initial stage, the q0 will be stay back when the String “(0+1)”. When the String
“0 ((0+1) (0+1) (0+1)) * 0” it will move to final stage q2 and it keep looping when the String
“(0+1)”.

(0+1)*0((0+1)(0+1)(0++1))*0(0+1)*
q0 q2

So, the definitive answer is the String (0+1) *0((0+1) (0+1) (0++1)) *0(0+1) * to the final stage of q2.
Conclusion

In the nutshell, I have completed the assignment on time. It is difficult for me to do the
assignment when I do the assignment. I get help from my friend and lecturer to solving my
problem when I do the assignment. In the assignment, I have learned many things about the
computer theory, but it is hard for me to understand those things. I will improve myself to
learned knowledge from the computer theory.
References
wisdom, 2017. [Online]
Available at: http://www.wisdom.weizmann.ac.il/~oded/toc-bi.html
[Accessed 11 12 2017].

Você também pode gostar