1 CD5560 FABER Formal Languages, Automata and Models of Computation Exercise 2 Mälardalen University 2007.

Slides:



Advertisements
Liknande presentationer
SOA Governance with SOA Software For BUGS Martin Svensson.
Advertisements

ÖGONBLICKSBILDER FRÅN EN VÄRLD I FÖRÄNDRING. Wolfgang Sachs.
Mellanblå fält till höger: Plats för bild – foto, diagram, film, andra illustrationer Comparison of some instruments and methods for determination of sunshine.
You should put a comma before a person’s name if you're talking directly to them… Come here, Lily! …or when you are introducing or talking about a person.
7 Det är= there is/are, it is
1.Numerical differentiation and quadrature Discrete differentiation and integration Ordinary.
Landscaped Spaces Design for Health This slide show contains images related to health and the built environment. For more information see
Aims and outcomes Levnadsvillkor, attityder, värderingar och traditioner samt sociala, politiska och kulturella förhållanden i olika sammanhang och delar.
Hur man löser”Firm Friends” Tips för hur man fyller i en logiktabell (Använd pilarna uppe till höger för att navigera i presentationen.)
Fråga 71 Hål är minoritetsbärare i ett n-typ kisel lager. Hålen injeceras från en sida och diffunderar in i n-typ lagret och en koncentrationsprofil upprättshåls.
Vägledningscentrum Career guidance centre
Karlstad April 2013 Karin Henrekson Ahlberg and Rolf Öberg Rolf Öberg.
Elkraft 7.5 hp distans: Kap. 3 Likströmsmotorn 3:1
Exercise session: relevant questions Finansiell ekonomi workshop.
Creating an Adobe Presentation Rapidly create Flash-based presentations and eLearning courses from PowerPoint Set Preferences Add or Edit Audio Add multimedia.
Welcome to Gävle! Bild: Albin Bogren / BARINGO. Education is the key to employment and increased choices in life.
LEONHARD WEISS Seite 1 MA FB5273DE-2 GB3/GOB-S/tbr LKAB Ny Sjöbangård Norr 2011 / 2012.
Växjö 15 april -04Språk & logik: Reguljära uttryck1 DAB760: Språk och logik 15/4: Finita automater och 13-15reguljära uttryck Leif Grönqvist
Barnneurolog Barnkliniken KRYH
Peace Through Service is RI theme Sakuji Tanaka RI President In Rotary, our business is not profit. Our business is peace. Our reward is not money,
ETSI II SP 3: Bridge Aesthetics and Cultural Effects Aim: To relate aeshetical, environmental and cultural values with other important aspects of bridge.
Who används för att fråga efter personer
Stryk ej! Villkorssatser.
Figure Types of analog-to-analog modulation
Transport models Are they really that important? Christian Nilsson, WSP 17 October 2014.
Seminarium Omställningens tid ”Vart vill vi komma? Vad utmärker en hållbar framtid?”
Mathematics 1 /Matematik 1 Lesson 2 – Functions and their solutions Lektion2 – Funktioner och deras lösningar.
Presens och imperfekt av have. Translate! Jag har huvudvärk. Hon har en röd Volvo. De har två barn tillsammans.
TÄNK PÅ ETT HELTAL MELLAN 1-50
Pågående form (ing-form)
Best pictures on the internet 2007 Awards 1http:// Är vänsteralliansen trovärdig i Norrköping.
Kommunikationskoncept för den Internationella studentrekryteringen DEL [Detta är en ppt- med inspelad berättarröst. Du kan när du vill använda.
FIRMA OCH VARUMÄRKESENKÄT Näringslivets syn på firma och varumärken Industry’s view of trade names and trademarks.
För att uppdatera sidfotstexten, gå till menyfliken: Infoga | Sidhuvud och sidfot Fondbolagsträff 2015.
Best pictures on the internet 2007 Awards 1http:// (s), (v), och (mp) i Norrköping, gillar inte att vi använder grundlagarna.
Styrteknik: Grundläggande logiska funktioner D2:1
Exempelbaserade specifikationer med SpecFlow
Täckningsgrad Dec 2014 – feb 2015 Täckningsgrad Dec 2014 – feb 2015.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 0 - Intro Mälardalen University 2005.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2006.
Räkna till en miljard 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,14,15,16,17,18,19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, En miljard är ett.
1 L U N D S U N I V E R S I T E T Bygginnovationssystem, VBEN20 Kristian Widén.
När infaller Julafton och hur ofta?
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 1 Mälardalen University 2005.
 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.
“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,
INLÄGG FÖR SOCIALA MEDIER SHAREWEAR. 1.INSTAGRAM 2.FACEBOOK 3.TWITTER INNEHÅLL.
Lab Contact 1  Lab Assistants:  Meng Liu, Group B  Sara Abbaspour, Group A
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.
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.
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.
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.
Formal Languages, Automata and Models of Computation
My role model.
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.
You Must Take Marriage Advice to Stop Divorce! Dontgetdivorced.com.
Practice and challenges in involving fathers
Presentationens avskrift:

1 CD5560 FABER Formal Languages, Automata and Models of Computation Exercise 2 Mälardalen University 2007

2 NEXT WEEK! Midterm Exam 1 Regular Languages Place: U2-114 Time: Tuesday , 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).

