Efficient Solutions for the Complement of ww R and the Complement of ww

Size: px
Start display at page:

Download "Efficient Solutions for the Complement of ww R and the Complement of ww"

Transcription

1 Effcent Solutons for the Complement of ww R and the Complement of ww Allaoua Refouf Computer Scence Department Unversty of Sétf Algéra allaouarefouf@unv-setfdz Journal of Dgtal Informaton Management ABSTRACT: In ths paper we propose a new approach to tackle the problem of fndng effcent non determnstc solutons for the complement of the language L 1 = { ww R / w {0, 1}*} (the even length non palndromes) and the complement of the type 0 language (recursvely enumerable) L 2 = {ww / w {0, 1}*} The solutons provded are very elegant and make a subtle use of non determnsm We show that these languages are context free languages by desgnng non determnstc pushdown automaton that accepts them Categores and Subject Descrptors I13 Languages and Systems; F42 [Grammars and Other Rewrtng Systems] Grammar types General Terms: Language Analyss, Non-Palndromes Keywords: Context Free Languages, Pushdown Automaton, Non- Determnsm, Even Length Non Palndromes Receved: 18 July 2014, Revsed 3 September 2014, Accepted 12 September Introducton Formalsms descrbng language classes located between determnstc context free languages (CFL) and non determnstc context free languages have been ntensvely studed for many years One of the motvatons was to fnd famles wth acceptable computatonal complextyand suffcent expressveness, as well as havng natural characterzatons by grammars and machne models In what follows we prove that the languages L 1 and L 2 (defned below) are context free by desgnng non determnstc pushdown automaton that accepts them Let L 1 = {ww R / w {0, 1}*} and L 2 ={ww / w {0, 1}*} L 1 s a context free language and L 2 s a language of type 0 accordng to the Chomsky herarchy L 1 s known as the even length palndromes Accordng to the notaton adopted, the language L 1 s the complement of the even length palndrome language, t s also known as the language of even length non palndromes L 2 s the complement of the language L 2 Palndromes are symmetrc strngs that read the same forward and backward, for example the strng radar s a non even length palndrome, whle the strng elle s an even length palndrome Formally, a non-empty strng w s a palndrome f w = w R, where w R denotes the strng w reversed It s convenent to dstngush between even length palndromes that are strngs of the form ww R and odd length palndromes that are strngs of the form waw R, where a s a sngle alphabet symbol The paper s organzed as follows In the followng sectons we present some basc notons and defntons used n formal language theory In chapter II we show that the complement of the language ww R s context free by Journal of Dgtal Informaton Management Volume 12 Number 6 December

2 desgnng a non determnstc fnte pushdown automaton that accepts t In chapter III we prove a smlar result for the complement of the language ww Fnally we conclude our paper and pont out some future drectons of research 11 Prelmnares A word or strng over an alphabet Σ can be any fnte sequence of characters or symbols The set of all words over an alphabet Σ s usually denoted by Σ * (usng the Kleene star notaton, [1]) The length of a word s the number of symbols or letters t s composed of For any alphabet there s only one word of length 0, the empty word, whch s often denoted by ε or λ By concatenaton one can combne two words to form a new word, whose length s the sum of the lengths of the orgnal words A language L s any fnte subset of Σ * Unless stated otherwse we wll use lower case letters (a, b, c) to denote nput symbols, and upper case letters to denote stack symbols (X, Y, Z) Greek letters ndcated strngs of stack symbols Fnally u, v, w denote strngs of nput symbols Defnton 01 The complement L of a language L wth respect to a gven alphabet Σ conssts of all the strngs over the alphabet that do not belong to L It s defned by L = {x Σ / x L} Defnton 02 A non determnstc pushdown automaton or NPDA s a 7-tuple M = (Q, Σ,,, q 0, F) where: Q s a set of fnte states, Σ s the nput alphabet, s the stack alphabet whch may nclude Σ, s the transton functon, q 0 Q s the ntal state, Z 0 s the symbol at the bottom of the stack, whch s used to test whether the stack s empty or not F Q s a set of fnal states The transton functon for a NPDA has the form Q (Σ {λ}) fnte subsets of Q * where s a functon of three arguments The frst one s a state from Q, the second argument s ether λ or the current symbol from the nput alphabet The thrd argument s the current Ysymbol on top of the stack Thus we may wrte the transton functon as: (q, a, Z) = {( p 1, ), (p, ),, (p, )} n n When the nput symbol s from Σ, t s always consumed, that s the nput head moves one step to the rght When the nput symbol s set to λ the nput head does not move; ths move s termed a λ move In the determnstc case, when the functon s appled, the automaton moves to a new state q Q and pushes a new strng of symbols γ * onto the stack Snce we are dealng wth a nondetermnstc pushdown automaton, the result of applyng s a fnte set of (q, x) pars If we were to draw the automaton, each such par would be represented by a sngle arc As wth a fnte state automaton we do not need to specfy for every possble combnaton of arguments; when the transton functon s not explctly defned, t means that the machne enters a dead state and rejects [1, 2] Defnton 03 NPDA moves We dstngush two moves of the NPDA: a regular move when the nput head s advanced, and a λ move when the nput head s not advanced ) The nterpretaton of: where q and p are states; a an nput symbol from Σ, and Z a stack symbol from, s that the NPDA n state q wth the nput symbol a and Z the symbol on top of the stack, can for any enter state p, replace the symbol Z by the strng, and advance the nput head one symbol to the rght We wll adopt the usual conventon that the leftmost symbol of wll be placed on top of the stack Furthermore f: = 1 the top of the stack remans the same (we do not push or pop any symbol) = 0, that s = λ we pop a symbol from the stack, sometmes we wrte pop > 1 we push symbols on the stack )The nterpretaton of: (q, λ, R) = {(p 1, 1 ), (p 2, 2 ),, (p n, n )} s that the NPDA n state q, ndependently of the nput symbol beng scanned, and wth the symbol R on top of the stack, can enter state p, replace R by, for any In ths case the nput head s not advanced Defnton 04 An nstantaneous descrpton (ID) of a pushdown automaton s a trplet (q, w, u), where q s the current state of the automaton, w s the unread part of the nput strng, and u s the stack contents (wrtten as a strng, wth the leftmost symbol lyng at the top of the stack) Let the movement relaton ndcates a move of the NPDA It s related to the transton functon as follows: If (q, a, Z) = {(p 1, y 1 ),(p 2, y 1 ),, (p n, y n )} (p, a, X) = (q, γ) then (p, aw, Xα) (q, W, γα) Where W ndcates the rest of the strng followng the symbol a, and α ndcates the rest of the stack content underneath the symbol X Ths notaton says that n movng from state p to state q, the symbol a s consumed from 350 Journal of Dgtal Informaton Management Volume 12 Number 6 December 2014

