Strings and Sets: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A +

Relaterede dokumenter
Skriftlig Eksamen Beregnelighed (DM517)

Skriftlig Eksamen Automatteori og Beregnelighed (DM17)

Skriftlig Eksamen Beregnelighed (DM517)

Formale Systeme 2 Sommer 2012 Prof. P. H. Schmitt

Exercise 6.14 Linearly independent vectors are also affinely independent.

Particle-based T-Spline Level Set Evolution for 3D Object Reconstruction with Range and Volume Constraints

Heuristics for Improving

Sign variation, the Grassmannian, and total positivity

University of Copenhagen Faculty of Science Written Exam April Algebra 3

LESSON NOTES Extensive Reading in Danish for Intermediate Learners #8 How to Interview

Basic statistics for experimental medical researchers

DM549 Diskrete Metoder til Datalogi

Det er muligt at chekce følgende opg. i CodeJudge: og

Mandara. PebbleCreek. Tradition Series. 1,884 sq. ft robson.com. Exterior Design A. Exterior Design B.

Mandara. PebbleCreek. Tradition Series. 1,884 sq. ft robson.com. Exterior Design A. Exterior Design B.

Besvarelser til Lineær Algebra Reeksamen Februar 2017

University of Copenhagen Faculty of Science Written Exam - 8. April Algebra 3

On the complexity of drawing trees nicely: corrigendum

Remember the Ship, Additional Work

ECE 551: Digital System * Design & Synthesis Lecture Set 5

Context-Free Grammars

Morphological Image Processing

University of Copenhagen Faculty of Science Written Exam - 3. April Algebra 3

TM4 Central Station. User Manual / brugervejledning K2070-EU. Tel Fax

Engelsk. Niveau C. De Merkantile Erhvervsuddannelser September Casebaseret eksamen. og

Skriftlig Eksamen Kombinatorik, Sandsynlighed og Randomiserede Algoritmer (DM528)

Terese B. Thomsen 1.semester Formidling, projektarbejde og webdesign ITU DMD d. 02/

Verilog HDL. Presented by: Amir Masoud Gharehbaghi

Some results for the weighted Drazin inverse of a modified matrix

Kort A. Tidsbegrænset EF/EØS-opholdsbevis (anvendes til EF/EØS-statsborgere) (Card A. Temporary EU/EEA residence permit used for EU/EEA nationals)

The complete construction for copying a segment, AB, is shown above. Describe each stage of the process.

DET KONGELIGE BIBLIOTEK NATIONALBIBLIOTEK OG KØBENHAVNS UNIVERSITETS- BIBLIOTEK. Index

Skriftlig Eksamen Diskret matematik med anvendelser (DM72)

Engelsk. Niveau D. De Merkantile Erhvervsuddannelser September Casebaseret eksamen. og

CHAPTER 8: USING OBJECTS

Linear Programming ١ C H A P T E R 2

Portal Registration. Check Junk Mail for activation . 1 Click the hyperlink to take you back to the portal to confirm your registration

DM547 Diskret Matematik

Vores mange brugere på musskema.dk er rigtig gode til at komme med kvalificerede ønsker og behov.

Our activities. Dry sales market. The assortment

The EAL Jobportal. How to get started

Flow Equivalence between Substitutional Dynamical Systems

South Baileygate Retail Park Pontefract

Generalized Probit Model in Design of Dose Finding Experiments. Yuehui Wu Valerii V. Fedorov RSU, GlaxoSmithKline, US

Noter til DM517 Beregnelighed

Probabilistic properties of modular addition. Victoria Vysotskaya

The GAssist Pittsburgh Learning Classifier System. Dr. J. Bacardit, N. Krasnogor G53BIO - Bioinformatics

OXFORD. Botley Road. Key Details: Oxford has an extensive primary catchment of 494,000 people

Design til digitale kommunikationsplatforme-f2013

FACULTY OF SCIENCE :59 COURSE. BB838: Basic bioacoustics using Matlab

Aktivering af Survey funktionalitet

Titel: Hungry - Fedtbjerget

3D NASAL VISTA TEMPORAL

