What We re Talking About Today. Lecture 8. Part I. Review. LVCSR Training

Size: px
Start display at page:

Download "What We re Talking About Today. Lecture 8. Part I. Review. LVCSR Training"

Transcription

1 Wht We re Tlking out Tody Lecture 8 LVCSR Trining nd Decoding Michel Picheny, Bhuvn Rmhdrn, Stnley F. Chen Lrge-voculry continuous speech recognition (LVCSR). coustic model trining. How to estimte prmeters, e.g., for GMM s. How to uild phonetic decision trees. Decoding. How to select est word sequence... Given udio smple. IBM T.J. Wtson Reserch Center Yorktown Heights, New York, US {picheny,huvn,stnchen}@us.im.com 12 Novemer / 120 Prt I LVCSR Trining Review x Oservtions; sequence of 0d feture vectors. ω word sequence. Fundmentl eqution of SR. ω = rg mx ω P(ω x) = rg mx ω P(ω)P ω (x) P ω (x) coustic model. For word sequence ω, how likely re fetures x? P(ω) lnguge model. How likely is word sequence ω? / 120 / 120

2 Review: coustic Modeling For word sequence ω, construct ssocited HMM. g 1 /0.5 g 2 /0.5 g /0.5 g /0.5 g 5 /0.5 g 6 /0.5 g 1 /0.5 g 2 /0.5 g /0.5 g /0.5 g 5 /0.5 g 6 /0.5 Ech x cn e output y mny pths through HMM. Compute P ω (x) y summing over pth likelihoods. P ω (x) = P ω (x, ) pths Compute pth likelihood y... Multiplying rc nd GMM output pros long pth. coustic Likelihoods: Smll Voculry P ω (x) = P ω (x, ) pths = pths = T p t P( x t t ) t=1 T p t p t,j pths t=1 comp j dim d N (x t,d ; µ t,j,d, σ 2 t,j,d) p trnsition proility for rc. p,j mixture weight, jth component of GMM on rc. µ,j,d men, dth dim, jth component, GMM on rc. σ 2,j,d vrince, dth dim, jth component, GMM on rc. 5 / / 120 coustic Likelihoods: Lrge Voculry P ω (x) = P ω (x, ) pths = pths = T p t P( x t t ) t=1 T p t p t,j pths t=1 comp j dim d N (x t,d ; µ t,j,d, σ 2 t,j,d) So, Wht s Different for Lrge Voculry? The HMM. p trnsition proility for rc. p,j mixture weight, jth component of GMM on rc. µ,j,d men, dth dim, jth component, GMM on rc. σ 2,j,d vrince, dth dim, jth component, GMM on rc. 7 / / 120

3 Where re We? 1 coustic Modeling for LVCSR Review: Building HMM s, Smll Voculry Trining. Enumerte possile word sequences given trnscript. Replce ech word with its HMM; collect FB counts. 2 The Locl Mxim Prolem HMM eight HMMtwo Recipes for LVCSR Trining Discussion Decoding. Enumerte possile word sequences. Replce ech word with its HMM; run Viteri. HMMone HMM two HMM three 9 / / 120 Exmple: Word Models (Trining HMM) One HMM per word (two sttes per phone, sy). Ech HMM hs own GMM s (one per stte). e.g., reference trnscript: EIGHT TWO. EY TD T UW Wht s the Prolem With Word Models? Wht if wnt to e le to decode... Word not in trining set, e.g., REDONKULOUS? Lots of dt for some words. lmost no dt for others. Not sclle to lrge voculry. HMM eight HMMtwo g eight,1 g eight,2 g eight, g eight, g two,1 g two,2 g two, g two, g eight,1 g eight,2 g eight, g eight, g two,1 g two,2 g two, g two, 11 / / 120

4 Phonetic Modeling One HMM per phoneme. Ech HMM hs own GMM s. Need pronuncition or seform for ech word. TWO T UW TEN T EY N Conctente phoneme HMM s to form HMM for word. i.e., shre GMM s for phone cross ll words... Contining tht phone. Wht if word not in trining? No prolemo. Wht if phoneme not in trining? Unlikely. Phonetic Modeling TWO T UW EIGHT EY TD HMM EY HMM TD HMM T HMM UW g EY,1 gey,2 g TD,1 g TD,2 g T,1 g T,2 g UW,1 g UW,2 g EY,1 g EY,2 g TD,1 g TD,2 g T,1 g T,2 g UW,1 g UW,2 1 / / 120 Wht s the Difference? Pop Quiz g eight,1 g eight,2 g eight, g eight, g two,1 g two,2 g two, g two, g eight,1 g eight,2 g eight, g eight, g two,1 g two,2 g two, g two, g EY,1 gey,2 g TD,1 g TD,2 g T,1 g T,2 g UW,1 g UW,2 g EY,1 g EY,2 g TD,1 g TD,2 g T,1 g T,2 g UW,1 g UW,2 HMM topology typiclly doesn t chnge. HMM prmeteriztion chnges. Scenrio: 1000 word voculry; 50 phonemes. vg. word length = 5 phones; two sttes per phoneme. Word modeling: one HMM per word. How mny GMM s per word on verge? How mny GMM s in whole system? Phonetic modeling: one HMM per phoneme. How mny GMM s per phoneme? How mny GMM s in whole system? 15 / / 120