3 Tenta 29 okt 1999; uppgift 2 (L Salling) Construct (and explain) wich strings contain all three symbols! a) A regular expression over

4 Solution or

5 Construct (and explain) wich strings contain all three symbols! b) A minimal DFA for a language L over

6

7 Särskiljningsalgoritm

8 c) En reguljär grammatik för L

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

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

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

12 Tenta 15 mars 1995; uppgift 3 (L Salling) Reguljära? b) 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.

13 Tenta 15 mars 1995; uppgift 3 (L Salling) Reguljära? c) 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).

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

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

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

17 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?

18 S 2 and S 7 are really the same: Both Final states Both go to S6 under input b Both go to S3 under an a S 0 and S 5 really the same. Why? We say each pair is equivalent Are there any other equivalent states? We can merge equivalent states into 1 state

19 Partitioning Algorithm First Divide the set of states into Final and Non-final states Partition I Partition II a b S0S0 S1S1 S4S4 S1S1 S5S5 S2S2 S3S3 S3S3 S3S3 S4S4 S1S1 S4S4 S5S5 S1S1 S4S4 S6S6 S3S3 S7S7 *S 2 S3S3 S6S6 *S 7 S3S3 S6S6

20 Partitioning Algorithm Now See if states in each partition each go to the same partition S 1 & S 6 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 S0S0 S 1 I S 4 I S1S1 S 5 I S 2 II S3S3 S 3 I S4S4 S 1 I S 4 I S5S5 S 1 I S 4 I S6S6 S 3 I S 7 II *S 2 S 3 I S 6 I *S 7 S 3 I S 6 I

21 Partitioning Algorithm a b S0S0 S1S1 S4S4 S5S5 S1S1 S4S4 S3S3 S3S3 S3S3 S4S4 S1S1 S4S4 S1S1 S5S5 S2S2 S6S6 S3S3 S7S7 *S 2 S3S3 S6S6 *S 7 S3S3 S6S6

22 Partitioning Algorithm Now again See if states in each partition each go to the same partition In Partition I, S 3 goes to a different partition from S 0, S 5 and S 4 We’ll move S3 to its own partition a b S0S0 S 1 III S 4 I S5S5 S 1 III S 4 I S3S3 S 3 I S4S4 S 1 III S 4 I S1S1 S 5 I S 2 II S6S6 S 3 I S 7 II *S 2 S 3 I S 6 III *S 7 S 3 I S 6 III

23 Partitioning Algorithm Note changes in S 6, S 2 and S 7 a b S0S0 S 1 III S 4 I S5S5 S 1 III S 4 I S4S4 S 1 III S 4 I S3S3 S 3 IV S1S1 S 5 I S 2 II S6S6 S 3 IV S 7 II *S 2 S 3 IV S 6 III *S 7 S 3 IV S 6 III

24 Partitioning Algorithm Now S 6 goes to a different partition on an a from S 1 S 6 gets its own partition. We now have 5 partitions Note changes in S 2 and S 7 a b S0S0 S 1 III S 4 I S5S5 S 1 III S 4 I S4S4 S 1 III S 4 I S3S3 S 3 IV S1S1 S5 IS5 I S 2 II S6S6 S 3 IV S 7 II *S 2 S 3 IV S 6 V *S 7 S 3 IV S 6 V

25 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 S0S0 S 1 III S 4 I S5S5 S 1 III S 4 I S4S4 S 1 III S 4 I S3S3 S 3 IV S1S1 S 5 I S 2 II S6S6 S 3 IV S 7 II *S 2 S 3 IV S 6 V *S 7 S 3 IV S 6 V

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

27 Chomsky Hierarchy

28 Automata theory: formal languages and formal grammars

29 Automata theory: formal languages and formal grammars

30 Regular Languages Context-Free Languages Non-regular languages