The X Factor. Målgruppe. Læringsmål. Introduktion til læreren klasse & ungdomsuddannelser Engelskundervisningen

BILAG 8.1.B TIL VEDTÆGTER FOR EXHIBIT 8.1.B TO THE ARTICLES OF ASSOCIATION FOR

Vina Nguyen HSSP July 13, 2008

SOFTWARE PROCESSES. Dorte, Ida, Janne, Nikolaj, Alexander og Erla

PARALLELIZATION OF ATTILA SIMULATOR WITH OPENMP MIGUEL ÁNGEL MARTÍNEZ DEL AMOR MINIPROJECT OF TDT24 NTNU

UNISONIC TECHNOLOGIES CO.,

Curve Modeling B-Spline Curves. Dr. S.M. Malaek. Assistant: M. Younesi

Special VFR. - ved flyvning til mindre flyveplads uden tårnkontrol som ligger indenfor en kontrolzone

Eksempel på eksamensspørgsmål til caseeksamen

Status på det trådløse netværk

Page 2: Danish. Page 4: English

Privat-, statslig- eller regional institution m.v. Andet Added Bekaempelsesudfoerende: string No Label: Bekæmpelsesudførende

User Manual for LTC IGNOU

Brug sømbrættet til at lave sjove figurer. Lav fx: Få de andre til at gætte, hvad du har lavet. Use the nail board to make funny shapes.

Trolling Master Bornholm 2014

ATEX direktivet. Vedligeholdelse af ATEX certifikater mv. Steen Christensen

Trolling Master Bornholm 2015

Boligsøgning / Search for accommodation!

Unitel EDI MT940 June Based on: SWIFT Standards - Category 9 MT940 Customer Statement Message (January 2004)

IBM Network Station Manager. esuite 1.5 / NSM Integration. IBM Network Computer Division. tdc - 02/08/99 lotusnsm.prz Page 1

DIVAR VIGTIGT! / IMPORTANT! MÅL / DIMENSIONS

United Nations Secretariat Procurement Division

Engineering of Chemical Register Machines

MSE PRESENTATION 2. Presented by Srunokshi.Kaniyur.Prema. Neelakantan Major Professor Dr. Torben Amtoft

Bookingmuligheder for professionelle brugere i Dansehallerne

3D NASAL VISTA 2.0

Fejlbeskeder i SMDB. Business Rules Fejlbesked Kommentar. Validate Business Rules. Request- ValidateRequestRegist ration (Rules :1)

how to save excel as pdf

Breaking Industrial Ciphers at a Whim MATE SOOS PRESENTATION AT HES 11

Project Step 7. Behavioral modeling of a dual ported register set. 1/8/ L11 Project Step 5 Copyright Joanne DeGroat, ECE, OSU 1

Aktiv lytning - som kompetence hos ph.d.-vejledere

Statistik for MPH: oktober Attributable risk, bestemmelse af stikprøvestørrelse (Silva: , )

ESG reporting meeting investors needs

MM537 Introduktion til Matematiske Metoder

Læg lågen med fronten nedad på et blødt materiale for at beskytte lakken.

Trolling Master Bornholm 2014

Hvordan vælger jeg dokumentprofilen?

DANSK INSTALLATIONSVEJLEDNING VLMT500 ADVARSEL!

Help / Hjælp

Trolling Master Bornholm 2016 Nyhedsbrev nr. 8

Modtageklasser i Tønder Kommune

Sidde- og ventemøbler EFG Mingle 19/10/2017

Informationsteknologi Datamatgrafik Metafil til lagring og overførsel af billedbeskrivelsesinformation Del 1: Funktionel beskrivelse

FAST FORRETNINGSSTED FAST FORRETNINGSSTED I DANSK PRAKSIS

frame bracket Ford & Dodge

mandag den 23. september 13 Konceptkommunikation

Barnets navn: Børnehave: Kommune: Barnets modersmål (kan være mere end et)

Transkript:

Strings and Sets: A string over Σ is any nite-length sequence of elements of Σ The set of all strings over alphabet Σ is denoted as Σ Operators over set: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A +

