Formal Languages, Automata and Models of Computation

Slides:



Advertisements
Liknande presentationer
1.Numerical differentiation and quadrature Discrete differentiation and integration Ordinary.
Advertisements

1 CD5560 FABER Formal Languages, Automata and Models of Computation Exercise 2 Mälardalen University 2007.
Presens och imperfekt av have. Translate! Jag har huvudvärk. Hon har en röd Volvo. De har två barn tillsammans.
För att uppdatera sidfotstexten, gå till menyfliken: Infoga | Sidhuvud och sidfot Fondbolagsträff 2015.
Exempelbaserade specifikationer med SpecFlow
Hjälper huvudverbet att ange tid eller modalitet
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 0 - Intro Mälardalen University 2005.
Mathematics 1 /Matematik 1 Lesson 7 – complex numbers Lektion 7 – Komplexa tal.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2006.
Chapter Week Week 36 – Hello again. Survey Step 1: Write your name and the 1 of September on top of your survey sheet. CHAPTER WEEK Name:_ Emma __ Date:
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 1 Mälardalen University 2005.
ABB och Caterpillar 1 Marcus Larsson marla419. Problem CAT-ABB sour relationship: CAT felt ABB Turbo Systems held them hostage. In CAT:s view ABB dictated.
 Who frågar efter en persons (eller personers) identitet (vem dem är).  Who is he?  Who are they?  Who is coming?
To practise speaking English for 3-4 minutes Genom undervisningen i ämnet engelska ska eleverna ges förutsättningar att utveckla sin förmåga att: formulera.
Formal Languages, Automata and Models of Computation
© Gunnar Wettergren1 IV1021 Project models Gunnar Wettergren
“Be” (vara) i presens 1. I 2. You 3. He, she, it 1. We 2. You 3. They.
1-1 Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-1 Programmering 7.5 hp Programmering är... creativ, fascinerande, roligt,
Shannon dekomposition
Tekniskt gymnasium i världsklass. By clicking the “add picture” icon your picture will be inserted into and cropped to the right properties in the placeholder.
CHI-TSONG CHEN KAPITEL 2- Systems Kortfattade läsanvisningar Läs hela kapitlet utom 2.9 och 2.10.
INLÄGG FÖR SOCIALA MEDIER SHAREWEAR. 1.INSTAGRAM 2.FACEBOOK 3.TWITTER INNEHÅLL.
Don´t just try! Do! Emma Nääs
How To Use PowerPoint A Brief Introduction to Commonly Used Features By Ryan McKenzie.
Sång, Do re mi Love is all around, Ackord D Em G A Gitarr öva i grupper Instrument, instrumentgrupper lyssna Instrumentbingo Välkomna till musiken.
Skolkör år 4-9 Skolkören övar inför avlsutningen.
Rekommendationer & Tips
THINGS TO CONSIDER WHILE PLANNING A PARTY Planning an event can take an immense amount of time and planning. Even then, the biggest problem that arises.
STEPS TO FOLLOW FOR BECOMING A SHIP CAPTAIN A career as a ship captain can be a tedious task. Ship captains take care of business, navigation and operation.
Swedish for international students Kie FM Sandra Uitto Swedish teacher Language Center, Aalto University U-wing, II floor.
Advice from Bronx Best Real Estate Attorney. Jagiani Law office of New York has been successfully working as divorce attorney & Real estate attorney for.
Digitization and Management Consulting
Why you should consider hiring a real estate attorney!
Law abiding grounds of filing a divorce Jagianilaw.com.
Types of Business Consulting Services Cornerstoneorg.com.
Mathematics 1 /Matematik 1
Bringapillow.com. Online Dating- A great way to find your love! The words ‘Love’ and ‘Relationship’ are close to every heart. Indeed, they are beautiful!
Work of a Family law attorney Jagianilaw.com. A Family Law Attorney basically covers a wide range spectrum of issues that a family may face with difficulty.
The Online Way to Engagement and Wedding Jewelry! Pearlleady.com.
Course info.
Meeting singles had never been so easy before. The growing dating sites for singles have given a totally new approach to getting into relationships. ‘Singles.
Hoppas det här går hem ! Bildspelet vecka 3 5 BE ® BrucElvis
We are the world There comes a time When we head a certain call When the world must come together as one There are people dying And it's time to lend.
Strategic Sustainable Development
My role model.
Role of Divorce, Family Law and Commercial Attorneys.
Svarsfrekvensen i undersökningar från webbpaneler. Några resultat
Pearlleady.com Attractive Graduation and Wedding Gifts Online.
How to Buy Engagement Rings for Women Online?. Buying engagement rings for women or tiffany celebration rings from the online market could be a bit challenging.
Amazing Wedding/Bridal Jewellery & Gifts Available Online Pearlleady.com.
You Must Take Marriage Advice to Stop Divorce! Dontgetdivorced.com.
Practice and challenges in involving fathers
Vattenfalls Idrotts- & Fritidsförbund
Season 2018.
Publish your presentations online we present SLIDEPLAYER.SI.
Publish your presentations online we present SLIDEPLAYER.RS.
Publish your presentations online we present SLIDEPLAYER.IN.
Publish your presentations online we present SLIDEPLAYER.VN.
Publish your presentations online we present SLIDEPLAYER.RO.
Publish your presentations online we present SLIDEPLAYER.EE.
Publish your presentations online we present SLIDEPLAYER.CO.IL.
Publish your presentations online we present SLIDEPLAYER.AE.
Publish your presentations online we present SLIDEPLAYER.BG.
Publish your presentations online we present SLIDEPLAYER.AFRICA.
Publish your presentations online we present SLIDEPLAYER.MX.
Publish your presentations online we present SLIDEPLAYER.LT.
Publish your presentations online we present SLIDEPLAYER.LV.
Publish your presentations online we present SLIDEPLAYER.SK.
Presentationens avskrift:

