16 views

Uploaded by Muhammad Waqas

ppt file

- Model checking model timed automata.pdf
- Atometa Book
- Finite_Automata.ppt
- Actuate Learning
- Verilog FAQ
- Automata Assignment
- JFlap2Tikz
- ijcset2015050506.pdf
- Cryptography
- Handout 16.docx
- Marcus Axioms 101011 Final
- CSE Assignment 3
- Qmus
- Genome Sequencing
- Microprocessor Lab Assignment.doc
- A Theory of Propositions - Nicholas J.J. Smith
- sortugpf
- CSC108_TT2AM_2012W
- STRSTR Function
- A 17 Concordance

You are on page 1of 22

Chapter 5

**Formal Language Definitions
**

• Why need formal definitions of language

– Define a precise, unambiguous and uniform interpretation

– Communication with machines

**• Formal Language notation/definition
**

– Regular Expression

• Tell how to generate words of that language

**• Tell which words belong to this language
**

• Can this be automated

Finite Automata • Language Recognizers • Machines embedded with grammatical rules that recognize a language • Automated language recognition • REs define a language and FAs accept (or reject ) them • FAs serve two purposes – Implicit language definition – Recognition .

Finite Automata • Visual notations (abstract machines) • Sort of graphs consisting of nodes called states and edges called transitions • States serve as memory locations that keep a track of last character read • Transitions define where to go on reading a particular character .

Finite Automaton • A finite automaton is a collection of three things – A finite set of states • Exactly one initial state (start state) • One or more (may be none) final states that mark the acceptance of a word • Intermediate states that are neither start not final states – An alphabet of possible input letters .

Finite Automaton – A finite set of transitions that tell for each state and for each letter of the input alphabet which state to go to next .

Finite Automaton • The start state marks the beginning of reading every input • Reading a character triggers a transition from that state which may transfer control to some other state and the reading mechanism advances to next character and the process continues • When the input terminates. if the control is left with a final or accepting state. the input string is accepted otherwise it is rejected and the FA resets control to the initial state for next input .

Finite Automaton • The state to go to next on reading a letter of the input string is determined automatically and deterministically by the transitions and is fixed (for that particular state and input character) • The transitions are fired automatically • A single character is consumed for each transition .