3 the nput strng aw, and the strng Xa on the stack ( X s on the top of the stack) s replaced by the strng γa (p, aw, Xα) and (q, W, γa) are known as consecutve nstantaneous descrptons and are often used to defne the current confguraton of the NPDA [2, 3] In essence, a pushdown automaton s nondetermnstc It accepts the nput strng f there s a sequence of actons leadng to the fnal state There are two ways to depct non determnsm n the flowchart: two transtons wth the same label or a transton labeled wth λ (whch does not consume an nput symbol) All possbltes that do not have explct transtons, have mplct transtons that go to an mplct reject state Consderng a computaton of a pushdown automaton we call a sngle step nondetermnstc f the automaton has more than one choce for ts move The branchng of the step s defned to be the number of choces [4, 5]Most of the contextfree languages dffer n the amount of the resource (n ths case, nondetermnsm) that they requre [6, 7] Throughout the paper λ denotes the empty word For a strng x, let x, x [] and x [, j] denote the length of x, the th symbol of x and the factor x [] x [j] respectvely, where 0 < j x Let x R denote the reverse of the word x, that s x R = x [n] x [n 1] x [2] x [1] for x = n We assume throughout the paper that the specal symbol Z 0 can only occur on the bottom of the pushdown automaton, and the nput strng termnates wth the symbol $ 12 Acceptng strngs wth a NPDA We use the relaton to ndcate a sngle move of the NPDA We use the relaton *, the reflexve closure of the relaton to ndcate a sequence of zero or more moves If M = (Q, Σ,,, q 0, F) s an NPDA, then the language accepted by M, L (M), s defned by L (M) = {w Σ : (q 0, w, Z 0 ) * (p, $ ), p F} Ths defnton means that a strng w s accepted f and only f startng from the start state q 0 and an empty stack (depcted by the symbol Z 0 on ts top, we end up, after a sequence of moves, n a fnal state p after consumng entrely the nput strng We assume that the nput strng termnates wth the specal symbol $, and Z 0 s the bottom of the stack The symbol Z 0 s a convenent way to test for the empty stack condton, whch means we are acceptng by empty stack Acceptance by fnal state s the most common mode for acceptance; however proofs of basc theorems are often derved from acceptance by empty stack Henceforth we wll assume throughout ths paper that acceptance s made by empty stack Some results on CFLs can be found n ([2, 3]): A contextfree language or CFL s a language generated by o context free grammar or accepted by a NPDA A determnstc context free language (DCFL) s a language accepted by a determnstc pushdown automaton Throughout the paper we prove that languages are context free by desgnng NPDA that accepts them CFL are not closed under complement, we cannot just reverse fnal and non fnal states to fnd the complement Ths does not work because t dd not work for non determnstc fnte state automaton (NDFA) CFL are closed under unon, however DCFL are not closed under unon DCFL and CFL are not closed under ntersecton In general determnstc machnes are closed under complement Two NPDAs are equvalent f they accept the same language 13 Example of some transtons For ease of understandng the most used transtons are explaned n detal below: 1 (p, a, R) = {(q, ar)} n state p, on nput symbol a and R the top of the stack : move to state q and push a on top of the stack 2 (p, a, R) = {(q, R)} n state p, on nput symbol a and R the top of the stack : move to state q and leave R on top of the stack ( do not push a onto the stack) 3 (p, a, R) = {(q, λ)} n state p, on nput symbol a and R the top of the stack : pop (unstack the symbol R) 4 (p, λ, R) = {(q, R)} ths s a λ move : the nput head s not advanced and the top of the stack remans the same All we do s move to a dfferent state 5 (p, _, R) = {(q, _R)} the anonymous varable _ stands for any nput symbol from Σ (Stack the nput symbol, whatever t s) 6 (p, a, _ ) = {(q, a_)} the anonymous varable _ stands for any stack symbol from Γ 7 (p, _ ) = {(q )} the stack s empty 8 (p, $, _) = {(q, _)} the nput s totally consumed 9 (p, $ ) = {(q )} the nput s totally consumed and the stack s empty In the followng chapter we provde two solutons for the language L 1 : the frst soluton s smple and clear, the second soluton s much more elegant and subtle We frst recall the grammar classfcaton accordng to Chomsky 14 The Chomsky Herarchy of formal grammars Let G = (V, T, P, S) be a formal grammar where V s the non termnal vocabulary, T s the termnal vocabulary, P s the set of the productons, and S s the startng symbol We dstngush four types of grammars dependng on the form of ther productons ([1]) Unrestrcted Grammars: The languages defned by these grammars are accepted by Turng machnes They have rules of the form a b where α and β are arbtrary strngs over a vocabulary V and α # Journal of Dgtal Informaton Management Volume 12 Number 6 December

4 Context-senstve grammars: the languages defned by these grammars are accepted by lnear bounded automata They have rules of the form α β where α β where α, β (V + T) *, and a # Context-free grammars: the languages defned by these grammars are accepted by push-down automata They have rules of the form Α β, where A V and β (V + T) * Regular grammars: the languages defned by these grammars are accepted by fnte state automata There are two knds of regular grammars: 1 Rght-lnear wth rules of the form A wb / w, where A, B V and w T * 2 Left-lnear wth rules of the form A wb / w 2 Non Even Length Palndromes Non determnstc solutons for context free languages have long proven dffcult because the noton of non determnsm n algorthm desgn s not easy to mplement However non determnstc approaches provded an elegant and subtle way to prove that languages are context free Recall that the language known as the non even palndromes s defned as the complement of the language {ww R / w {0, 1}*}, we wll call ths language L 1 In ths secton we prove that L 1 s a context free language Precsely we construct a non determnstc pushdown automaton that accepts L 1 Clam 01: The language L 1 s a context free language We prove the above statement by the constructon of a non determnstc pushdown automaton that accepts the language We begn wth a naïve soluton and then proceed to a much better one The frst soluton s gven to make sure that the average reader understands the desgn of NPDA and also to get used wth the notaton 21 A frst soluton for the language L 1 Consder the followng language: L 1 = {ww R / w {0, 1}*} Ths s the set of strngs n whch each strng begns wth a sequence of one or more 0s or 1s and then mmedately concludes wth an dentcal but reversed sequence In other words, L 1 s the set of symmetrc even-length palndromes over the alphabet {0, 1} Let us construct a NPDA M 1 whch accepts L 1 M 1 s defned by the set M = (Q, Σ,,, q 0, F) where Q ={q 0, q 1, q 2, q 3, q 4, q 5, q 6 }, Σ = [0, 1}, ={Z 0, X, Y}, and F = {q 4, q 6 } 211 Intal part of the algorthm: Frst of all we know that odd length strngs belong to L 1 In ths part all we have to do s to make sure that the nput has an odd length to be accepted From the start state q 0 we make a λ move to state q 5 From q 5 on any nput symbol we move to state q 6, and then loop on state q 5 when readng the next nput symbol Thus the pushdown automaton behaves lke a fnte automaton and we accept f we end up n the fnal state q 6 (q 0, λ ) ={(q 1 ), (q 5 )} make a λ move ether to state q 1 or to state q 5 (q 5, _ ) ={(q 6 )} (q 6, _ ) ={(q 5 )} We move to state q 1 for the second part of the algorthm when the nput has an even length 212 Second part of the algorthm: For the second part of the algorthm whch s the man part of the problem we deal wth even length strngs whch are not palndromes The man dea s to look for msmatches non determnstcally from the frst half of the strng w and the second half of the strng w R, specfcally: 1 In state q 1 push a set of symbols on the stack (readng the symbol 0 push the symbol X, readng the symbol 1 push the symbol Y) 2 Guess that we have reached the mddle of the strng and move to state q 2 3 In state q 2 match the rest of the symbols wth the stack content (match 0 aganst X, and 1 aganst Y) 4 Fnd a msmatch on a 0 or a 1 and move to state q 3 5 Whle n state q 3 pop everythng out of the stack 6 When the nput s totally consumed and the stack becomes empty, move to state q 4 accept and resume In state q 2, we make sure that the symbols we pushed earler n state q 1 match the symbols we popped, whch confrms the fact that the strng s of even length Snce whle readng the nput symbol 0 (respectvely 1) we pushed the symbol X (respectvely Y) on top of the stack A msmatch occurs n state q 2 only f the nput symbol s 0 (respectvely 1) and the symbol on top of the stack s Y (respectvely X) We reach state q 3 f and only f we encounter a msmatch, whch means that the nput strng s not of the form ww R, thus the nput strng belongs to the set L Transtons for M 1 Here are the transtons of the machne:, 0 ) = {(q 1, XZ 0 )} readng the frst nput symbol 0 push X, 1 ) = {(q 1, YZ 0 )} readng the frst nput symbol 1 push Y 352 Journal of Dgtal Informaton Management Volume 12 Number 6 December 2014

5 , 0, T) = {(q 1, XT)} readng the next nput symbol 0 push X, the top of the stack s T ={X, Y},1, T) = {(q 1, YT)} readng the next nput symbol 1 push Y, the top of the stack s T ={X, Y}, λ, R) = {(q 2, R)} At any tme, guess that we have reached the mddle of the strng and move to state q 2 Ths s a l move, the nput head s not advanced and R = {X, Y}, 0, X) = {(q 2, pop)} match the nput symbol 0 wth the symbol X on the stack, 1,Y) = {(q 2, pop)} match the nput symbol 1 wth the symbol Y on the stack, 0, Y) = {(q 3, pop)} guess a msmatch on the symbol 0 when encounterng Y on top of the stack and enter state q 3, 1, X) = {(q 3, pop)} guess a msmatch on the symbol 1 when encounterng X on top of the stack and enter state q 3 (q 3, _, _) = {(q 3, pop)} pop everythng out of the stack (q 3, $ ) = {(q 4 )} move to q 4 and accept 22 A More Effcent Soluton for L 1 Let us consder agan the language L 1, the complement of the language L 1 = { ww R / w {0, 1}*} In what follows we descrbe a more effcent soluton for the even length non palndromes In ths verson we do not need to remember the symbols, all we have to do s count the number of symbols That s the stack s used as a counter Specfcally we push the symbol X ether when readng 0 or 1 We say that two symbols x [] and x [j] from the nput strng msmatch f they hold dfferent values Note that ths noton of msmatch s slghtly dfferent from the one used n secton II A The man ntuton justfyng the conjecture that even length non palndromes are CFL s based on the followng observaton Let us consder the strng x = ww R = x [1] x [2] x [3] x [n 1] x [n] x [n] x [n 1] x [3] x [2] x [1] We can easly note that the symbols x [] and x [2n + 1] are dentcal for 1 n Ths tells us that the strng cannot be a palndrome f the symbols at poston and poston (2n + 1) msmatch That means that all we have to do s make sure that there exts two symbols that msmatch for the strng to be n L 1 Let the msmatchng symbols be x [] and x (2n + 1), from left to rght n the strng The number of symbols that precede x [] s equal to the number of symbols that follow x (2n + 1), whch s exactly ( 1) Moreover all these symbols are dentcal We wll use the stack to make sure that ths condton holds The symbols that le between x [] and x (2n + 1) do not matter much snce the msmatchng symbols are non determnstcally guessed Fgure 01 The man dea s as follows: the msmatchng symbols x [] and x [2n + 1] are ponted by the double arrows n fgure01 Let A 1 be the substrng x [1, 1], A 2 the substrng x [ + 1, 2n ], and A 3 the substrng x [2n + 2, 2n] In zone A 1 we push the symbols onto the stack In part A 2 we just gnore the nput, n part A 3 we pop the symbols makng sure that they match what we have pushed n zone A 1 In fgure 01 the nput strng s represented by the rectangle Substrng A 1 les before the frst vertcal double arrow on the left, substrng A 2 les between the two double arrows, and substrng A 3 les beyond the second double arrow on the rght The vertcal double arrows ndcate the two symbols that must msmatch A 1 and A 3 have the same length The man algorthm for the second soluton s descrbed below 221 Algorthm for L 1 a) Read the nput symbols and push them onto the stack (push the symbol X ether for 0 or 1) b) At any tme we non determnstcally guess the symbol n the frst part of the nput strng (w) that s gong to msmatch a subsequent symbol n the second part of the strng (w R ) In state q 2 we remember the symbol 0, and n state q 3 we remember the symbol 1 c) We remember ths symbol and move across the nput gnorng everythng untl we non determnstcally guess the second symbol for a msmatch From q 2 the msmatchng symbol s 1, from state q 3 the msmatchng symbol s 0 d) From ths pont we make sure that the pushng at the start matches the poppng at the end Precsely the number of symbols (only Xs) pushed n part a) s equal to the symbols remanng on the stack Ths means that the symbols that msmatch are legtmate msmatches as depcted n the fgure 01 above Ths s a hgher level of guessng, where we non determnstcally check that we made the rght guess for a msmatch Ths soluton avods the man loops n the earler verson of the algorthm (secton IIA) and s more subtle and elegant 222Transton functon for L 1, 0 ) ={(q 1, XZ 0 ), (q 2 )} whle readng the frst symbol 0 push X onto the stack or remember the symbol 0 as the msmatch and move to state q 2,1 ) ={(q 1, XZ 0 ), (q 3 )} whle readng the frst symbol 1 push X onto the stack or remember the symbol 1 as the msmatch and move to state q 3 Journal of Dgtal Informaton Management Volume 12 Number 6 December