5 Context-Independent Phonetic Modeling Sme phoneme HMM independent of phonetic context. Wht s the prolem? Is L in S L IH nd IH L Z the sme? llophonic vrition; corticultion. Symptom: too few GMM s underfitting. Context-Dependent Phonetic Modeling Seprte HMM for ech context of ech phoneme? e.g., triphone model context is ± 1 phone. Seprte HMM for L-S+IH, L-IH+Z,... Wht s the prolem? Solution: cluster triphones. e.g., L-S+IH, L-S+, L-S+E, L-S+EH,... Seprte HMM for ech cluster. Most populr method: decision trees. 17 / / 120 Exmple: Tree for Phoneme T pos -1 S TS Z Y pos +1 HMM T,1 XR ER R N pos +1 Y X XR B HMM T,2 BD CH D... UW... N Y pos +1 HMM T, IH IX IY N Y HMM T, HMM T,5 N How Mny Trees? Which phoneme position ffects pronuncition of... Beginning of current phoneme the most? Wht out end of current phoneme? Seprte decision tree for ech phoneme HMM stte! If 50 phones, 2 sttes/phone, how mny trees totl? For ech tree, one GMM per lef. HMM topology fixed. Choose GMM to use t ech position... By finding lef in corresponding tree. 19 / / 120

6 Exmple: Tree for Phoneme T, Stte 2 Context-Dependent Phonetic Modeling gt.2,1 Y pos -1 S TS Z gt.2,2 Y N pos +1 XR ER R N pos +1 X XR B BD CH D... UW... N Strt with phoneme sequence. HMM EY HMM TD HMM T HMM UW Sustitute in HMM topology for ech phoneme. g EY.1 gey.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 g EY.1 g EY.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 Select GMM for ech stte using ssocited tree. g EY.1,? gey.2,? g TD.1,? g TD.2,? g T.1,? g T.2, g UW.1,? g UW.2,? gt.2, Y gt.2, Y pos +1 IH IX IY N gt.2,5 g EY.1,? g EY.2,? g TD.1,? g TD.2,? g T.1,? g T.2, g UW.1,? g UW.2,? 21 / / 120 Pop Quiz Scenrio: 1000 word voculry; 50 phonemes. vg. word length = 5 phones; two sttes per phoneme. Ech decision tree contins 100 leves on verge. Word modeling: one HMM per word. How mny GMM s per word on verge? 10. How mny GMM s in whole system? 10,000. Phonetic modeling, CI: one HMM per phoneme. How mny GMM s per phoneme? 2. How mny GMM s in whole system? 100. Phonetic modeling, CD: mny HMM s per phoneme. How mny GMM s per phoneme? How mny GMM s in whole system? Size Mtters Typicl model sizes: GMM s/ type HMM stte GMM s Gussins word per word k CI phone per phone k k CD phone per phone k 10k 10k 00k 0d feture vectors 80 prmeters/gussin. Big models cn hve tens of millions of prmeters. 2 / / 120

7 Recp Word modeling doesn t scle. Don t shre dt etween words. Some words hve lots of dt; other very little. Cn t model corticultion cross words. Phonetic modeling scles. Shre dt etween words; prmeter tying. Every phoneme hs lots of dt... But some lots more thn others. Context-dependent phonetic modeling. Models corticultion, including cross-word. More dt more leves more prmeters. Cn spred dt evenly cross GMM s. Discussion CD phonetic modeling with decision trees. Stte of the rt since erly 1990 s. No serious chllenger on horizon? triphone model ±1 phones of context. quinphone model ±2 phones of context. Longer context mkes decoding much hrder! Bsic issue: prmeter tying. Ech stte for ech phoneme hs own decision tree. Ech lef in ech decision tree hs own GMM. Shre lef GMM cross ll words contining lef. Wht re other possile schemes? 25 / / 120 Where re We? 1 coustic Modeling for LVCSR 2 The Locl Mxim Prolem Recipes for LVCSR Trining Trining Prmeter Estimtion Likelihood of trining dt is function of prmeter vlues. Trnsition proilities. GMM s: mixture weights; mens nd vrinces. Find prmeter vlues to mximize likelihood. Tool: Forwrd-Bckwrd lgorithm. Given initil vlues, itertively djust prmeters... To improve likelihood. i.e., find closest locl mximum to strt. Discussion 27 / / 120

8 Smll Voculry Trining L 2 Phse 1: Flt strt. Initilize ll Gussin mens to 0, vrinces to 1. Phse 2: Run Forwrd-Bckwrd lgorithm to convergence. Phse : Profit! Lrge Voculry Trining Wht s chnged? L 2: <2500 prmeters. Lrge voculry: up to 10M+ prmeters. Relisticlly, cn t do simple hill-climing serch... On 10M+ prmeters nd find good locl mximum. It s mircle it works with 2500 prmeters. 29 / / 120 Hill Climing nd Locl Mxim FB finds nerest mximum to initil prmeters. With d strting point, finl model will e grge. How to find good strting point? Where Do Locl Mxim Come From? ML estimtion for non-hidden models is esy. e.g., non-hidden HMM s; Gussins; multinomils. Count nd normlize; no serch necessry. Prolem must e hidden vriles! likelihood likelihood prmeter vlues prmeter vlues 1 / / 120