sign) and Final states (+ sign ) – Transitions • Directed edges labeled with the characters of .Finite Automaton • Visual representations – States represented by circles labeled to identify each distinctly 1 • Initial (.

Finite Automata • Example – Language of all words that end at b a b -1 b +2 a .

Characteristics of FA • Every FA must have exactly one start state • There may be multiple or may be no final states – In the latter case the FA doesn’t accept any language • Only a single character is read on a state at a time .

each labeled with a distinct letter from – No duplicate edges – No missing edges .Characteristics of FA • Every state define a transition for every character in the alphabet set or alternatively every state has exactly as many outgoing transitions as the number of characters in .

Characteristics of FAs • An FA is built for a particular language and recognizes only that language • It should accept all valid words of the language • It should reject all invalid words of the language .

Examples • All words that contain even number of letters • All words ending with ab • All words that start with a • All words of length >=3 • All words that don’t end at ba • All words that contain a triple letter either aaa or bbb .

q1.q0.Mathematical Representations of FA • FA = (Q.xj) = qk • Mathematical representation of FA for all words ending at b . .δ) – Q = {q0...F.q2.qn where n is finite} – = set of input alphabets – q0 is the start states – F Q is the set of final states F may be – δ is the transition function • δ (qi.

Transition Tables • Tabular representation of an FA – Table representing states and transitions a b -1 +2 b a -1 1 b 2 +2 a 1 2 .

Languages of FA • FAs define Regular Language • Any language that can be define by a regular expression can be recognized by an FA .

Language of FA • What language does the following FA define a 2 a a. b -1 b a +4 b 3 b .

Language of FA a a -+1 b 2 b b 3 a a b -+1 2 b a .

Examples • All words that start with a double letter • All words that start and end with a double letter • All words that do not start with a double letter • All words in which is the second letter is b .

FA • EVEN-EVEN – Language of all words having even number of as and even number of bs b -+1 b a 2 a b 3 b a a 4 .

Applications of FA • Lexical Analyzer of Compiler • Search mechanism in word processor all except c c a 2 all except c and a c 3 any letter c 1- t 4+ all except c and t .

- Model checking model timed automata.pdfUploaded bynewfut
- Atometa BookUploaded bySiraj Ud-Doulla
- Finite_Automata.pptUploaded byAsif Equbal
- Actuate LearningUploaded byLakshmi Shenoy
- Verilog FAQUploaded bytrinaths
- Automata AssignmentUploaded bySudipta Karmakar
- JFlap2TikzUploaded byJohn William Vásquez Capacho
- ijcset2015050506.pdfUploaded bySrikanth Kalamkuri
- CryptographyUploaded bykpsamy1983
- Handout 16.docxUploaded bymano
- Marcus Axioms 101011 FinalUploaded bymaria_elena910
- CSE Assignment 3Uploaded bynetsa_mar
- QmusUploaded byMario Cacasenno
- Genome SequencingUploaded byAnonymous fsnfnB1fk
- Microprocessor Lab Assignment.docUploaded byTarushree Sabarwal
- A Theory of Propositions - Nicholas J.J. SmithUploaded byMoncif Daoudi
- sortugpfUploaded byapi-3853979
- CSC108_TT2AM_2012WUploaded byexamkiller
- STRSTR FunctionUploaded byCarolT
- A 17 ConcordanceUploaded bydeesullivan
- 2.2 ABAP Basics Data Handling 2Uploaded byeswarscribd

- SMUploaded byRadhika Murarka
- Emf KrohneUploaded byMaria Fernanda FS
- kuesioner referensiUploaded bysaiful
- An Integrative approach to psychotherapy with special emphasis on homeopathic model.Uploaded byHomoeopathic Pulse
- Paul Tillich - The Courage to Be Notes Part 3Uploaded byjb1234567895
- 211 FA05 HE 1A -QuestionsUploaded byGeorge Kong
- Council Tree at OpenspaceUploaded byjeronimo m.m.
- Ch 1 NOTES ChemerinskyUploaded byNana Mireku-Boateng
- 12278Uploaded byAnh Nguyen
- Spinoza EthicsUploaded byDrySun
- Healing MantrasUploaded byRam Madhav
- Unit DUploaded byJacob Dziubek
- STUDYING THE SEFER HA ZOHAR AND WHY IT IS SO IMPORTANT NOWUploaded byELEAZAR SHLOMO ben YA'AKOV GOLDMAN
- hooley4e_ch04Uploaded byArpit Varshney
- Theory of Knowledge Prescribed TitlesUploaded bynepaliain
- PMS ResearchUploaded byCecilia Pasana
- United States v. Leon Dukagjini, Halit Shehu, Leonard George Miller, Jr., Keith John Miller, Warren Eugene Meeks, Jr., Leroy Thompson, Iii, Alvin Dwayne McDew Michael Dexter, Sondra Jean Boone, Anthony Eugene McMillian Raymond Fuller, Sonya Campbell, Rene Miller, James Robert Wilson and Roderick L. Smith, Samuel Curtis Griffin, Also Known as Black Bart, Also Known as Blackie, and Alvin Leon McGee Also Known as Al, 326 F.3d 45, 2d Cir. (2003)Uploaded byScribd Government Docs
- Clean CodeUploaded bydata8
- Smith McmillanUploaded byDani Gon Faber
- driving miss daisy analysis paper nurs 314Uploaded byapi-219278575
- vanderkarr adv bio lesson plan 4Uploaded byapi-318157741
- [VigChr Supp 101] Ashwin-Siejkowski - Clement of Alexandria on Trial.pdfUploaded byNovi Testamenti Filius
- district writing test rubric for teacher scoring - infoUploaded byapi-305759524
- Show cause - Susan Wafula.pdfUploaded bypaul macharia
- The Hidden Power of the HeartUploaded byMiguel Alexandre Santos
- CCEtraining Final Cbse Ppt1Uploaded byjagatapsv
- Leibniz' Theory of Matter - J.A. IrvingUploaded byAusten Haynes
- Civil CasesUploaded byRiza Perdido
- Technology Adoption and DiffusionUploaded byNishant Sood
- Brahmacharya QuotesUploaded byबी० के० शर्मा