6 , 0, X) ={(q 1, XX), (q 2, X)} whle readng the next symbol 0 push X onto the stack or remember the symbol 0 as the msmatch and move to state q 2, 1, X) ={(q 1, XX), (q 3, X)} whle readng the next symbol 1 push X onto the stack or remember the symbol 1 as the msmatch and move to state q 3, 0, X) ={(q 2, X)} whle n state q 2 gnore the nput symbol 0, 1, X) ={(q 2, X), (q 4, X)} whle n state q 2 gnore the nput symbol 1 or guess that ths s the msmatch symbol and move to state q 4 (q 3, 1, X) ={(q 3, X)} whle n state q 3 gnore the nput symbol 1 (q 3, 0, X) ={(q 3, X), (q 4, X)} whle n state q 3 gnore the nput symbol 0 or guess ths s the msmatch symbol and move to state q 4 (q 4, 0, X) ={(q 4, pop)} check and pop (q 4, 1, X) ={(q 4, pop)} check and pop (q 4, $ ) ={(q 5 )} f the nput s totally consumed and the stack s empty then accept and resume In state q 2 the msmatch s gong to occur on a 1, snce we remembered the symbol 0 In state q 3 the msmatch s gong to occur on a 0, snce we remembered the symbol 1 We reach state q 4 f and only f we encounter a msmatchng symbol, whch proves that the nput strng belongs to the language L 1 The non determnstc technque s a powerful tool for the desgn of strateges when dealng wth pushdown automaton Example of computatons on the nput The ntal ID of the NPDA s: (q 1, $ ) Each move s represented n a lne and commented (q 1, $ ) read 0 push X (q 1, 01110$, XZ 0 ) guess 0 as a future msmatch, 1110$, XZ 0 ) gnore the symbol 1, 110$, XZ 0 ) gnore the symbol 1, 10$, XZ 0 ) guess 1 as the correspondng msmatchng symbol (q 4, 0$ ) match XZ 0 wth X (q 5, $ ) move to state q 5 (q 5, $ ) accept and resume The nput strng , whch has the form ww R, s not accepted wherever the two msmatchng symbols may le In the next chapter we desgn a NPDA for the language L 2 To the best of our knowledge the solutons provded for L 1 and L 2 are new and have not been dscussed n the lterature 3 The complement of L 2 Let us now consder the complement of the language {ww / w {0, 1}*}, we are about to prove that ths language, labeled L 2 s a context free language Clam 02: the language L 2 s a context free language Proof of Clam 02 To prove that the language L 2 s a CFL we desgn a NDPA that accepts the language As before there are two aspects for strngs n L 2, frst of all odd length words are n L 2 We can take care of ths stuaton by desgnng a fnte automaton that recognzes odd length strngs In what follows we only consder even length words Let the strng x = ww = x [1] x [2] x [3] x [n 1] x [n] x [1] x [2] x [3] x [n 1] x [n] The matchng symbols x [] and x [n + ] are ponted out by the vertcal double arrows n fgure02 Let A 1 be the substrng x [1, 1], A 2 the substrng x [ + 1, n + + 1], and A 3 the substrng x [n + + 2, 2n] We notce that the dentcal symbols x [] and x [n + ] from the frst part of the strng and the second half are separated by exactly n 1 symbols Moreover the number of symbols that le before the frst x [] that s 1, when added to the number of symbols that le after the second x [n + ], that s n, equals n 1 Ths suggests that a strng s n L 2 f and only f the two msmatchng symbols are separated by half the length of the total strng Ths s made clear n the fgure 02 below where the vertcal double arrows show the two msmatchng symbols Ths tells us that we have to make sure that the two msmatchng symbols are separated by half of the total strng length Let us push Xs for a whle, say n 1 Decde that the next nput symbol s the msmatchng symbol, remember t and start to pop symbols from the stack, say n 2 If the stack becomes empty, start pushng agan Xs onto the stack, say n 3 Then arbtrarly guess the next nput symbol s the correspondng msmatchng symbol Now we pop everythng out of the stack, say n 4 symbols At ths pont when the stack emptes then we know that the set consstng of the poppng of the frst set (n 2 ) and the pushng of the second set (n 3 ) s the same as the pushng of the frst set (n 1 ) and the poppng of the second set (n 4 ), that they are equal That s n 2 + n 3 = n 1 + n 4, whch proves that the two msmatchng symbols are legtmate and separated by half of the total strng length Fgure Journal of Dgtal Informaton Management Volume 12 Number 6 December 2014

