CS 361 Meeting 12 10/3/18

Similar documents
Week 3: Connected Subgraphs

cycle that does not cross any edges (including its own), then it has at least

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages:

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013

ECE602 Exam 1 April 5, You must show ALL of your work for full credit.

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation.

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases.

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems

The Matrix Exponential

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming

The Matrix Exponential

Supplementary Materials

Strongly Connected Components

That is, we start with a general matrix: And end with a simpler matrix:

Homework #3. 1 x. dx. It therefore follows that a sum of the

Addition of angular momentum

Abstract Interpretation: concrete and abstract semantics

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM

Gradebook & Midterm & Office Hours

Higher order derivatives

The van der Waals interaction 1 D. E. Soper 2 University of Oregon 20 April 2012

What is a hereditary algebra?

MATH 319, WEEK 15: The Fundamental Matrix, Non-Homogeneous Systems of Differential Equations

Computing and Communications -- Network Coding

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

A Propagating Wave Packet Group Velocity Dispersion

Addition of angular momentum

u 3 = u 3 (x 1, x 2, x 3 )

UNTYPED LAMBDA CALCULUS (II)

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula

1 Minimum Cut Problem

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, April 04, 2005, 8:35 AM) PART I: CHAPTER TWO COMB MATH.

Search sequence databases 3 10/25/2016

Construction of asymmetric orthogonal arrays of strength three via a replacement method

EXST Regression Techniques Page 1

Y 0. Standing Wave Interference between the incident & reflected waves Standing wave. A string with one end fixed on a wall

Separating principles below Ramsey s Theorem for Pairs

Basic Polyhedral theory

Elements of Statistical Thermodynamics

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation.

COHORT MBA. Exponential function. MATH review (part2) by Lucian Mitroiu. The LOG and EXP functions. Properties: e e. lim.

Lecture 37 (Schrödinger Equation) Physics Spring 2018 Douglas Fields

SCHUR S THEOREM REU SUMMER 2005

u r du = ur+1 r + 1 du = ln u + C u sin u du = cos u + C cos u du = sin u + C sec u tan u du = sec u + C e u du = e u + C

Brief Introduction to Statistical Mechanics

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES

Derangements and Applications

Differential Equations

(Upside-Down o Direct Rotation) β - Numbers

General Notes About 2007 AP Physics Scoring Guidelines

The Equitable Dominating Graph

Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers Roy D. Yates and David J.

On spanning trees and cycles of multicolored point sets with few intersections

EEO 401 Digital Signal Processing Prof. Mark Fowler

y = 2xe x + x 2 e x at (0, 3). solution: Since y is implicitly related to x we have to use implicit differentiation: 3 6y = 0 y = 1 2 x ln(b) ln(b)

Calculus concepts derivatives

ON RIGHT(LEFT) DUO PO-SEMIGROUPS. S. K. Lee and K. Y. Park

Self-Adjointness and Its Relationship to Quantum Mechanics. Ronald I. Frank 2016

1.2 Faraday s law A changing magnetic field induces an electric field. Their relation is given by:

Classical Magnetic Dipole

The second condition says that a node α of the tree has exactly n children if the arity of its label is n.

4. Money cannot be neutral in the short-run the neutrality of money is exclusively a medium run phenomenon.

Hydrogen Atom and One Electron Ions

EEO 401 Digital Signal Processing Prof. Mark Fowler

ME 321 Kinematics and Dynamics of Machines S. Lambert Winter 2002

Exam 1. It is important that you clearly show your work and mark the final answer clearly, closed book, closed notes, no calculator.

In the previous two chapters, we clarified what it means for a problem to be decidable or undecidable.

Mutually Independent Hamiltonian Cycles of Pancake Networks

Last time: introduced our first computational model the DFA.

Coupled Pendulums. Two normal modes.

1 General boundary conditions in diffusion

6.1 Integration by Parts and Present Value. Copyright Cengage Learning. All rights reserved.

Quasi-Classical States of the Simple Harmonic Oscillator

Abstract Interpretation. Lecture 5. Profs. Aiken, Barrett & Dill CS 357 Lecture 5 1

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES. 1. Statement of results

First derivative analysis

On the Hamiltonian of a Multi-Electron Atom

Electrochemistry L E O

1 Isoparametric Concept