9 Wht re The Hidden Vriles? Hidden Vriles nd Locl Mxim P ω (x) = pths T p t p t,j t=1 comp j dim d N (x t,d ; µ t,j,d, σ 2 t,j,d) ssume ech GMM hs single component not hidden. Let s ssign vlues to every hidden vrile... In whole trining set. i.e., which GMM genertes ech frme. Look for sums or mx s. Pth through HMM which GMM/stte t ech frme. Which component in ech GMM t ech frme. g EY.1 gey.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 g EY.1 g EY.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 frme GMM EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... Cll hidden ssignment over whole corpus n lignment. / 120 / 120 lignments nd Prmeter Initiliztion Fixing lignment mking corpus non-hidden. Esy to do ML estimtion of prmeters. Like Viteri-style trining in L 2. i.e., cn use lignment to initilize prmeters. Dt used to trin given GMM comes from... ll frmes ligned to tht GMM. If seed prmeters using d lignment... Wrong dt used to trin GMM s. Prmeters ner d mximum? If seed prmeters using good lignment... Right dt used to trin GMM s. Prmeters ner good mximum? Exmple: Good nd Bd lignments g EY.1 gey.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 g EY.1 g EY.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 Good lignment mtches truth. GMM models wht it s supposed to e modeling. e.g., GMM ssocited with first stte of TD-EY+T... ligns to initil frmes of TD in this context. frme truth EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... hyp EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... Bd lignment doesn t mtch truth. frme truth EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... hyp EY.1 EY.2 EY.2 TD.1 TD.1 TD / / 120

10 Prmeter Initiliztion Key to finding good strting point for FB: Need good lignment to seed prmeters! Point: if hve existing good model... Use model to compute (Viteri) lignment. Use lignment to ootstrp nother model. Repet to uild more nd more complex models! Where to get first good model? Where does FB with flt strt ctully work!? Build lots of incrementlly more complex models... Or go stright from initil model to finl model? The Bsic Pln Step 1: Build CI model with 1 Gussin/GMM. Know flt strt + FB works! Step 2: Build CI model with 2 Gussins/GMM. Seed using lignment from lst system; run FB Step k: Build CD model with 128 Gussins/GMM. Seed using lignment from lst system; run FB. 7 / / 120 Wys to Seed Next Model From Lst One Vi lignment. Do Viteri-style trining for next model... Using Viteri lignment computed using lst model. frme GMM EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... Vi prmeters. Seed prmeters of next model so... Viteri lignment is sme (or close) s for lst model. e.g., GMM splitting (clone ech Gussin, pertur). e.g., CI CD GMM s (clone ech CI GMM). Recp For models with millions of prmeters... Flt strt nd FB just doesn t cut it. Locl mxim due to hidden vriles. i.e., spce of possile lignments. If hve good lignment... Cn initilize prmeters so ner good mximum. Key ide: use simple models to ootstrp... Incrementlly more complex models. More gory detils to follow. 9 / / 120

11 Where re We? 1 coustic Modeling for LVCSR 2 The Locl Mxim Prolem Overview of Trining Process Strt: CI, GMM s contin single component. End: CD, GMM s contin 128 components, sy. How to get here from there? More thn one wy. Let s go through one recipe, strt to finish. Recipes for LVCSR Trining Discussion 1 / / 120 Step 0: Prerequisites Dt. Utternces with trnscripts. Pronuncition/seform dictionry. Questions to sk in phonetic decision tree. Decisions. For ech phoneme, HMM topology/size. Numer of components in GMM s. Period. The Pronuncition Dictionry Need pronuncition of every word in trining dt. Without pronuncition, cn t uild HMM for word. Words my hve multiple pronuncitions. THE(01) DH H THE(02) DH IY Where to get seforms for new words? sk linguist? (We fired them.) Where else? / 120 / 120

12 Step 1: CI, 1 component/gmm Flt strt. Trnsition proilities, mixture weights uniform. Gussin mens 0, vrinces 1. Run FB to convergence (L 2). Before: lignments re grge. fter: lignments re resonle (ut flwed). Step 2: CI, 2 components/gmm Split Gussins 2 components/gmm. Run unch of itertions of FB. Split Gussins components/gmm. Run unch of itertions of FB. Split Gussins 8 components/gmm. Run unch of itertions of FB. Split Gussins 16 components/gmm. Run unch of itertions of FB. 5 / / 120 Exmple: Gussin Splitting Trin single Gussin vi Forwrd-Bckwrd. Exmple: Gussin Splitting Split ech Gussin in two (±0.2 σ) 7 / / 120

13 Exmple: Gussin Splitting Run FB for few itertions. Exmple: Gussin Splitting Split ech Gussin in two (±0.2 σ) 9 / / 120 Exmple: Gussin Splitting Run FB for few itertions. There is lso k-mens Use centers s mens of Gussins; trin / / 120

14 The Finl Mixtures, Splitting vs. k-mens Step : Select Pronuncition Vrints Reference trnscript doesn t tell you everything. Missing silence, filled puses (e.g., UH). Doesn t tell you which pronuncition... For words with multiple pronuncitions. e.g., whether THE pronounced DH H or DH IY. THE(01) DH H THE(02) DH IY / / 120 Hndling ll Possile lterntives In theory, optionl silence, multiple pronuncitions... No prolem! Just uild pproprite HMM. Consider ll possile pths over whole trining process. ~SIL(01) THE(01) THE(02) ~SIL(01) DOG(01) DOG(02) DOG(0) ~SIL(01) In prctice, pinful. Expensive computtionlly. Building trining HMM with CD models tricky. Wht To Do? Solution: nil down exct trnscript. ~SIL(01) THE(01) DOG(02) ~SIL(01) Once model sufficiently good, compute Viteri pth. Identify pronuncitions (nd silences) long pth. Fix exct trnscript for reminder of trining. Or recompute periodiclly. 55 / / 120