Formal Languages, Automata and Models of Computation CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2006

RECAPITULATION: REGULAR LANGUAGES - Languages, Alphabets and Strings - Operations on Strings - Operations on Languages - Regular Expressions - Finite Automata - Regular Grammars - Pumping lemma INTRODUCTION: CONTEXT FREE LANGUAGES

NEXT WEEK! Midterm Exam 1 Regular Languages Place: U2114 Time: Tuesday 2007-04-24, 10:15-12:00 It is OPEN BOOK. (This means you are allowed to bring in one book of your choice.) It will cover lectures 1 through 5 (Regular Languages).

Med det som vi har lärt oss hittills kan vi klara följande tentauppgifter…

Tenta 29 okt 1999; uppgift 2 (L Salling) Konstruera (med motiveringar) a) Ett reguljärt uttryck över vars strängar innehåller samtliga tre tecken!

Lösning eller

Konstruera (med motiveringar) b) En minimal DFA för ett språk L över vars strängar innehåller samtliga tre tecken!

Särskiljningsalgoritm

c) En reguljär grammatik för L

Tenta 24 okt 1994; uppgift 2 (L Salling) Reguljära? a) Språket över vars strängar innehåller ett jämnt antal a:n! Ja, språket är reguljärt och beskrivs med ett reguljärt uttryck:

Tenta 24 okt 1994; uppgift 2 (L Salling) b) De välformade aritmetiska uttrycken formade i alfabetet Nej, språket är inte reguljärt: Ta följande sträng: N stycken a adderas Om språket vore reguljärt skulle det kunna pumpas. Men de N avslutande tecknen består enbart av höger- parenteser och kan inte ändras utan att balansen med vänsterparenteserna förstörs.

Tenta 15 mars 1995; uppgift 3 (L Salling) Reguljära? c) Ja, språket är reguljärt och beskrivs med ett reguljärt uttryck:

Tenta 15 mars 1995; uppgift 3 (L Salling) Reguljära? d) Nej. Strängen vars enda palindromprefix längre än 2 är strängen själv, kan inte pumpas någonstans inuti b-block utan att falla ur språket.

Tenta 15 mars 1995; uppgift 3 (L Salling) Reguljära? e) Nej. Om det vore reguljärt skulle även föregående språk vara det (eftersom det är komplementspråk, och regulariteten bevaras under komplementbildning).

Pumping Lemma is necessary but not sufficient for RL OBS! The pumping lemma does not give a sufficient condition for a language to be regular! You can not use it to show that language is regular. For example, the language (strings over the alphabet {0,1} consisting of a nonempty even palindrome followed by another nonempty string) is not regular but can still be "pumped" with m = 4: Suppose w=uuRv has length at least 4. If u has length 1, then |v| ≥ 2 and we can take y to be the first character in v. Otherwise, take y to be the first character of u and note that yk for k ≥ 2 starts with the nonempty palindrome yy. For a practical test that exactly characterizes regular languages, see the Myhill-Nerode theorem. The typical method for proving that a language is regular is to construct either a Finite State Machine or a Regular Expression for the language.

By Partitioning (Delmängdskonstruktion) Minimizing DFA’s By Partitioning (Delmängdskonstruktion)

Minimizing DFA Different methods All involve finding equivalent states: States that go to equivalent states under all inputs We will use the Partitioning Method

Minimizing DFA’s by Partitioning Consider the following DFA (from Forbes Louis): Accepting states are yellow Non-accepting states are blue Are any states really the same?

S2 and S7 are really the same: Both Final states Both go to S6 under input b Both go to S3 under an a S0 and S5 really the same. Why? We say each pair is equivalent Are there any other equivalent states? We can merge equivalent states into 1 state

Partitioning Algorithm First Divide the set of states into Final and Non-final states Partition I Partition II a b S0 S1 S4 S5 S2 S3 S6 S7 *S2 *S7

Partitioning Algorithm Now See if states in each partition each go to the same partition S1 & S6 are different from the rest of the states in Partition I (but like each other) We will move them to their own partition a b S0 S1 I S4 I S1 S5 I S2 II S3 S3 I S3 I S4 S1 I S5 S6 S7 II *S2 S6 I *S7

Partitioning Algorithm b S0 S1 S4 S5 S3 S2 S6 S7 *S2 *S7

Partitioning Algorithm Now again See if states in each partition each go to the same partition In Partition I, S3 goes to a different partition from S0, S5 and S4 We’ll move S3 to its own partition a b S0 S1 III S4 I S5 S3 S3 I S4 S1 S5 I S2 II S6 S7 II *S2 S6 III *S7

Partitioning Algorithm Note changes in S6, S2 and S7 a b S0 S1 III S4 I S5 S4 S3 S3 IV S1 S5 I S2 II S6 S7 II *S2 S6 III *S7

Partitioning Algorithm Now S6 goes to a different partition on an a from S1 S6 gets its own partition. We now have 5 partitions Note changes in S2 and S7 a b S0 S1 III S4 I S5 S4 S3 S3 IV S1 S5 I S2 II S6 S7 II *S2 S6 V *S7

Partitioning Algorithm All states within each of the 5 partitions are identical. We might as well call the states I, II III, IV and V. a b S0 S1 III S4 I S5 S4 S3 S3 IV S1 S5 I S2 II S6 S7 II *S2 S6 V *S7

Partitioning Algorithm Here they are: a b I III *II IV V II V a b