EECE 301 Signals & Systems Prof. Mark Fowler

Problem Set 6 Solutions

There is an arbitrary overall complex phase that could be added to A, but since this makes no difference we set it to zero and choose A real.

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis

GEOMETRICAL PHENOMENA IN THE PHYSICS OF SUBATOMIC PARTICLES. Eduard N. Klenov* Rostov-on-Don, Russia

MA 262, Spring 2018, Final exam Version 01 (Green)

Math 34A. Final Review

10. Limits involving infinity

Differentiation of Exponential Functions

Statistical Thermodynamics: Sublimation of Solid Iodine

2.3 Matrix Formulation

Linear-Phase FIR Transfer Functions. Functions. Functions. Functions. Functions. Functions. Let

SOME PARAMETERS ON EQUITABLE COLORING OF PRISM AND CIRCULANT GRAPH.

ANALYSIS IN THE FREQUENCY DOMAIN

4.2 Design of Sections for Flexure

1997 AP Calculus AB: Section I, Part A

Chapter 8: Electron Configurations and Periodicity

Economics 201b Spring 2010 Solutions to Problem Set 3 John Zhu

Function Spaces. a x 3. (Letting x = 1 =)) a(0) + b + c (1) = 0. Row reducing the matrix. b 1. e 4 3. e 9. >: (x = 1 =)) a(0) + b + c (1) = 0

[ ] 1+ lim G( s) 1+ s + s G s s G s Kacc SYSTEM PERFORMANCE. Since. Lecture 10: Steady-state Errors. Steady-state Errors. Then

Transcription:

CS 36 Mting 2 /3/8 Announcmnts. Homwork 4 is du Friday. If Friday is Mountain Day, homwork should b turnd in at my offic or th dpartmnt offic bfor 4. 2. Homwork 5 will b availabl ovr th wknd. 3. Our midtrm will occur during th wk of /22. Quit Distinguishd. Last tim I introducd th notion of strings that wr distinguishd by a languag: Dfinition: W say that w, v Σ ar distinguishabl by a languag L if for som z Σ, xactly on of wz and vz is a mmbr of L. 2. Of cours, th opposit of distinguishd is indistinguishabl: Dfinition: W say that w, v Σ ar indistinguishabl by languag L if for all z Σ, wz L vz L and w writ w L v. 3. Two strings ar indistinguishabl rlativ to a languag if in som sns thy ar quivalnt as prfixs of strings in th languag. 4. Th rlation indistinguishabl by L dfind by Dfinition: W say that w, v Σ ar indistinguishabl by languag L if for all z Σ, wz L vz L and w writ w L v. is an quivalnc rlation on strings. 5. Th numbr of distinct quivalnc classs of strings undr th indistinguishabl rlationship has an intrsting rlationship to rgularity. Click hr to viw th slids for this class Givn a languag L and a st X of strings ovr L s alphabt, w say that th X is pairwis distinguishabl by L if vry pair of strings in X is distinguishabl by L. Th indx of a languag L is th siz of th largst st of strings X that is pairwis distinguishabl by L. Equivalntly, th indx of a languag is th siz of th st of quivalnc classs inducd by th indistinguishabl rlation rlativ to th languag. Th Myhill-Nrod Thorm. This bring us to th big Thorm (introducd through problm.52 in Sipsr): Thorm (Myhill-Nrod): A languag L is rgular iff it has finit indx and ach rgular languag is accptd by a DFA whos dscription includs as many stats as th indx of th languag. 2. W start by showing that rgularity implis finit indx. Proof: (a) Suppos that L is rgular. Thn thr is som DFA D = (Q, Σ, δ, s, F ) such that L = L(D). Suppos that X is a st of strings that is pairwis distinguishabl by L with w, v X. Considr ˆδ(s, w) and ˆδ(s, v). If ˆδ(s, w) = ˆδ(s, v) thn for all z Σ, ˆδ(s, wz) = ˆδ(s, vz). But wz L ˆδ(s, wz) F ˆδ(s, vz) F vz L which would imply that w and z wr indistinguishabl by L. Sinc th mmbrs of X ar pairwis distinguishabl, this cannot b th cas so for all w, v it must b th cas that ˆδ(s, w) ˆδ(s, v). This implis that th numbr of lmnts in X cannot xcd th numbr of lmnts in Q sinc othrwis thr would hav to b at last two strings