15 Step : Select Pronuncition Vrints Run Viteri lgorithm on trining set. Compute exct trnscript for ech utternce. Run unch of itertions of FB. Step : Building Phonetic Decision Trees Gol: uild phonetic decision tree... For ech stte in ech phone HMM ( 150 totl). e.g.,.1,.2,., E.1,... Wht do we need? Dt ligned to ech phone HMM stte. List of cndidte questions. 57 / / 120 Trining Dt for Decision Trees Run Viteri lgorithm. For ech frme, identify which feture vector,... Which GMM/HMM stte, nd phonetic context. g EY.1 gey.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 g EY.1 g EY.2 g TD.1 g TD.2 g T.1 g T.2 g UW.1 g UW.2 frme GMM EY.1 EY.1 EY.2 EY.2 EY.2 TD.1... Building (Triphone) Tree Input: list of triples ( x i, p L,i, p R,i ). t ech node on frontier of tree: Choose question of form... Does phone in position j elong to set q?... Optimizing i P( x i lef(p L,i, p R,i ))... Where ech lef distriution is single Gussin. Cn efficiently uild whole level of tree in single pss. See Lecture 6 slides nd redings for gory detils. e.g., feture vector x 5 used to trin tree for TD.1. (Triphone) context is -EY+T. Dt for tree is list of triples ( x, p L, p R ); e.g., (x 5, EY, T). 59 / / 120

16 The List of Cndidte Questions Exmple Questions Creted y linguist mny decdes go. Pssed down from mother to dughter, fther to son. Corresponds to phonetic concepts. e.g., vowel? dipthong? frictive? nsl? etc. Ech question represented s set of phones. Does phoneme elong to set of not? E... ZH O OY X IH OW UW SH ZH S Z E EH EY B D G F HH TH CH JH K P T DH V M N NG ER R S TS Z F TH H O X EY IH IY CH JH SH ZH IY Y DH F TH V 61 / 120 L W / 120 Exmple Output Step : Building Phonetic Decision Trees pos +1 XR ER R N Build phonetic decision tree for ech phone stte. Before: one (CI) GMM per phone stte. fter: one (CD) GMM per lef for ech phone stte. Seed CD GMM s y cloning originl CI GMM. pos -1 B D G K P T Y pos -1 B BD CH D DD DH... Initilly, sme Viteri lignment s CI model. In computing likelihood, replce CI with CD GMM... But these re identicl. Run unch of itertions of FB. Y N Y N go.2,1 go.2,2 go.2, go.2, 6 / / 120

17 Step 5: CD, 128 components/gmm Split Gussins 2 components/gmm. Run unch of itertions of FB. Split Gussins 6 components/gmm. Run unch of itertions of FB. Split Gussins 128 components/gmm. Run unch of itertions of FB. Recp Step 0: Collect dt. Mke seforms for ll words in reference trnscripts. Step 1: Build CI, 1 component/gmm model from flt strt. Step 2: Build CI, mny component GMM model. Repeted Gussin splitting. Step : Find exct trnscripts, pronuncition vrints. Viteri lgorithm. Step : Build phonetic decision tree. From lignment creted y CI model. Step 5: Build CD, mny component GMM model. Repeted Gussin splitting. 65 / / 120 Discussion One of mny possile recipes. Trining is complicted, multi-step process. Motifs. Seed complex model using simpler model. Run lots of Forwrd-Bckwrd. Where re We? 1 coustic Modeling for LVCSR 2 The Locl Mxim Prolem Recipes for LVCSR Trining Discussion 67 / / 120

18 LVCSR Trining Doesn t Require Much Dt. Utternces with trnscripts. Pronuncition/seform dictionry. Questions to sk in phonetic decision tree. lgorithms. Viteri; Forwrd-Bckwrd. Decision-tree uilding. lmost sme s in smll voculry. Trining Is n rt Hidden model trining frught with locl mxim. Seed more complex models with simpler models. Incrementlly improve lignments; void d mxim. Recipes developed over decdes. Discovered vi swet nd ters. No one elieves these find glol mxim. How well recipe works depends on dt? 69 / / 120 Speeding Up Trining Requires mny, mny itertions of Forwrd-Bckwrd. Full Forwrd-Bckwrd trining. Compute posterior of ech lignment. Collect counts over ll possile lignments. Viteri-style trining. Pick single lignment, e.g., using Viteri. Collect counts over single lignment. Both vlid gurnteed to increse (Viteri) likelihood. When To Use One or the Other? Use Viteri-style when cn cheper. Optimiztion: need not relign every itertion. Intuitively, full FB my find etter mxim... But if posteriors very shrp, do lmost sme thing. Rememer exmple posteriors in L 2? Rule of thum: When first trining new model, use full FB. Once locked in to locl mximum, Viteri is fine. 71 / / 120

19 Bootstrpping One Model From nother Bootstrp complex model from simpler model... Using lignment computed from simpler model. Point: models need not e of sme form! Cn use WSJ model to ootstrp Switchord model. Cn use triphone model to ootstrp quinphone model. Cn use GMM/HMM model to ootstrp DBN model. Requirement: sme phonemes, sttes per phoneme. Whew, Tht Ws Pretty Complicted! The tip of the iceerg. dpttion (VTLN, fmllr, mmllr). Discrimintive trining (LD, MMI, MPE, fmpe). Model comintion (cross dpttion, ROVER). 7 / / 120 Things Cn Get Pretty Hiry How Long Does Trining Tke? 100-est rescoring VTLN MFCC 8.5% 9.% 7.7% 8.7% MMI-ST ML-ST-L ML-ST MMI-ST ML-ST-L ML-ST 1.6% 2.1% 0.9% 1.9% MMI-D 2.6% 5.6% MFCC-SI 8.1% 8.7% 6.7% ML-D-L ML-D MMI-D 0.% 1.0% 29.8% 5.9% Evl 98 WER (SWB only) 8.% Evl 01 WER ML-D-L ML-D 7.1% 100-est 8.1% 100-est 5.9% 100-est 6.9% 0.1% rescoring 0.5% rescoring 29.5% rescoring 0.1% PLP VTLN 1.6%.% 7.9% 0.8% It s secret. Mesure in terms of rel-time fctor. How mny hours to process one hour of speech? If 1,000 hours of speech, 10x rel time... How mny dys to trin on one mchine? Prlleliztion is key. Dt prlleliztion: collect FB counts on 1 th corpus. k Sum FB counts efore prmeter reestimtion. -grm rescoring -grm rescoring -grm rescoring -grm rescoring -grm rescoring Consensus Consensus Consensus Consensus Consensus -grm rescoring -grm rescoring 5.7% 29.2% -grm rescoring -grm rescoring -grm rescoring Consensus Consensus Consensus Consensus Consensus 6.5% 8.1% 7.2% 5.5% 5.2% 7.7% 6.% 29.9% 1.1% 0.2% 28.8% 28.7% 1.% 29.2% ROVER.0% 27.8% 75 / / 120