Strings and Sets: A string over Σ is any nite-length sequence of elements of Σ The set of all strings over alphabet Σ is denoted as Σ Operators over set: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A + Right-linear grammars (regular grammar) can dene regular language

Strings and Sets: A string over Σ is any nite-length sequence of elements of Σ The set of all strings over alphabet Σ is denoted as Σ Operators over set: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A + Right-linear grammars (regular grammar) can dene regular language The set of all strings accepted by deterministic nite automaton (DFA) is denoted as A = L(M)

Strings and Sets: A string over Σ is any nite-length sequence of elements of Σ The set of all strings over alphabet Σ is denoted as Σ Operators over set: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A + Right-linear grammars (regular grammar) can dene regular language The set of all strings accepted by deterministic nite automaton (DFA) is denoted as A = L(M) Grammars and machine models are related: Chomsky hierarchy

Strings and Sets: A string over Σ is any nite-length sequence of elements of Σ The set of all strings over alphabet Σ is denoted as Σ Operators over set: set complement, union, intersection, etc. set concatenation AB, power of set A n, A, A + Right-linear grammars (regular grammar) can dene regular language The set of all strings accepted by deterministic nite automaton (DFA) is denoted as A = L(M) Grammars and machine models are related: Chomsky hierarchy right-linear grammars < > nite memory A subset A Σ is said to be a regular set if A = L(M) for some nite automaton M.

Finite Automata and Regular Sets Automata Finite We model these abstractly by a mathematical model called a finite automaton Definition (Deterministic finite automaton) Formally, a deterministic finite automaton (DFA) is a structure M = (Q, Σ, δ, s, F ), where Q is a finite set of states; Σ is a finite set called input alphabet; δ : Q Σ Q is the transition function s Q is the start state; F is a subset of Q ; elements of F are called accept or final states. SFWR ENG 2FA3: Discrete Mathematics and Logic II Dr. R. Khedri States and Transitions Finite Automata Representation of an automaton How a finite automaton operates? Language and regular set Dr. R. Khedri SFWR ENG 2FA3: Discrete Mathematics and Logic II

Question 1. Show that the following language is regular {awa w {a, b} }

Question 1. Show that the following language is regular {awa w {a, b} }

Question 1. Show that the following language is regular {awa w {a, b} }

Question 1. Show that the following language is regular {awa w {a, b} }

Question 1. Show that the following language is regular {awa w {a, b} } Since we have constructed a DFA for the language, we can claim that, by denition, the language is regular.

Some Closure Properties of Regular Sets Closure under intersection: A B Closure under complement: A Closure under union: A B = ( A B)

Some Closure Properties of Regular Sets Closure under intersection: A B Closure under complement: A Closure under union: A B = ( A B) Devise a way to construct new automaton intersection: the product construction

More on Regular Sets Some Closure Properties of Regular Sets (The Product Construction) Let M 3 = (Q 3, Σ, δ 3, s 3, F 3 ) where Q 3 = Q 1 Q 2 = {(p, q) p Q 1 q Q 2 } F 3 = F 1 F 2 s 3 = (s 1, s 2 ) δ 3 : Q 3 Σ Q 3 defined by SFWR ENG 2FA3: Discrete Mathematics and Logic II Dr. R. Khedri Induction to prove that an automaton accepts a set Some Closure Properties of Regular Sets The Product Construction Closure under intersection Closure under complement Closure under union δ 3 ((p, q), a) = (δ 1 (p, a), δ 2 (q, a)) The automaton M 3 is called the product of M 1 and M 2 Dr. R. Khedri SFWR ENG 2FA3: Discrete Mathematics and Logic II

Question 2. Use the product construction to come up with a deterministic nite automaton (DFA) that accepts all strings from {a, b} that contain an even number of a and that are formed by a repetition of the string ab (ie ababababab). Your report should explicitly give all the steps leading to the construction of the propsed DFA.