in X such that ˆδ(s, w) = ˆδ(s, v). Thrfor, if L is rgular it is of finit indx. 3. Now w nd to considr th othr dirction of th if and only if... Proof (continud): b) Suppos L is of finit indx. First, lt s look at a vry simpl concrt xampl: a b. W hav sn that this languag has indx 3 sinc {a, ab, ba} forms a maximal st of distinguishabl strings rlativ to th languag. Any othr collction of rprsntativs of th quivalnc classs associatd with ths strings also form maximal distinguishabl sts. For xampl, {ɛ, b, ba} is anothr maximal distinguishabl st for a b. Considr th following machin which uss th obvious st of stats to rcogniz a b, and nams thos stats, as w hav oftn don, with rprsntativs of th strings that would mov th machin to ach stat: a [ϵ] b [b] b This suggsts th following gnral construction. Lt X b a maximal st of strings pairwis distinguishabl by L. Construct a DFA D = ({[x] x X}, Σ, δ, [ɛ], {[x] x L X}) whr δ([x], a) = [xa]. a a,b [ba] W claim that L = L(D). To justify this claim, w nd to show that δ is wll-dfind. In particular that if a Σ, x, x [x] thn [xa] = [x a]. for all w Σ, ˆδ([ɛ], w) = [w], and [w] {[x] x L X} w L. Th first condition is tru bcaus of th way th indistinguishabl rlation is dfind. If [xa] [x a], thn xa and x a must b distinguishabl by L which would imply that for som z, on of th strings xaz and x az blongd to L and th othr didn t. In that cas, howvr, x and x would b distinguishd by th string az. If [x] = [x ], x and x must b indistinguishabl. Thus, δ is wll dfind. W can show th third condition by induction on th lngth of w. It is clarly tru for w = ɛ. Suppos it is tru for w and considr th a string of th form wx. By dfinition, ˆδ([ɛ], wx) = δ(ˆδ([ɛ], w), x) = δ([w], x) = [wx]. For th final condition, suppos that [w] {[x] x L X}. W know that thr is som x L X such that [w] = [x] which implis that w L x. Thrfor, for any z Σ, wz and xz must ithr both blong to L or nithr b in L. Considr z = ɛ. This implis that w L. In th opposit dirction, if w L, w L x for som x X and thrfor [w] = [x] {[x] x L X} Minimization of DFAs. Givn that w now know that for any rgular languag thr is a DFA of siz qual to th indx of th languag it rcognizs, w would lik to hav a way to algorithmically find this DFA givn any prcis dscription of th languag (i.., a DFA, an NFA, or a rgular xprssion). 2. Givn a rgular xprssion, w can construct a NFA for th languag 2

using th constructions mbddd in th proofs that rgular languags ar closd undr th union, concatnation and closur. 3. Givn an NFA, w can build an quivalnt DFA using th subst construction prsntd arlir. 4. All w nd is a way to convrt a non-minimal DFA into on of minimal siz (or to raliz that th on w startd with was alrady minimal). 5. W can prcisly spcify whn two stats can b mrgd by dfining stat quivalnc formally for two stats p, q Q as: p q w Σ, ˆδ(p, w) F ˆδ(q, w) F 6. It should b clar that this notion of quivalnc of stats is in fact rflxiv, symmtric and transitiv. Thrfor, it partitions th st of stats of a DFA into quivalnc classs. 7. If you look at th quivalnt stats of th originally DFA for th Huffman cod xampl and compar thm to th stats of th rducd DFA, you will notic that ach stat of th rducd DFA corrsponds to on of th quivalnc classs of th original DFA. (Rcall that th stats of th rducd DFA corrspond in turn to th quivalnc classs of strings inducd by th indistinguishabl by L rlation inducd by th languag rcognizd by th machin.). Instad, w will considr an algorithm that dtrmins which stats ar quivalnt to on anothr (by actually dtrmining which stats ar not quivalnt to on anothr).. Th basis of th algorithm is a somwhat rcursiv dfinition of not bing quivalnt. Th bas cas is basically and th rcursiv claus is p q if p F q F p q if w Σ, ˆδ(p, w) ˆδ(q, w) 2. I usd a nw machin as my xampl for how w can algorithmically comput th rlationship this smstr. You say all th nw slids. I didn t hav tim (or nrgy) to turn thos slids into L A TEX. So, hr I will prsnt an old xampl basd on th following DFA and it quivalnt mimimal DFA: 8. This suggsts a way that w could us th quivalnc rlation on th stats of a DFA to dtrmin th minimal DFA. Namly, if [q] dnots th quivalnc class of stat q inducd by th stat quivalnc rlation w just dfind: Givn M = (Q, Σ, δ, s, F ) dfin M = ({[q] q Q}, Σ, δ, [s], {[f] f F }) o g whr δ ([p], x) = [δ(p, x)]. 9. As in th proof of th Myhill-Nrod thorm, w should b carful to vrify that δ is wll dfind, bhavs as dsird, and that th st of final stats is appropriat. W won t. _ i n 3

