INTRODUCTION Pertemuan 2 Matakuliah: M0734-Business Process Reenginering Tahun: 2010.
1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.
-
date post
20-Dec-2015 -
Category
Documents
-
view
224 -
download
3
Transcript of 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.
![Page 1: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/1.jpg)
1
Pertemuan 2Finite Automata
Matakuliah : T0162/Teori Bahasa dan Automata
Tahun : 2009
![Page 2: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/2.jpg)
2
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :• Menjelaskan Finite Automata• Menjelaskan dan memberikan contoh NFA
dan DFA
![Page 3: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/3.jpg)
Finite automaton
• As was metioned earlier, a finite automaton has a set of states, and its “control” moves from state to state in response to external “inputs”
• Deterministic meaning that automaton cannot be in more than one state at any one time, or nondeterministic that it may be in several states at once.
3
![Page 4: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/4.jpg)
examples
4
![Page 5: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/5.jpg)
example
Interaction between participants :
5
![Page 6: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/6.jpg)
The protocol
• The three participants must design their behaviors carefully.
• The back must behave responsibly, or it cannot be a bank
• It must make sure that two stores cannot both redeem the same money file, and it must not allow money to be
both canceled and redeemed.
Protocols of this type can be represented as finite automata. That is, the state “remembers” that certain important events havce happeded.
6
![Page 7: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/7.jpg)
example
7
![Page 8: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/8.jpg)
Explanation(c)
• First automaton(c) for the bank, the start state is state 1: it represents the situation where the bank has issued the money file in question but has not been requested either to redeem it or to cancel it.
• If a cancel request is sent to the bank by the customer, then the bank restores the money to the customer’s account and enters state 2.
• The latter state represents situtaion where the money has been cancelled.
8
![Page 9: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/9.jpg)
Explanation (a)
• The automaton representing the actions of the store. While the bank always does the right thing, the store’s system has some defects.
• Imagine that the shipping and financial operations are done by separate processes, so there is the opportunity for the ship action to be done either before, after, or during the redemption of the electronic money.
• That policy allows the store to get into a situation where it has already shipped the goods and then finds out the money was bogus.
9
![Page 10: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/10.jpg)
Explanation (b)
• This automaton has only one state, refrelcting the fact that the customer “can do anything”. The customer can perform the pay and cancel actions any number of times.
10
![Page 11: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/11.jpg)
Enabling automata to ignore actions
11
![Page 12: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/12.jpg)
solution
12
![Page 13: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/13.jpg)
DFA
• The term deterministic refers to the fact that on each input there is one and only one state to which the automaton can transition from its current state
13
![Page 14: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/14.jpg)
2 types of finite automata
14
![Page 15: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/15.jpg)
Example DFA
15
![Page 16: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/16.jpg)
example
16
![Page 17: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/17.jpg)
17
![Page 18: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/18.jpg)
example
18
![Page 19: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/19.jpg)
Transition tables
19
![Page 20: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/20.jpg)
NFA
• A nondeterministic finite automaton (NFA) has the power to be in several states at once.
20
![Page 21: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/21.jpg)
Example NFA
• Terdapat lebih dari satu transisi untuk input yang sama dari suatu state.
• Contoh :
21
q 0 q 3 q 4
q 1
q 2
Start
1
1
10
0 0 0
01
1
![Page 22: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/22.jpg)
Example NFA
22
![Page 23: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/23.jpg)
Example NFA
23
![Page 24: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/24.jpg)
answer
24
![Page 25: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/25.jpg)
example
25
![Page 26: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/26.jpg)
example
26
![Page 27: 1 Pertemuan 2 Finite Automata Matakuliah: T0162/Teori Bahasa dan Automata Tahun: 2009.](https://reader036.fdocuments.in/reader036/viewer/2022062421/56649d415503460f94a1c26a/html5/thumbnails/27.jpg)
27
Summary