Question 2. Use the product construction to come up with a deterministic nite automaton (DFA) that accepts all strings from {a, b} that contain an even number of a and that are formed by a repetition of the string ab (ie ababababab). Your report should explicitly give all the steps leading to the construction of the propsed DFA. 1. L(M 1 ) = {x {a, b} x contains even number of a's}

Question 2. Use the product construction to come up with a deterministic nite automaton (DFA) that accepts all strings from {a, b} that contain an even number of a and that are formed by a repetition of the string ab (ie ababababab). Your report should explicitly give all the steps leading to the construction of the propsed DFA. 1. L(M 1 ) = {x {a, b} x contains even number of a's} 2. L(M 2 ) = {x {a, b} x is formed by repetition of ab}

Question 2. Use the product construction to come up with a deterministic nite automaton (DFA) that accepts all strings from {a, b} that contain an even number of a and that are formed by a repetition of the string ab (ie ababababab). Your report should explicitly give all the steps leading to the construction of the propsed DFA. 1. L(M 1 ) = {x {a, b} x contains even number of a's} 2. L(M 2 ) = {x {a, b} x is formed by repetition of ab} 3. L(M 3 ) = L(M 1 ) L(M 2 ): Product construct

1. L(M 1 ) = {x {a, b} x contains even number of a's} 1. Q 1 = {e, o} 2. = {a, b} 3. S 1 = e 4. F 1 = {e} 5. δ 1 can be given as table: a b e o e o e o

1. L(M 1 ) = {x {a, b} x contains even number of a's} 1. Q 1 = {e, o} 2. = {a, b} 3. S 1 = e 4. F 1 = {e} 5. δ 1 can be given as table: a b e o e o e o

2. L(M 2 ) = {x {a, b} x is formed by repetition of ab}

2. L(M 2 ) = {x {a, b} x is formed by repetition of ab}

2. L(M 2 ) = {x {a, b} x is formed by repetition of ab}

2. L(M 2 ) = {x {a, b} x is formed by repetition of ab} 1. Q 2 = {q 0, q 1, q 2 } 2. Σ = {a, b} 3. s 2 = q 0 4. F 2 = {q 0 } a b 5. δ 2 can be given as following table: q 0 q 1 q 2 q 1 q 2 q 0 q 2 q 2 q 2

3. L(M 3 ) = L(M 1 ) L(M 2 ): Product construct Product construction: 1. Q 3 = {e, o} {q 0, q 1, q 2 } = {(e, q 0 ), (e, q 1 ), (e, q 3 ), (o, q 0 ), (o, q 1 ), (o, q 2 ), } 2. Σ = {a, b} 3. s 3 = (s 1, s 2 ) = (e, q 0 ) 4. F 3 = F 1 F 2 = {e} {q 0 } = {(e, q 0 )} 5. δ 3 is given as the following table: a b (e, q 0 ) (o, q 1 ) (e, q 2 ) (e, q 1 ) (o, q 2 ) (e, q 0 ) (e, q 3 ) (o, q 2 ) (e, q 2 ) (o, q 0 ) (e, q 1 ) (o, q 2 ) (o, q 1 ) (e, q 2 ) (o, q 0 ) (o, q 2 ) (e, q 2 ) (o, q 2 ) a b e o e o e o a b q 0 q 1 q 2 q 1 q 2 q 0 q 2 q 2 q 2

3. L(M 3 ) = L(M 1 ) L(M 2 ): Product construct

Some Closure Properties of Regular Sets Closure under intersection: A B Closure under complement: A Closure under union: A B = ( A B) Devise a way to construct new automaton intersection: the product construction complement: reverse accept and reject states

Question 3. Construct a nite automaton that accepts all binary strings without 111 as substring. 1. L(M ) = {x {0, 1} x accepts all binary strings with 111 as a substring}

Question 3. Construct a nite automaton that accepts all binary strings without 111 as substring. 1. L(M ) = {x {0, 1} x accepts all binary strings with 111 as a substring} 2. L(M) = L(M ): reverse accpet and reject states

1. L(M ) = {x {0, 1} x accepts all binary strings with 111 as a substring}

1. L(M ) = {x {0, 1} x accepts all binary strings with 111 as a substring}

2. L(M) = L(M ): reverse accpet and reject states

Exercise: Show that L 2 = {aw 1 aaw 2 a : w 1, w 2 {a, b} } is regular.