or or x? or x g i n 3. Th mchanics of th algorithm us a tabl in which w rcord all pairs of stats w can idntify as non quivalnt. Each ntry in th tabl rflcts our knowldg of th rlationship btwn th stats at th top of its column and th right nd of its row. For our xampl machin, th tabl starts out lik this (with nams lik oh! and usd to mak it asy to distinguish th stats for mpty and zro from thos for th lttrs O and E). oh! 4. Th first stp is to us th basis stp dscribd abov to raliz that all final stats ar not quivalnt to all non-final stats. W rcord this by putting big X s in all of th clls in th tabl for such pairs.. g i n 5. Nxt, w us th rcursiv stp ovr and ovr again for diffrnt pairs of stats that still appar to b quivalnt rstricting our attntion to strings w of lngth. For xampl: At this point in our tabl, th ntry for th pair of stats, is mpty bcaus ths stat might still b quivalnt:? g i n Looking back at th stat diagram, w can s that on input, δ(, ) = and δ(, ) =. Sinc th ntry in our tabl for this pair of dstinations (, ) is still mpty, ths stats might b quivalnt, so it would still appar that and might b quivalnt. On th othr hand, on input, δ(, ) = and δ(, ) = oh!. Th ntry for th pair of stats (, oh!) in our tabl alrady has an X in 4

it indicating w know ths stats ar not quivalnt. Thrfor, w can conclud that and ar not quivalnt and rcord this fact with a nw X in our tabl. X g i n 6. W thn continu mthodically (w will go lft to right and top to bottom) through th tabl considring all of th unmarkd pairs: (,) Sinc δ(, ) = and δ(, ) = and th pair (, ) is still unmarkd in our tabl, w mak no changs. Howvr, δ(, ) = and δ(, ) = g and th stats and g ar known not to b quivalnt, so w gt to put anothr X in for, : X X g i n (,) Sinc δ(, ) = and δ(, ) = and th pair (, ) is still unmarkd in our tabl, w mak no changs. Similarly, δ(, ) = oh! and δ(, ) = g and th stats oh! and g ar still unmarkd so w mak no changs. It is important to not, howvr, that in both cass, w ar dciding whthr th two stats th machin would mov into ar not quivalnt by chcking to s if thir ntry in our tabl contains an X bfor w hav vn gottn to that ntry. If, whn w vntually procss thos ntris w discovr thy should hav X s, w will nd to rconsidr th pair (,). W won t do this by spcially rconsidring (,). Instad, w will mak an additional pass ovr all tabl ntris that ar still blank aftr th first pass. (,) Sinc δ(, ) = and δ(, ) = and th pair (, ) is markd as non-quivalnt, w gt to mark (,) Similarly, δ(, ) = oh! and δ(, ) = g and th stats oh! and g ar still unmarkd so w mak no changs. X X X g i n 7. Continuing to considr vry mpty cll in th tabl in th sam way until w rach (i,n), w vntually gt th following: 5

X X X X X X X X g i n 8. At this point, as mntiond abov, w nd to rconsidr all of th blank clls bcaus whn w considrd thm on th first pass w might hav basd our dcision not to mark thm on clls that w had not yt procssd. In this cas, on th scond pass, w will discovr that nothing actually changs. In gnral, w would kp making passs until nothing changs during on complt pass. 9. Th information in th tabl justifis many simplifications of th original machin. It indicats that stats and can b mrgd as can and. It also says that all of th final stats ar quivalnt and can b mrgd. Thus, th rducd machin will look lik: or x x or or? 6