1 / 27

Pertemuan 2 Finite Automata

Pertemuan 2 Finite Automata. Matakuliah : T0162/Teori Bahasa dan Automata Tahun : 2009. Learning Outcomes. Pada akhir pertemuan ini , diharapkan mahasiswa akan mampu : Menjelaskan Finite Automata Menjelaskan dan memberikan contoh NFA dan DFA. Finite automaton.

yamka
Download Presentation

Pertemuan 2 Finite Automata

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pertemuan 2Finite Automata Matakuliah : T0162/Teori Bahasa dan Automata Tahun : 2009

  2. Learning Outcomes Padaakhirpertemuanini, diharapkanmahasiswa akanmampu : • Menjelaskan Finite Automata • Menjelaskan dan memberikan contoh NFA dan DFA

  3. 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.

  4. examples

  5. example Interaction between participants :

  6. 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.

  7. example

  8. 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.

  9. 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.

  10. 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.

  11. Enabling automata to ignore actions

  12. solution

  13. 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

  14. 2 types of finite automata

  15. Example DFA

  16. example

  17. example

  18. Transition tables

  19. NFA • A nondeterministic finite automaton (NFA) has the power to be in several states at once.

  20. Example NFA • Terdapatlebihdarisatutransisiuntuk input yang samadarisuatu state. • Contoh :

  21. Example NFA

  22. Example NFA

  23. answer

  24. example

  25. example

  26. Summary

More Related