20 Recp In theory, trining involves simple lgorithms. In prctice, trining is insnely complicted... For stte-of-the-rt systems. dministrivi Cler (6); mostly cler (). Pce: OK (5), slow (2). Muddiest: dcs trees nd Gussins (2); dcs trees nd HMM s (2); criterion for constructing dcs trees (1). Feedck (2+ votes): More info on reding project (2). fll12/e6870/redings/project_f12.html (sme pssword s redings). Don t need to worry out this yet. 77 / / 120 dministrivi L 2, L. Not grded yet; hnded ck next lecture. nswers: /user1/fculty/stnchen/e6870/l2_ns/. L. Postponed ecuse mteril not covered yet. Will nnounce when l posted + new due dte. Mke-up lecture. Wht dys cn you mke it (sme time)? Working on setups for non-reding projects. Prt II Segue: Intro to LVCSR Decoding 79 / / 120

21 eight two nine one three four ve six zero seven Decoding for LVCSR Now know how to uild models for LVCSR: n-grm LM s P(ω) vi counting nd smoothing. CD coustic models P ω (x) vi complex recipes. This prt: given test udio x, how to compute... Most likely word sequence ω. ω = rg mx ω P(ω x) = rg mx ω Initilly, let s ignore efficiency. How to do this conceptully? P(ω)P ω (x) Decoding: Smll Voculry Tke (H)MM representing llowle word sequences/lm. one two three Replce ech word with corresponding HMM. HMMone HMM two HMM three Run Viteri lgorithm! 81 / / 120 Cn We Do Sme Thing for LVCSR? 1 Cn we express LM s (H)MM? 2 How to expnd word HMM to full HMM? Grph not too ig? Not too slow to decode? Issue 1: Is n-grm Model n (H)MM? Yup; n-grm model is Mrkov model of order n 1. Exmple: trigrm model P(w i w i 2 w i 1 ). One stte for ech history w i 2 w i 1. rrive here iff lst two words re w i 2, w i 1. Ech stte w i 2 w i 1 hs outgoing rc for every w i... To stte w i 1 w i with proility P(w i w i 2 w i 1 ). For ech word sequence w 1,..., w L... Single pth through HMM with totl proility P(w 1,..., w L ) = i P(w i w i 2 w i 1 ) 8 / / 120

22 Trigrm LM, Morse Code, Bsic Structure Trigrm LM, Morse Code, With Proilities /P (j ) /P (j ) /P (j ) /P (j ) /P (j ) /P (j ) /P (j ) /P (j ) 85 / / 120 Pop Quiz How mny sttes in HMM representing trigrm model... With voculry size V? How mny rcs? Issue 2: Grph Expnsion Trining: only single word sequence, e.g., EIGHT TWO. EY TD T UW EY-j+TD TD-EY+T T-TD+UW UW-T+j g EY.1,9 gey.2,2 g TD.1,6 g TD.2,7 g T.1,15 g T.2, g UW.1, g UW.2,1 g EY.1,9 g EY.2,2 g TD.1,6 g TD.2,7 g T.1,15 g T.2, g UW.1, g UW.2,1 87 / / 120

23 Context-Dependent Grph Expnsion Decoding: mny possile word sequences. CD expnsion: hndling rnch points is tricky. Other issues: single-phoneme words; quinphone models. Issue: How Big The Grph? Trigrm model (e.g., voculry size V = 2) T TWO UW ONE W H W-N+H UW-T+T N-H+W N-H+T T-N+UW T-UW+UW H-W+N UW-T+W W-UW+H N V word rcs in FS representtion. Sy words re phones = 12 sttes on verge. If V = 50000, sttes in grph. PC s hve ytes of memory. 89 / / 120 Issue: How Slow Decoding? In ech frme, loop through every stte in grph. If 100 frmes/sec, sttes... How mny cells to compute per second? PC s cn do floting-point ops per second. Recp: Smll vs. Lrge Voculry Decoding In theory, cn use sme exct techniques. In prctice, three ig prolems: Context-dependent grph expnsion is complicted. Decoding grphs wy too ig. Decoding wy too slow. How cn we hndle this? Next week: Finite-stte mchines. How to mke decoding efficient. 91 / / 120

24 eight two nine one three four ve six zero seven Prt III Finite-Stte Mchines View of Grph Expnsion Step 1: Tke word grph s input. Convert into phone grph. Step 2: Tke phone grph s input. Convert into context-dependent phone grph. Step : Tke context-dependent phone grph. Convert into finl HMM. Gol: wnt frmework for... 1 Representing grphs. 2 Trnsforming grphs. 9 / / 120 View of Grph Expnsion T TWO UW ONE W H N UW-T+T N-H+W N-H+T T-N+UW T-UW+UW Frmework for Rewriting Grphs How to represent grphs? HMM s finite-stte cceptors (FS s)! How to represent grph trnsformtions? Finite-stte trnsducers (FST s)! Wht opertion pplies trnsformtions to grphs? Composition! W-N+H H-W+N UW-T+W W-UW+H 95 / / 120