7 The two msmatchng symbols pctured by the vertcal double arrows n fgure 02 are separated by half the length of the total strng Ths s a neat soluton that requres a sngle counter The whole dea whch s a bt subtle s to make a guess and then later non determnstcally check that our guess was the rght one In fgure 02, as before, substrng A 1 les before the frst vertcal double arrow on the left, substrng A 2 les between the two vertcal double arrows, and substrng A 3 les beyond the second double arrow on the rght Then the length of the strng A 1 added to the length of the strng A 3 equals the length of the strng A 2 If the length of the nput strng ww s 2n then A 1 + A 3 = A 2 = n In fgure 02 the nput strng s represented as a rectangle The vertcal double arrows show where the two msmatchng symbols le They are separated by half the length of the total strng depcted by the horzontal double arrow We descrbe the algorthm n the next secton 31 Algorthm for L 2 a) Push a bunch of symbols on the stack and arbtrarly guess that you are choosng to look at a specfc symbol b) Pop those symbols off the stack, f the stack becomes empty start pushng the symbols agan non determnstcally guessng when to make a msmatch When the stack becomes empty we push a dfferent symbol onto the stack c) Fnd a msmatch, at that pont pop the symbols that you have off the stack d) If the nput strng s entrely consumed and the stack s empty then we know here that the set consstng of the poppng of the frst set and the pushng of the second set was the same as the pushng of the frst set and the poppng of the second set, that they are equal That means that the mddle secton A 2 s half the length of the total nput strng length 32 Transton functon for L 2 The NPDA M 2 s defned by the set M = (Q,,,, q 1, F) where Q = {q 1, q 2, q 3, q 4, q 5, q 6, q 7 }, = {0, 1}, = {Z 0, X, Y}, and F = {q 7 } 1 (q 1,0,T) = {(q 1, XT), (q 2, T)} when readng the symbol 0 push X onto the stack or guess the symbol 0 as a msmatch and move to q 2,T = {Z 0 2 (q 1, 1, T) ={(q 1, XT), (q 3, T)} when readng the symbol 1 push X onto the stack or guess the symbol 1 as a msmatch and move to q 3, T = {Z 0 3 (q 2, 0, X) ={(q 2, pop)} 4 (q 2, 1, X) ={(q 2, pop)} 5 (q 2, λ ) ={(q 4 )} the stack s empty, move to state q 4 6 (q 3, 0, X) ={(q 3, pop)} 7 (q 3, 1,X) ={(q 3, pop)} 8 (q 3, λ ) ={(q 5 )} the stack s empty, move to state q 5 9 (q 4, 0, T) ={(q 4, YT)} when readng the symbol 0 pop agan Ys onto the stack, T = {Z 0 10 (q 4, 1,T) ={(q 4, YT),(q 6, T)} when readng the symbol 1 pop agan Ys onto the stack or guess the msmatch and move to state q 6, T = {Z 0 11 (q 5, 1,T) ={(q 5, YT)} when readng the symbol 1 pop agan Ys onto the stack, T = {Z 0, Y} 12 (q 5, 0,T) ={(q 5, YT),(q 6, T)} when readng the symbol 0 pop agan Ys onto the stack or guess the msmatch and move to state q 6, T = {Z 0 13 (q 6, 0,Y) ={(q 6, pop)} pop the Ys 14 (q 6, 1, Y) ={(q 6, pop)} pop the Ys 15 (q 6, $ ) ={(q 7 )} the nput s entrely consumed and the stack s empty then enter the fnal state q 7 and accept If we assume that the amount of non determnsm that a pushdown automaton requres to recognze an nput strng can be measured by the mnmum number of guesses that t must make to accept the strng then the soluton we provde s effcent as we only make two (2) guesses ([4]) 33 Some Input computatons Here are some computatons for the nput The ntal ID s (q 1, $ ) (q 1, $ ) read 0 push X (q 1, 01011$, XZ 0 ) guess 0 as the msmatch, 1011$, XZ 0 ) pop, 011$ ) stack empty move to q 4 (q 4, 011$ ) push Y (q 4, 11$, YZ 0 ) guess 1 as the second msmatch and move to q 6 (q 6,1$,YZ 0 ) pop (q 6, $ ) stack s empty move to q 7 ( q 7, $ ) accept and resume The msmachng symbols occur n the second and the ffth symbol Here are some computatons for the nput (q 1, $ ) (q 1, 1000$, XXZ 0 ) (q 3, 000$, XXZ 0 ) (q 3,0$,Z 0 ) (q 5, 0$ ) (q 6, $ ) (q 7, $ ) The msmachng symbols occur n the thrd and the sxth symbol If we try the strng , t s clear that t s Journal of Dgtal Informaton Management Volume 12 Number 6 December

8 mpossble to fnd two symbols to msmatch that are separated by half the strng length, because ths example s of the form ww, so t s rejected The man results of ths paper are that the complement of the language L 1 = { ww R / w {0, 1}*} and the complement of the type 0 language L 2 ={ww / w {0, 1}*} are context free We have shown these results by desgnng non determnstc pushdown automaton that accept these languages 4 Concluson In ths paper we have proved that the complement of the language L 1 = { ww R / w {0, 1}*} and the complement of the language L 2 ={ww / w {0, 1}*} are context free by desgnng non determnstc pushdown automatons that recognze these languages The solutons provded are elegant and show that non determnsm s a powerful tool for desgnng strateges to solve hard problems Both languages can be characterzed by the presence of two nput symbols that msmatch The man feature of the procedures s to determne the poston of the symbols that have to msmatch n the nput strng At some pont we make a guess and then non determnstcally prove that our guess was legtmate The NPDA for the language L 2 uses the stack only as a counter; the value of the nput symbol (0 or 1) does not matter To the best of our knowledge the solutons provded are state of the art and have not been publshed n the lterature Future drectons of research mght deal wth the refnement of the non determnsm measure, n other words how to reduce the branchng factor (non determnstc moves) n the desgn of pushdown machnes It s also mportant to consder the relaton between complexty measures, n terms of the sze of nput strngs, and non determnstc moves when desgnng effcent algorthms References 1 Hopcroft, J, Ullman, J (1979) Introducton to Automata Theory, Languages and Computaton Addson-Wesley, Readng, MA 2 Harrson, M (1978) Introducton to Formal Language Theory Addson-Wesley, Readng, MA 3 Drobot, V (1989) Formal Languages and Automata Theory Computer Scence Press, Rockvlle, MD 4 Goldstne, J, Leung, H, Wotschke, D, (2005) Measurng nondetermnsm n pushdown automata, Journal of Computer and System Scences Kutrb M Martn, Malcher, A (2007) Context-dependent nondetermnsm for pushdown automata Theoretcal Computer Scence Jang, T, Salomaa, A, Salomaa, K, Yu, S (1995) Decson problems for patterns Journal of Computer and System Scences 50 (1) Kutrb M, Malcher A, Werlen, L (2009) Regulated nondetermnsm n pushdown automata Theoretcal Computer Scence Bography The author s currently a Professor n computer scence at the Unversty of Setf, Algera He graduated from the Unversty of Colorado at Boulder, USA (Master of Scences n 1980) and from the Unversty of Sheffeld, Unted Kngdom (PhD n Artfcal Intellgence n 1990) Hs areas of research ncludes formal language theory, natural language processng and semantc web technologes The author may be reached at allaouarefouf@unv-setfdz 356 Journal of Dgtal Informaton Management Volume 12 Number 6 December 2014

Turing Machines (intro)

Turing Machines (intro) CHAPTER 3 The Church-Turng Thess Contents Turng Machnes defntons, examples, Turng-recognzable and Turng-decdable languages Varants of Turng Machne Multtape Turng machnes, non-determnstc Turng Machnes,

More information

Basic Regular Expressions. Introduction. Introduction to Computability. Theory. Motivation. Lecture4: Regular Expressions

Basic Regular Expressions. Introduction. Introduction to Computability. Theory. Motivation. Lecture4: Regular Expressions Introducton to Computablty Theory Lecture: egular Expressons Prof Amos Israel Motvaton If one wants to descrbe a regular language, La, she can use the a DFA, Dor an NFA N, such L ( D = La that that Ths

More information

Difference Equations

Difference Equations Dfference Equatons c Jan Vrbk 1 Bascs Suppose a sequence of numbers, say a 0,a 1,a,a 3,... s defned by a certan general relatonshp between, say, three consecutve values of the sequence, e.g. a + +3a +1

More information

Module 9. Lecture 6. Duality in Assignment Problems

Module 9. Lecture 6. Duality in Assignment Problems Module 9 1 Lecture 6 Dualty n Assgnment Problems In ths lecture we attempt to answer few other mportant questons posed n earler lecture for (AP) and see how some of them can be explaned through the concept

More information

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Structure and Drive Paul A. Jensen Copyright July 20, 2003 Structure and Drve Paul A. Jensen Copyrght July 20, 2003 A system s made up of several operatons wth flow passng between them. The structure of the system descrbes the flow paths from nputs to outputs.

More information

Compilers. Spring term. Alfonso Ortega: Enrique Alfonseca: Chapter 4: Syntactic analysis

Compilers. Spring term. Alfonso Ortega: Enrique Alfonseca: Chapter 4: Syntactic analysis Complers Sprng term Alfonso Ortega: alfonso.ortega@uam.es nrque Alfonseca: enrque.alfonseca@uam.es Chapter : Syntactc analyss. Introducton. Bottom-up Analyss Syntax Analyser Concepts It analyses the context-ndependent

More information

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results. Neural Networks : Dervaton compled by Alvn Wan from Professor Jtendra Malk s lecture Ths type of computaton s called deep learnng and s the most popular method for many problems, such as computer vson

More information

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification E395 - Pattern Recognton Solutons to Introducton to Pattern Recognton, Chapter : Bayesan pattern classfcaton Preface Ths document s a soluton manual for selected exercses from Introducton to Pattern Recognton

More information

Problem Set 9 Solutions

Problem Set 9 Solutions Desgn and Analyss of Algorthms May 4, 2015 Massachusetts Insttute of Technology 6.046J/18.410J Profs. Erk Demane, Srn Devadas, and Nancy Lynch Problem Set 9 Solutons Problem Set 9 Solutons Ths problem

More information

The Order Relation and Trace Inequalities for. Hermitian Operators

The Order Relation and Trace Inequalities for. Hermitian Operators Internatonal Mathematcal Forum, Vol 3, 08, no, 507-57 HIKARI Ltd, wwwm-hkarcom https://doorg/0988/mf088055 The Order Relaton and Trace Inequaltes for Hermtan Operators Y Huang School of Informaton Scence

More information

Lecture Space-Bounded Derandomization

Lecture Space-Bounded Derandomization Notes on Complexty Theory Last updated: October, 2008 Jonathan Katz Lecture Space-Bounded Derandomzaton 1 Space-Bounded Derandomzaton We now dscuss derandomzaton of space-bounded algorthms. Here non-trval

More information

Week 5: Neural Networks

Week 5: Neural Networks Week 5: Neural Networks Instructor: Sergey Levne Neural Networks Summary In the prevous lecture, we saw how we can construct neural networks by extendng logstc regresson. Neural networks consst of multple

More information

THE SUMMATION NOTATION Ʃ

THE SUMMATION NOTATION Ʃ Sngle Subscrpt otaton THE SUMMATIO OTATIO Ʃ Most of the calculatons we perform n statstcs are repettve operatons on lsts of numbers. For example, we compute the sum of a set of numbers, or the sum of the

More information

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law: CE304, Sprng 2004 Lecture 4 Introducton to Vapor/Lqud Equlbrum, part 2 Raoult s Law: The smplest model that allows us do VLE calculatons s obtaned when we assume that the vapor phase s an deal gas, and

More information

MAE140 - Linear Circuits - Winter 16 Final, March 16, 2016

MAE140 - Linear Circuits - Winter 16 Final, March 16, 2016 ME140 - Lnear rcuts - Wnter 16 Fnal, March 16, 2016 Instructons () The exam s open book. You may use your class notes and textbook. You may use a hand calculator wth no communcaton capabltes. () You have

More information

On the correction of the h-index for career length

On the correction of the h-index for career length 1 On the correcton of the h-ndex for career length by L. Egghe Unverstet Hasselt (UHasselt), Campus Depenbeek, Agoralaan, B-3590 Depenbeek, Belgum 1 and Unverstet Antwerpen (UA), IBW, Stadscampus, Venusstraat

More information

CHAPTER III Neural Networks as Associative Memory

CHAPTER III Neural Networks as Associative Memory CHAPTER III Neural Networs as Assocatve Memory Introducton One of the prmary functons of the bran s assocatve memory. We assocate the faces wth names, letters wth sounds, or we can recognze the people

More information

Calculation of time complexity (3%)

Calculation of time complexity (3%) Problem 1. (30%) Calculaton of tme complexty (3%) Gven n ctes, usng exhaust search to see every result takes O(n!). Calculaton of tme needed to solve the problem (2%) 40 ctes:40! dfferent tours 40 add

More information

Chapter Twelve. Integration. We now turn our attention to the idea of an integral in dimensions higher than one. Consider a real-valued function f : D

Chapter Twelve. Integration. We now turn our attention to the idea of an integral in dimensions higher than one. Consider a real-valued function f : D Chapter Twelve Integraton 12.1 Introducton We now turn our attenton to the dea of an ntegral n dmensons hgher than one. Consder a real-valued functon f : R, where the doman s a nce closed subset of Eucldean

More information

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur Module Random Processes Lesson 6 Functons of Random Varables After readng ths lesson, ou wll learn about cdf of functon of a random varable. Formula for determnng the pdf of a random varable. Let, X be

More information

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur Module 3 LOSSY IMAGE COMPRESSION SYSTEMS Verson ECE IIT, Kharagpur Lesson 6 Theory of Quantzaton Verson ECE IIT, Kharagpur Instructonal Objectves At the end of ths lesson, the students should be able to:

More information

Affine transformations and convexity

Affine transformations and convexity Affne transformatons and convexty The purpose of ths document s to prove some basc propertes of affne transformatons nvolvng convex sets. Here are a few onlne references for background nformaton: http://math.ucr.edu/

More information

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS Avalable onlne at http://sck.org J. Math. Comput. Sc. 3 (3), No., 6-3 ISSN: 97-537 COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

More information

8.6 The Complex Number System

8.6 The Complex Number System 8.6 The Complex Number System Earler n the chapter, we mentoned that we cannot have a negatve under a square root, snce the square of any postve or negatve number s always postve. In ths secton we want

More information

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009 College of Computer & Informaton Scence Fall 2009 Northeastern Unversty 20 October 2009 CS7880: Algorthmc Power Tools Scrbe: Jan Wen and Laura Poplawsk Lecture Outlne: Prmal-dual schema Network Desgn:

More information

Section 8.3 Polar Form of Complex Numbers

Section 8.3 Polar Form of Complex Numbers 80 Chapter 8 Secton 8 Polar Form of Complex Numbers From prevous classes, you may have encountered magnary numbers the square roots of negatve numbers and, more generally, complex numbers whch are the

More information

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix Lectures - Week 4 Matrx norms, Condtonng, Vector Spaces, Lnear Independence, Spannng sets and Bass, Null space and Range of a Matrx Matrx Norms Now we turn to assocatng a number to each matrx. We could

More information

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11)

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11) Gravtatonal Acceleraton: A case of constant acceleraton (approx. hr.) (6/7/11) Introducton The gravtatonal force s one of the fundamental forces of nature. Under the nfluence of ths force all objects havng

More information

EEE 241: Linear Systems

EEE 241: Linear Systems EEE : Lnear Systems Summary #: Backpropagaton BACKPROPAGATION The perceptron rule as well as the Wdrow Hoff learnng were desgned to tran sngle layer networks. They suffer from the same dsadvantage: they

More information

NUMERICAL DIFFERENTIATION

NUMERICAL DIFFERENTIATION NUMERICAL DIFFERENTIATION 1 Introducton Dfferentaton s a method to compute the rate at whch a dependent output y changes wth respect to the change n the ndependent nput x. Ths rate of change s called the

More information

Descriptional Complexity of Determinization and Complementation for Finite Automata

Descriptional Complexity of Determinization and Complementation for Finite Automata Descrptonal Complexty of Determnzaton and Complementaton for Fnte Automata Anruddh Gandh Nan Rosemary Ke Bakhadyr Khoussanov Department of Computer Scence, Unversty of Auckland Prvate Bag 99, Auckland,

More information

Volume 18 Figure 1. Notation 1. Notation 2. Observation 1. Remark 1. Remark 2. Remark 3. Remark 4. Remark 5. Remark 6. Theorem A [2]. Theorem B [2].

Volume 18 Figure 1. Notation 1. Notation 2. Observation 1. Remark 1. Remark 2. Remark 3. Remark 4. Remark 5. Remark 6. Theorem A [2]. Theorem B [2]. Bulletn of Mathematcal Scences and Applcatons Submtted: 016-04-07 ISSN: 78-9634, Vol. 18, pp 1-10 Revsed: 016-09-08 do:10.1805/www.scpress.com/bmsa.18.1 Accepted: 016-10-13 017 ScPress Ltd., Swtzerland

More information

MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS

MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS The 3 rd Internatonal Conference on Mathematcs and Statstcs (ICoMS-3) Insttut Pertanan Bogor, Indonesa, 5-6 August 28 MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS 1 Deky Adzkya and 2 Subono

More information

The path of ants Dragos Crisan, Andrei Petridean, 11 th grade. Colegiul National "Emil Racovita", Cluj-Napoca

The path of ants Dragos Crisan, Andrei Petridean, 11 th grade. Colegiul National Emil Racovita, Cluj-Napoca Ths artcle s wrtten by students. It may nclude omssons and mperfectons, whch were dentfed and reported as mnutely as possble by our revewers n the edtoral notes. The path of ants 07-08 Students names and

More information

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems Numercal Analyss by Dr. Anta Pal Assstant Professor Department of Mathematcs Natonal Insttute of Technology Durgapur Durgapur-713209 emal: anta.bue@gmal.com 1 . Chapter 5 Soluton of System of Lnear Equatons

More information

Note on EM-training of IBM-model 1

Note on EM-training of IBM-model 1 Note on EM-tranng of IBM-model INF58 Language Technologcal Applcatons, Fall The sldes on ths subject (nf58 6.pdf) ncludng the example seem nsuffcent to gve a good grasp of what s gong on. Hence here are

More information

Physics 207: Lecture 20. Today s Agenda Homework for Monday

Physics 207: Lecture 20. Today s Agenda Homework for Monday Physcs 207: Lecture 20 Today s Agenda Homework for Monday Recap: Systems of Partcles Center of mass Velocty and acceleraton of the center of mass Dynamcs of the center of mass Lnear Momentum Example problems

More information

Edit-Distance between Visibly Pushdown Languages

Edit-Distance between Visibly Pushdown Languages Edt-Dstance between Vsbly Pushdown Languages Yo-Sub Han 1 and Sang-K Ko 2 1 Department of Computer Scence, Yonse Unversty 50, Yonse-Ro, Seodaemun-Gu, Seoul 120-749, Republc of Korea emmous@yonse.ac.kr

More information

The Feynman path integral

The Feynman path integral The Feynman path ntegral Aprl 3, 205 Hesenberg and Schrödnger pctures The Schrödnger wave functon places the tme dependence of a physcal system n the state, ψ, t, where the state s a vector n Hlbert space

More information

12. The Hamilton-Jacobi Equation Michael Fowler

12. The Hamilton-Jacobi Equation Michael Fowler 1. The Hamlton-Jacob Equaton Mchael Fowler Back to Confguraton Space We ve establshed that the acton, regarded as a functon of ts coordnate endponts and tme, satsfes ( ) ( ) S q, t / t+ H qpt,, = 0, and

More information

Lecture 10 Support Vector Machines II

Lecture 10 Support Vector Machines II Lecture 10 Support Vector Machnes II 22 February 2016 Taylor B. Arnold Yale Statstcs STAT 365/665 1/28 Notes: Problem 3 s posted and due ths upcomng Frday There was an early bug n the fake-test data; fxed

More information

Graph Reconstruction by Permutations

Graph Reconstruction by Permutations Graph Reconstructon by Permutatons Perre Ille and Wllam Kocay* Insttut de Mathémathques de Lumny CNRS UMR 6206 163 avenue de Lumny, Case 907 13288 Marselle Cedex 9, France e-mal: lle@ml.unv-mrs.fr Computer

More information

Line Drawing and Clipping Week 1, Lecture 2

Line Drawing and Clipping Week 1, Lecture 2 CS 43 Computer Graphcs I Lne Drawng and Clppng Week, Lecture 2 Davd Breen, Wllam Regl and Maxm Peysakhov Geometrc and Intellgent Computng Laboratory Department of Computer Scence Drexel Unversty http://gcl.mcs.drexel.edu

More information

Canonical transformations

Canonical transformations Canoncal transformatons November 23, 2014 Recall that we have defned a symplectc transformaton to be any lnear transformaton M A B leavng the symplectc form nvarant, Ω AB M A CM B DΩ CD Coordnate transformatons,

More information

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty Addtonal Codes usng Fnte Dfference Method Benamn Moll 1 HJB Equaton for Consumpton-Savng Problem Wthout Uncertanty Before consderng the case wth stochastc ncome n http://www.prnceton.edu/~moll/ HACTproect/HACT_Numercal_Appendx.pdf,

More information

PHYS 705: Classical Mechanics. Calculus of Variations II

PHYS 705: Classical Mechanics. Calculus of Variations II 1 PHYS 705: Classcal Mechancs Calculus of Varatons II 2 Calculus of Varatons: Generalzaton (no constrant yet) Suppose now that F depends on several dependent varables : We need to fnd such that has a statonary

More information

MMA and GCMMA two methods for nonlinear optimization

MMA and GCMMA two methods for nonlinear optimization MMA and GCMMA two methods for nonlnear optmzaton Krster Svanberg Optmzaton and Systems Theory, KTH, Stockholm, Sweden. krlle@math.kth.se Ths note descrbes the algorthms used n the author s 2007 mplementatons

More information

Prof. Dr. I. Nasser Phys 630, T Aug-15 One_dimensional_Ising_Model

Prof. Dr. I. Nasser Phys 630, T Aug-15 One_dimensional_Ising_Model EXACT OE-DIMESIOAL ISIG MODEL The one-dmensonal Isng model conssts of a chan of spns, each spn nteractng only wth ts two nearest neghbors. The smple Isng problem n one dmenson can be solved drectly n several

More information

20. Mon, Oct. 13 What we have done so far corresponds roughly to Chapters 2 & 3 of Lee. Now we turn to Chapter 4. The first idea is connectedness.

20. Mon, Oct. 13 What we have done so far corresponds roughly to Chapters 2 & 3 of Lee. Now we turn to Chapter 4. The first idea is connectedness. 20. Mon, Oct. 13 What we have done so far corresponds roughly to Chapters 2 & 3 of Lee. Now we turn to Chapter 4. The frst dea s connectedness. Essentally, we want to say that a space cannot be decomposed

More information

Feature Selection: Part 1

Feature Selection: Part 1 CSE 546: Machne Learnng Lecture 5 Feature Selecton: Part 1 Instructor: Sham Kakade 1 Regresson n the hgh dmensonal settng How do we learn when the number of features d s greater than the sample sze n?

More information

Assortment Optimization under MNL

Assortment Optimization under MNL Assortment Optmzaton under MNL Haotan Song Aprl 30, 2017 1 Introducton The assortment optmzaton problem ams to fnd the revenue-maxmzng assortment of products to offer when the prces of products are fxed.

More information

A New Refinement of Jacobi Method for Solution of Linear System Equations AX=b

A New Refinement of Jacobi Method for Solution of Linear System Equations AX=b Int J Contemp Math Scences, Vol 3, 28, no 17, 819-827 A New Refnement of Jacob Method for Soluton of Lnear System Equatons AX=b F Naem Dafchah Department of Mathematcs, Faculty of Scences Unversty of Gulan,

More information

Chapter 13: Multiple Regression

Chapter 13: Multiple Regression Chapter 13: Multple Regresson 13.1 Developng the multple-regresson Model The general model can be descrbed as: It smplfes for two ndependent varables: The sample ft parameter b 0, b 1, and b are used to

More information

Learning Theory: Lecture Notes

Learning Theory: Lecture Notes Learnng Theory: Lecture Notes Lecturer: Kamalka Chaudhur Scrbe: Qush Wang October 27, 2012 1 The Agnostc PAC Model Recall that one of the constrants of the PAC model s that the data dstrbuton has to be

More information

arxiv: v1 [math.ho] 18 May 2008

arxiv: v1 [math.ho] 18 May 2008 Recurrence Formulas for Fbonacc Sums Adlson J. V. Brandão, João L. Martns 2 arxv:0805.2707v [math.ho] 8 May 2008 Abstract. In ths artcle we present a new recurrence formula for a fnte sum nvolvng the Fbonacc

More information

Chapter 8 Indicator Variables

Chapter 8 Indicator Variables Chapter 8 Indcator Varables In general, e explanatory varables n any regresson analyss are assumed to be quanttatve n nature. For example, e varables lke temperature, dstance, age etc. are quanttatve n

More information

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity Week3, Chapter 4 Moton n Two Dmensons Lecture Quz A partcle confned to moton along the x axs moves wth constant acceleraton from x =.0 m to x = 8.0 m durng a 1-s tme nterval. The velocty of the partcle

More information

NP-Completeness : Proofs

NP-Completeness : Proofs NP-Completeness : Proofs Proof Methods A method to show a decson problem Π NP-complete s as follows. (1) Show Π NP. (2) Choose an NP-complete problem Π. (3) Show Π Π. A method to show an optmzaton problem

More information

More metrics on cartesian products

More metrics on cartesian products More metrcs on cartesan products If (X, d ) are metrc spaces for 1 n, then n Secton II4 of the lecture notes we defned three metrcs on X whose underlyng topologes are the product topology The purpose of

More information

Design and Optimization of Fuzzy Controller for Inverse Pendulum System Using Genetic Algorithm

Design and Optimization of Fuzzy Controller for Inverse Pendulum System Using Genetic Algorithm Desgn and Optmzaton of Fuzzy Controller for Inverse Pendulum System Usng Genetc Algorthm H. Mehraban A. Ashoor Unversty of Tehran Unversty of Tehran h.mehraban@ece.ut.ac.r a.ashoor@ece.ut.ac.r Abstract:

More information

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg prnceton unv. F 17 cos 521: Advanced Algorthm Desgn Lecture 7: LP Dualty Lecturer: Matt Wenberg Scrbe: LP Dualty s an extremely useful tool for analyzng structural propertes of lnear programs. Whle there

More information

Chapter - 2. Distribution System Power Flow Analysis

Chapter - 2. Distribution System Power Flow Analysis Chapter - 2 Dstrbuton System Power Flow Analyss CHAPTER - 2 Radal Dstrbuton System Load Flow 2.1 Introducton Load flow s an mportant tool [66] for analyzng electrcal power system network performance. Load

More information

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 2/21/2008. Notes for Lecture 8

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 2/21/2008. Notes for Lecture 8 U.C. Berkeley CS278: Computatonal Complexty Handout N8 Professor Luca Trevsan 2/21/2008 Notes for Lecture 8 1 Undrected Connectvty In the undrected s t connectvty problem (abbrevated ST-UCONN) we are gven

More information

Foundations of Arithmetic

Foundations of Arithmetic Foundatons of Arthmetc Notaton We shall denote the sum and product of numbers n the usual notaton as a 2 + a 2 + a 3 + + a = a, a 1 a 2 a 3 a = a The notaton a b means a dvdes b,.e. ac = b where c s an

More information

CHAPTER 14 GENERAL PERTURBATION THEORY

CHAPTER 14 GENERAL PERTURBATION THEORY CHAPTER 4 GENERAL PERTURBATION THEORY 4 Introducton A partcle n orbt around a pont mass or a sphercally symmetrc mass dstrbuton s movng n a gravtatonal potental of the form GM / r In ths potental t moves

More information

Generalized Linear Methods

Generalized Linear Methods Generalzed Lnear Methods 1 Introducton In the Ensemble Methods the general dea s that usng a combnaton of several weak learner one could make a better learner. More formally, assume that we have a set

More information

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1 P. Guterrez Physcs 5153 Classcal Mechancs D Alembert s Prncple and The Lagrangan 1 Introducton The prncple of vrtual work provdes a method of solvng problems of statc equlbrum wthout havng to consder the

More information

EPR Paradox and the Physical Meaning of an Experiment in Quantum Mechanics. Vesselin C. Noninski

EPR Paradox and the Physical Meaning of an Experiment in Quantum Mechanics. Vesselin C. Noninski EPR Paradox and the Physcal Meanng of an Experment n Quantum Mechancs Vesseln C Nonnsk vesselnnonnsk@verzonnet Abstract It s shown that there s one purely determnstc outcome when measurement s made on

More information

Chapter Newton s Method

Chapter Newton s Method Chapter 9. Newton s Method After readng ths chapter, you should be able to:. Understand how Newton s method s dfferent from the Golden Secton Search method. Understand how Newton s method works 3. Solve

More information

10. Canonical Transformations Michael Fowler

10. Canonical Transformations Michael Fowler 10. Canoncal Transformatons Mchael Fowler Pont Transformatons It s clear that Lagrange s equatons are correct for any reasonable choce of parameters labelng the system confguraton. Let s call our frst

More information

THE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens

THE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens THE CHINESE REMAINDER THEOREM KEITH CONRAD We should thank the Chnese for ther wonderful remander theorem. Glenn Stevens 1. Introducton The Chnese remander theorem says we can unquely solve any par of

More information

Expected Value and Variance

Expected Value and Variance MATH 38 Expected Value and Varance Dr. Neal, WKU We now shall dscuss how to fnd the average and standard devaton of a random varable X. Expected Value Defnton. The expected value (or average value, or

More information

Grover s Algorithm + Quantum Zeno Effect + Vaidman

Grover s Algorithm + Quantum Zeno Effect + Vaidman Grover s Algorthm + Quantum Zeno Effect + Vadman CS 294-2 Bomb 10/12/04 Fall 2004 Lecture 11 Grover s algorthm Recall that Grover s algorthm for searchng over a space of sze wors as follows: consder the

More information

One Dimension Again. Chapter Fourteen

One Dimension Again. Chapter Fourteen hapter Fourteen One Dmenson Agan 4 Scalar Lne Integrals Now we agan consder the dea of the ntegral n one dmenson When we were ntroduced to the ntegral back n elementary school, we consdered only functons

More information

Every planar graph is 4-colourable a proof without computer

Every planar graph is 4-colourable a proof without computer Peter Dörre Department of Informatcs and Natural Scences Fachhochschule Südwestfalen (Unversty of Appled Scences) Frauenstuhlweg 31, D-58644 Iserlohn, Germany Emal: doerre(at)fh-swf.de Mathematcs Subject

More information

HMMT February 2016 February 20, 2016

HMMT February 2016 February 20, 2016 HMMT February 016 February 0, 016 Combnatorcs 1. For postve ntegers n, let S n be the set of ntegers x such that n dstnct lnes, no three concurrent, can dvde a plane nto x regons (for example, S = {3,

More information

Min Cut, Fast Cut, Polynomial Identities

Min Cut, Fast Cut, Polynomial Identities Randomzed Algorthms, Summer 016 Mn Cut, Fast Cut, Polynomal Identtes Instructor: Thomas Kesselhem and Kurt Mehlhorn 1 Mn Cuts n Graphs Lecture (5 pages) Throughout ths secton, G = (V, E) s a mult-graph.

More information

a b a In case b 0, a being divisible by b is the same as to say that

a b a In case b 0, a being divisible by b is the same as to say that Secton 6.2 Dvsblty among the ntegers An nteger a ε s dvsble by b ε f there s an nteger c ε such that a = bc. Note that s dvsble by any nteger b, snce = b. On the other hand, a s dvsble by only f a = :

More information

Kernel Methods and SVMs Extension

Kernel Methods and SVMs Extension Kernel Methods and SVMs Extenson The purpose of ths document s to revew materal covered n Machne Learnng 1 Supervsed Learnng regardng support vector machnes (SVMs). Ths document also provdes a general

More information

1 Matrix representations of canonical matrices

1 Matrix representations of canonical matrices 1 Matrx representatons of canoncal matrces 2-d rotaton around the orgn: ( ) cos θ sn θ R 0 = sn θ cos θ 3-d rotaton around the x-axs: R x = 1 0 0 0 cos θ sn θ 0 sn θ cos θ 3-d rotaton around the y-axs:

More information

On the Repeating Group Finding Problem

On the Repeating Group Finding Problem The 9th Workshop on Combnatoral Mathematcs and Computaton Theory On the Repeatng Group Fndng Problem Bo-Ren Kung, Wen-Hsen Chen, R.C.T Lee Graduate Insttute of Informaton Technology and Management Takmng

More information

Lecture 4: Universal Hash Functions/Streaming Cont d

Lecture 4: Universal Hash Functions/Streaming Cont d CSE 5: Desgn and Analyss of Algorthms I Sprng 06 Lecture 4: Unversal Hash Functons/Streamng Cont d Lecturer: Shayan Oves Gharan Aprl 6th Scrbe: Jacob Schreber Dsclamer: These notes have not been subjected

More information

= z 20 z n. (k 20) + 4 z k = 4

= z 20 z n. (k 20) + 4 z k = 4 Problem Set #7 solutons 7.2.. (a Fnd the coeffcent of z k n (z + z 5 + z 6 + z 7 + 5, k 20. We use the known seres expanson ( n+l ( z l l z n below: (z + z 5 + z 6 + z 7 + 5 (z 5 ( + z + z 2 + z + 5 5

More information

Homework Assignment 3 Due in class, Thursday October 15

Homework Assignment 3 Due in class, Thursday October 15 Homework Assgnment 3 Due n class, Thursday October 15 SDS 383C Statstcal Modelng I 1 Rdge regresson and Lasso 1. Get the Prostrate cancer data from http://statweb.stanford.edu/~tbs/elemstatlearn/ datasets/prostate.data.

More information

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal Inner Product Defnton 1 () A Eucldean space s a fnte-dmensonal vector space over the reals R, wth an nner product,. Defnton 2 (Inner Product) An nner product, on a real vector space X s a symmetrc, blnear,

More information

Fundamental loop-current method using virtual voltage sources technique for special cases

Fundamental loop-current method using virtual voltage sources technique for special cases Fundamental loop-current method usng vrtual voltage sources technque for specal cases George E. Chatzaraks, 1 Marna D. Tortorel 1 and Anastasos D. Tzolas 1 Electrcal and Electroncs Engneerng Departments,

More information

The equation of motion of a dynamical system is given by a set of differential equations. That is (1)

The equation of motion of a dynamical system is given by a set of differential equations. That is (1) Dynamcal Systems Many engneerng and natural systems are dynamcal systems. For example a pendulum s a dynamcal system. State l The state of the dynamcal system specfes t condtons. For a pendulum n the absence

More information

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1 C/CS/Phy9 Problem Set 3 Solutons Out: Oct, 8 Suppose you have two qubts n some arbtrary entangled state ψ You apply the teleportaton protocol to each of the qubts separately What s the resultng state obtaned

More information

Lecture Notes on Linear Regression

Lecture Notes on Linear Regression Lecture Notes on Lnear Regresson Feng L fl@sdueducn Shandong Unversty, Chna Lnear Regresson Problem In regresson problem, we am at predct a contnuous target value gven an nput feature vector We assume

More information

Complement of Type-2 Fuzzy Shortest Path Using Possibility Measure

Complement of Type-2 Fuzzy Shortest Path Using Possibility Measure Intern. J. Fuzzy Mathematcal rchve Vol. 5, No., 04, 9-7 ISSN: 30 34 (P, 30 350 (onlne Publshed on 5 November 04 www.researchmathsc.org Internatonal Journal of Complement of Type- Fuzzy Shortest Path Usng

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Desgn and Analyss of Algorthms CSE 53 Lecture 4 Dynamc Programmng Junzhou Huang, Ph.D. Department of Computer Scence and Engneerng CSE53 Desgn and Analyss of Algorthms The General Dynamc Programmng Technque

More information

Statistical Inference. 2.3 Summary Statistics Measures of Center and Spread. parameters ( population characteristics )

Statistical Inference. 2.3 Summary Statistics Measures of Center and Spread. parameters ( population characteristics ) Ismor Fscher, 8//008 Stat 54 / -8.3 Summary Statstcs Measures of Center and Spread Dstrbuton of dscrete contnuous POPULATION Random Varable, numercal True center =??? True spread =???? parameters ( populaton

More information

ISSN: ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 3, Issue 1, July 2013

ISSN: ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 3, Issue 1, July 2013 ISSN: 2277-375 Constructon of Trend Free Run Orders for Orthogonal rrays Usng Codes bstract: Sometmes when the expermental runs are carred out n a tme order sequence, the response can depend on the run

More information

Finding Dense Subgraphs in G(n, 1/2)

Finding Dense Subgraphs in G(n, 1/2) Fndng Dense Subgraphs n Gn, 1/ Atsh Das Sarma 1, Amt Deshpande, and Rav Kannan 1 Georga Insttute of Technology,atsh@cc.gatech.edu Mcrosoft Research-Bangalore,amtdesh,annan@mcrosoft.com Abstract. Fndng

More information

Chapter 8. Potential Energy and Conservation of Energy

Chapter 8. Potential Energy and Conservation of Energy Chapter 8 Potental Energy and Conservaton of Energy In ths chapter we wll ntroduce the followng concepts: Potental Energy Conservatve and non-conservatve forces Mechancal Energy Conservaton of Mechancal

More information

Lecture 2: Gram-Schmidt Vectors and the LLL Algorithm

Lecture 2: Gram-Schmidt Vectors and the LLL Algorithm NYU, Fall 2016 Lattces Mn Course Lecture 2: Gram-Schmdt Vectors and the LLL Algorthm Lecturer: Noah Stephens-Davdowtz 2.1 The Shortest Vector Problem In our last lecture, we consdered short solutons to

More information

Interactive Bi-Level Multi-Objective Integer. Non-linear Programming Problem

Interactive Bi-Level Multi-Objective Integer. Non-linear Programming Problem Appled Mathematcal Scences Vol 5 0 no 65 3 33 Interactve B-Level Mult-Objectve Integer Non-lnear Programmng Problem O E Emam Department of Informaton Systems aculty of Computer Scence and nformaton Helwan

More information

Polynomial Regression Models

Polynomial Regression Models LINEAR REGRESSION ANALYSIS MODULE XII Lecture - 6 Polynomal Regresson Models Dr. Shalabh Department of Mathematcs and Statstcs Indan Insttute of Technology Kanpur Test of sgnfcance To test the sgnfcance

More information

Errors for Linear Systems

Errors for Linear Systems Errors for Lnear Systems When we solve a lnear system Ax b we often do not know A and b exactly, but have only approxmatons  and ˆb avalable. Then the best thng we can do s to solve ˆx ˆb exactly whch

More information

coordinates. Then, the position vectors are described by

coordinates. Then, the position vectors are described by Revewng, what we have dscussed so far: Generalzed coordnates Any number of varables (say, n) suffcent to specfy the confguraton of the system at each nstant to tme (need not be the mnmum number). In general,

More information