1 / 34

Pertemuan 1 Teori Bahasa dan Automata

Pertemuan 1 Teori Bahasa dan Automata. Matakuliah : T0162/Teori Bahasa dan Automata Tahun : 20 11. Profile. Bpk. Widodo Budiharto D2637 widodo@widodo.com HP :081410043883 Books : Hopcroft dkk, Introduction to Automata Theory, Languages and Computation, Addison –Wesley, 2001 2 Quiz

Télécharger la présentation

Pertemuan 1 Teori Bahasa dan 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 1Teori Bahasa dan Automata Matakuliah : T0162/Teori Bahasa dan Automata Tahun : 2011

  2. Profile • Bpk. Widodo Budiharto D2637 widodo@widodo.com HP :081410043883 Books : Hopcroft dkk, Introduction to Automata Theory, Languages and Computation, Addison –Wesley, 2001 2 Quiz 3 Tugas Mandiri (kelompok) 1 Tugas Akhir (paper/demo program kelompok di pertemuan 13)

  3. Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : • Mengenal arti penting dari konsep bahasa dan Automata • Automata dan kompleksitas • Regular Expression

  4. Why Study Automata Theory? Automata theory is the study of abstract computing devices or “machines” Automata dapat digunakan sebagai model untuk: • Lexical analyser pada compiler • Pencarian kata kunci dalam satu file atau pada halaman web • Software untuk pemeriksaan finite state system, seperti communication protocol • Software untuk mendesain digital circuits.

  5. Contoh finite automaton

  6. A finite automaton

  7. StructuralRepresentations • Adalah cara alternatif untuk spesifikasi mesin automata. • Grammars : Himpunan aturan produksi Contoh : E  E+E | E-E | E*E | E/E adalah aturan untuk ekspresi aritmetika • Regular Expression : menyatakan bentuk struktur data. Contoh : ‘[A-Z][a-z]*’ Kata sesuai : ‘Jakarta’ Kata tidak sesuai : ‘JAKARTA’

  8. Automata and Complexity

  9. STRING, ALPHABET dan LANGUAGE • String :Rangkaian Symbol Contoh : aa, bb, dst. • Symbol : Huruf : a, ..., z, A, ..., Z Digit : 0 ... 9 Khusus : $, , =, (, dst • Panjang String : |w| Jumlah simbol dalam string : w = abc |w| = 3

  10. STRING, ALPHABET dan LANGUAGE • String Kosong : () Tidak berisi simbol    = 0 • Prefix : Bagian depan string w = abb Prefix (w) =  , a, ab, abb • Suffix : Bagian belakang string w = abb Suffix (w) =  , b, bb, abb

  11. STRING, ALPHABET dan LANGUAGE • Infix : Bagian tengah string w = abb Infix (w) =  , b, a, bb, ab, abb • Proper Prefix / Suffix : Prefix / Suffix kecuali w sendiri • Konkatenasi : Rangkaian dua string “hari”,”ini” “hariini”  w = w  = w

  12. STRING, ALPHABET dan LANGUAGE • Alphabet () : himpunan (set) simbol 1 = { a, b, …, z } 2 = { 0, 1 } • Language (L) : himpunan string dari suatu alphabet

  13. Alphabet

  14. STRING, ALPHABET dan LANGUAGE  Ø : Empty set {} : language yang terdiri dari  (empty) string Jenis Language : Finite: L1 = { a, ab, abb } Infinite: L2 = {1,2,…}

  15. Strings

  16. STRING, ALPHABET dan LANGUAGE • Konkatenasi Language : L, M : language L. M : konkatenasi L dan M LM = { xy| x  L, y  M } Contoh : L = { 0, 1, 00, 01, 10 } M = { 10, 11 } LM = { 010, 011, 110, 11, 0010, 0011, 0110, 0111, 1010, 1011 }

  17. STRING, ALPHABET dan LANGUAGE • Union Language : L  M : Union L dan M L  M : { x  x  L atau x  M} Contoh : L M = { 0, 1, 00, 01, 10, 11 }

  18. CLOSURE LANGUAGE : Nol kali atau lebih ( Kleene Closure) + : Satu kali atau lebih ( Positive Closure) Misal L : Suatu language L* = L0 L1 L2 … = Li L+ = L1 L2 … = Li

  19. Dedective proof • Deduksi berarti penarikan kesimpulan dari keadaan yang umum atau penemuan yang khusus dari yang umum. • Metode deduksi akan membuktikan suatu kebenaran baru berasal dari kebenaran-kebenaran yang sudah ada dan diketahui sebelumnya (berkesinambungan ).

  20. Deductive proof • A deductive proof consists of a sequence of statements whose truth leads us from some initial statement, called the hypothesis or the given statement(s), to a conclusion statement

  21. Deductive proof

  22. Regular Expression RE = Ekspresisederhanauntuk language yang diterima FA. Misalkansuatu alphabet, RE didefinisikansecara recursive sebagaiberikut : •  : RE yang menunjukkan “Empty Set”. •  : RE yang menunjukkan { }

  23. Untuksetiap a  , a : RE yang menunjukkan {a} • Jika r dan s adalah RE untuk language R dan S, maka : r + s : RE untuk R  S r  s : RE untuk RS r* : RE untuk R*

  24. Contoh Contoh : • 00 : RE untuk {00} • (0 + 1)* : RE untukhimpunan string yang terdiridari 0 dan 1 3. (0 + 1)*00(0 + 1)* : meliputi : 00, 10010, 010011, … 4. (1 + 10)* : meliputi : , 1, 11, 110, 111, …

  25. 5. (01)*011 : meliputi : 011, 0011, 1011, 10011, … 6. (aaabbabb)* : meliputi : , aa, ba, aabb,… 7. (ab)(ab)(ab)(ab)* : meliputi : aaa, abba,…

  26. Sifat –Sifat RE Misal : r, s dan t adalah RE. • r + s = s + r • (r+s) + t = r + (s+t) • (rs) t = r (st) • rs + rt = r (s+t) • +r = r+  = r •  r = r  =  •  r = r  = r

  27. 8. r + r = r 9. (r*)* = r* • * =  • * =  • r? =  + r (definisidari operator ?) • (r*s*)* = (r+s)*

  28. Summary

  29. Pengenalan Java • Unduh editor Netbeans dan Java Standard edition di : http://www.oracle.com/technetwork/java/javase/downloads/index.html

  30. Program java class CobaJava { public static void main(String args[]) { int nilai =85; System.out.println (“Belajar Java”); System.out.print (“Nilai :” + nilai); } } Kompilasi: javac CobaJava.java Eksekusi : java CobaJava

  31. TM 1(Kelompok) dikirim di pertemuan ke 3) Berikan definisi dan Jelaskan mengenai: • Machine turing • Teori Automata • Deductive proof • Inductive proof • Alphabet, strings, languages • Contoh DFA dan NFA

More Related