25 Where re We? 1 The Bsics 2 Composition Wht is Finite-Stte cceptor? It s like n HMM, ut without proilities. It hs sttes. Exctly one initil stte; one or more finl sttes. It hs rcs. Ech rc hs lel, which my e empty (ɛ). c 97 / / 120 Wht Does n FS Men? The (possily infinite) list of strings it ccepts. i.e., strings tht lel pth from initil to finl stte. Mening:,, c. Pop Quiz re these equivlent? i.e., do they hve sme mening? c Mening:,,,,... Things tht don t ffect mening. How lels re distriuted long pth. Invlid pths. 99 / / 120

26 Wht is Finite-Stte Trnsducer? It s like finite-stte cceptor, except... Ech rc hs two lels insted of one. n input lel (possily empty). n output lel (possily empty). c:c Wht Does n FST Men? (possily infinite) list of pirs of strings... n input string nd n output string. Mening: (, ), (, B), (c, C). : :B c:c : : : Mening: (ɛ, ɛ), (, ), (, ), (, ),... : : 101 / / 120 Wht is Composition? pplying FST T to FS to crete new FS T. If α nd (α, β) T, then β T. hs mening:,, c. T hs mening: (, ), (, B), (c, C). : c :B Recp Finite-stte cceptor (FS): one lel on ech rc. Finite-stte trnsducer (FST): two lels on ech rc. Finite-stte mchine (FSM): FS or FST. lso, finite-stte utomton. FST s cn e used to trnsform FS s vi composition. The point: cn express ech stge in grph expnsion... s pplying FST vi composition. c:c T hs mening:, B, C. B C 10 / / 120

27 Where re We? 1 The Bsics 2 Composition The Composition Opertion simple nd efficient lgorithm for computing... Result of pplying trnsducer to cceptor. Wht cn composition do? 105 / / 120 Rewriting Single String Single Wy Rewriting Single String Single Wy 1 2 d 1 2 d : 1 2 T :B d:d T d:d c:c :B : T B D 1 2 T B D 107 / / 120

28 Trnsforming Single String Let s sy hve string, e.g., THE DOG Let s sy wnt to pply one-to-one trnsformtion. e.g., mp words to their (single) seforms. DH H D O G This is esy, e.g., use sed or perl or... The Mgic of FST s nd Composition Let s sy hve (possily infinite) list of strings... Expressed s n FS, s this is compct. How to trnsform ll strings in FS in one go? How to do one-to-mny or one-to-zero trnsformtions? Cn we express (possily infinite) list of output strings... s (compct) FS? Fst? 109 / / 120 Rewriting Mny Strings t Once Rewriting Single String Mny Wys 1 T d:d c:c :B : 1 c d d 1 2 T :B : : : 1 2 T 1 B B T 1 C D 2 5 D B / / 120

29 Rewriting Some Strings Zero Wys Computing Composition: The Bsic Ide 1 d 2 5 For every stte s, t T, crete stte (s, t) T... Corresponding to eing in sttes s nd t t sme time. Mke rcs in intuitive wy. 6 : T 1 5 T / / 120 Exmple Computing Composition: More Formlly 1 2 For now, pretend no ɛ-lels. For every stte s, t T, crete stte (s, t) T. : 1 2 T 1, 2, :B, Crete rc from (s 1, t 1 ) to (s 2, t 2 ) with lel o iff... There is rc from s 1 to s 2 in with lel i nd... There is rc from t 1 to t 2 in T with lel i : o. T 1,2 2,2 B,2 (s, t) is initil iff s nd t re initil; similrly for finl sttes. (Remove rcs nd sttes tht re unrechle.) Wht is time complexity? 1,1 2,1,1 Optimiztion: strt from initil stte, uild outwrd. 115 / / 120

30 nother Exmple Composition nd ɛ-trnsitions 1 : 2 Bsic ide: cn tke ɛ-trnsition in one FSM... Without moving in other FSM. Tricky to do exctly right. Do redings if you cre: (Pereir, Riley, 1997) T 1 :B 2 : <epsilon> 1 2, T B 1 <epsilon>:b 2 : B:B : eps 1, 2,, B B B T 1,1 2,2,1 1,2 2,1,2 T 1,2 eps 2,2,2 B B B 1,1 eps 2,1,1 117 / / 120 Recp FST s cn express wide rnge of string trnsformtions. Composition lets us efficiently... pply FST to ll strings in FS in one go! FSM Toolkits T&T FSM toolkit OpenFST; lots of others. Implements composition, lots of finite-stte opertions. syntx for specifying FS s nd FST s, e.g., 1 2 C 2 B C 1 2 B 119 / / 120

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

Bayesian Networks: Approximate Inference

Bayesian Networks: Approximate Inference pproches to inference yesin Networks: pproximte Inference xct inference Vrillimintion Join tree lgorithm pproximte inference Simplify the structure of the network to mkxct inferencfficient (vritionl methods,

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Today. Recap: Reasoning Over Time. Demo Bonanza! CS 188: Artificial Intelligence. Advanced HMMs. Speech recognition. HMMs. Start machine learning

Today. Recap: Reasoning Over Time. Demo Bonanza! CS 188: Artificial Intelligence. Advanced HMMs. Speech recognition. HMMs. Start machine learning CS 188: Artificil Intelligence Advnced HMMs Dn Klein, Pieter Aeel University of Cliforni, Berkeley Demo Bonnz! Tody HMMs Demo onnz! Most likely explntion queries Speech recognition A mssive HMM! Detils

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Section 4: Integration ECO4112F 2011

Section 4: Integration ECO4112F 2011 Reding: Ching Chpter Section : Integrtion ECOF Note: These notes do not fully cover the mteril in Ching, ut re ment to supplement your reding in Ching. Thus fr the optimistion you hve covered hs een sttic

More information

Today. CS 188: Artificial Intelligence. Recap: Reasoning Over Time. Particle Filters and Applications of HMMs. HMMs

Today. CS 188: Artificial Intelligence. Recap: Reasoning Over Time. Particle Filters and Applications of HMMs. HMMs CS 188: Artificil Intelligence Prticle Filters nd Applictions of HMMs Tody HMMs Prticle filters Demo onnz! Most-likely-explntion queries Instructors: Jco Andres nd Dvis Foote University of Cliforni, Berkeley

More information

Interpreting Integrals and the Fundamental Theorem

Interpreting Integrals and the Fundamental Theorem Interpreting Integrls nd the Fundmentl Theorem Tody, we go further in interpreting the mening of the definite integrl. Using Units to Aid Interprettion We lredy know tht if f(t) is the rte of chnge of

More information

EE273 Lecture 15 Asynchronous Design November 16, Today s Assignment

EE273 Lecture 15 Asynchronous Design November 16, Today s Assignment EE273 Lecture 15 Asynchronous Design Novemer 16, 199 Willim J. Dlly Computer Systems Lortory Stnford University illd@csl.stnford.edu 1 Tody s Assignment Term Project see project updte hndout on we checkpoint

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

CS 188: Artificial Intelligence Fall Announcements

CS 188: Artificial Intelligence Fall Announcements CS 188: Artificil Intelligence Fll 2009 Lecture 20: Prticle Filtering 11/5/2009 Dn Klein UC Berkeley Announcements Written 3 out: due 10/12 Project 4 out: due 10/19 Written 4 proly xed, Project 5 moving

More information

Lecture 2e Orthogonal Complement (pages )

Lecture 2e Orthogonal Complement (pages ) Lecture 2e Orthogonl Complement (pges -) We hve now seen tht n orthonorml sis is nice wy to descrie suspce, ut knowing tht we wnt n orthonorml sis doesn t mke one fll into our lp. In theory, the process

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom

Continuous Random Variables Class 5, Jeremy Orloff and Jonathan Bloom Lerning Gols Continuous Rndom Vriles Clss 5, 8.05 Jeremy Orloff nd Jonthn Bloom. Know the definition of continuous rndom vrile. 2. Know the definition of the proility density function (pdf) nd cumultive

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

Solution for Assignment 1 : Intro to Probability and Statistics, PAC learning

Solution for Assignment 1 : Intro to Probability and Statistics, PAC learning Solution for Assignment 1 : Intro to Probbility nd Sttistics, PAC lerning 10-701/15-781: Mchine Lerning (Fll 004) Due: Sept. 30th 004, Thursdy, Strt of clss Question 1. Bsic Probbility ( 18 pts) 1.1 (

More information

Fingerprint idea. Assume:

Fingerprint idea. Assume: Fingerprint ide Assume: We cn compute fingerprint f(p) of P in O(m) time. If f(p) f(t[s.. s+m 1]), then P T[s.. s+m 1] We cn compre fingerprints in O(1) We cn compute f = f(t[s+1.. s+m]) from f(t[s.. s+m

More information

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary Outline Genetic Progrmming Evolutionry strtegies Genetic progrmming Summry Bsed on the mteril provided y Professor Michel Negnevitsky Evolutionry Strtegies An pproch simulting nturl evolution ws proposed

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

Surface maps into free groups

Surface maps into free groups Surfce mps into free groups lden Wlker Novemer 10, 2014 Free groups wedge X of two circles: Set F = π 1 (X ) =,. We write cpitl letters for inverse, so = 1. e.g. () 1 = Commuttors Let x nd y e loops. The

More information

Section 6: Area, Volume, and Average Value

Section 6: Area, Volume, and Average Value Chpter The Integrl Applied Clculus Section 6: Are, Volume, nd Averge Vlue Are We hve lredy used integrls to find the re etween the grph of function nd the horizontl xis. Integrls cn lso e used to find

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

Lecture 1: Introduction to integration theory and bounded variation

Lecture 1: Introduction to integration theory and bounded variation Lecture 1: Introduction to integrtion theory nd bounded vrition Wht is this course bout? Integrtion theory. The first question you might hve is why there is nything you need to lern bout integrtion. You

More information

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17 EECS 70 Discrete Mthemtics nd Proility Theory Spring 2013 Annt Shi Lecture 17 I.I.D. Rndom Vriles Estimting the is of coin Question: We wnt to estimte the proportion p of Democrts in the US popultion,

More information

Lecture 2: January 27

Lecture 2: January 27 CS 684: Algorithmic Gme Theory Spring 217 Lecturer: Év Trdos Lecture 2: Jnury 27 Scrie: Alert Julius Liu 2.1 Logistics Scrie notes must e sumitted within 24 hours of the corresponding lecture for full

More information

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique? XII. LINEAR ALGEBRA: SOLVING SYSTEMS OF EQUATIONS Tody we re going to tlk out solving systems of liner equtions. These re prolems tht give couple of equtions with couple of unknowns, like: 6= x + x 7=

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificil Intelligence Spring 2007 Lecture 3: Queue-Bsed Serch 1/23/2007 Srini Nrynn UC Berkeley Mny slides over the course dpted from Dn Klein, Sturt Russell or Andrew Moore Announcements Assignment

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

Where did dynamic programming come from?

Where did dynamic programming come from? Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus 7.1 Integrl s Net Chnge nd 7. Ares in the Plne Clculus 7.1 INTEGRAL AS NET CHANGE Notecrds from 7.1: Displcement vs Totl Distnce, Integrl s Net Chnge We hve lredy seen how the position of n oject cn e

More information

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms The Minimum Lel Spnning Tree Prolem: Illustrting the Utility of Genetic Algorithms Yupei Xiong, Univ. of Mrylnd Bruce Golden, Univ. of Mrylnd Edwrd Wsil, Americn Univ. Presented t BAE Systems Distinguished

More information

Uninformed Search Lecture 4

Uninformed Search Lecture 4 Lecture 4 Wht re common serch strtegies tht operte given only serch problem? How do they compre? 1 Agend A quick refresher DFS, BFS, ID-DFS, UCS Unifiction! 2 Serch Problem Formlism Defined vi the following

More information

Linear Inequalities. Work Sheet 1

Linear Inequalities. Work Sheet 1 Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges $ 15 per week plus $ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend

More information

LECTURE NOTE #12 PROF. ALAN YUILLE

LECTURE NOTE #12 PROF. ALAN YUILLE LECTURE NOTE #12 PROF. ALAN YUILLE 1. Clustering, K-mens, nd EM Tsk: set of unlbeled dt D = {x 1,..., x n } Decompose into clsses w 1,..., w M where M is unknown. Lern clss models p(x w)) Discovery of

More information

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system Hyrid Control nd Switched Systems Lecture #2 How to descrie hyrid system? Forml models for hyrid system João P. Hespnh University of Cliforni t Snt Brr Summry. Forml models for hyrid systems: Finite utomt

More information

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

SUMMER KNOWHOW STUDY AND LEARNING CENTRE SUMMER KNOWHOW STUDY AND LEARNING CENTRE Indices & Logrithms 2 Contents Indices.2 Frctionl Indices.4 Logrithms 6 Exponentil equtions. Simplifying Surds 13 Opertions on Surds..16 Scientific Nottion..18

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

More information

Reinforcement learning II

Reinforcement learning II CS 1675 Introduction to Mchine Lerning Lecture 26 Reinforcement lerning II Milos Huskrecht milos@cs.pitt.edu 5329 Sennott Squre Reinforcement lerning Bsics: Input x Lerner Output Reinforcement r Critic

More information

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

Chapter 5 Plan-Space Planning

Chapter 5 Plan-Space Planning Lecture slides for Automted Plnning: Theory nd Prctice Chpter 5 Pln-Spce Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Stte-Spce Plnning Motivtion g 1 1 g 4 4 s 0 g 5 5 g 2

More information

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 9 1. (4pts) ((p q) (q r)) (p r), prove tutology using truth tles. p

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

Exam 2 Solutions ECE 221 Electric Circuits

Exam 2 Solutions ECE 221 Electric Circuits Nme: PSU Student ID Numer: Exm 2 Solutions ECE 221 Electric Circuits Novemer 12, 2008 Dr. Jmes McNmes Keep your exm flt during the entire exm If you hve to leve the exm temporrily, close the exm nd leve

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

2 b. , a. area is S= 2π xds. Again, understand where these formulas came from (pages ).

2 b. , a. area is S= 2π xds. Again, understand where these formulas came from (pages ). AP Clculus BC Review Chpter 8 Prt nd Chpter 9 Things to Know nd Be Ale to Do Know everything from the first prt of Chpter 8 Given n integrnd figure out how to ntidifferentite it using ny of the following

More information

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS. THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

Chapter 0. What is the Lebesgue integral about?

Chapter 0. What is the Lebesgue integral about? Chpter 0. Wht is the Lebesgue integrl bout? The pln is to hve tutoril sheet ech week, most often on Fridy, (to be done during the clss) where you will try to get used to the ides introduced in the previous

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

Special Relativity solved examples using an Electrical Analog Circuit

Special Relativity solved examples using an Electrical Analog Circuit 1-1-15 Specil Reltivity solved exmples using n Electricl Anlog Circuit Mourici Shchter mourici@gmil.com mourici@wll.co.il ISRAE, HOON 54-54855 Introduction In this pper, I develop simple nlog electricl

More information

332:221 Principles of Electrical Engineering I Fall Hourly Exam 2 November 6, 2006

332:221 Principles of Electrical Engineering I Fall Hourly Exam 2 November 6, 2006 2:221 Principles of Electricl Engineering I Fll 2006 Nme of the student nd ID numer: Hourly Exm 2 Novemer 6, 2006 This is closed-ook closed-notes exm. Do ll your work on these sheets. If more spce is required,

More information

Linear Systems with Constant Coefficients

Linear Systems with Constant Coefficients Liner Systems with Constnt Coefficients 4-3-05 Here is system of n differentil equtions in n unknowns: x x + + n x n, x x + + n x n, x n n x + + nn x n This is constnt coefficient liner homogeneous system

More information

Hidden Markov Models

Hidden Markov Models Hidden Mrkov Models Huptseminr Mchine Lerning 18.11.2003 Referent: Nikols Dörfler 1 Overview Mrkov Models Hidden Mrkov Models Types of Hidden Mrkov Models Applictions using HMMs Three centrl problems:

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

5: The Definite Integral

5: The Definite Integral 5: The Definite Integrl 5.: Estimting with Finite Sums Consider moving oject its velocity (meters per second) t ny time (seconds) is given y v t = t+. Cn we use this informtion to determine the distnce

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information