ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 15 april Master Edition
|
|
|
- Sharon Dennis
- 9 years ago
- Views:
Transcription
1 ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK 5 april 23 Master Edition
2 CONTEXT FREE LANGUAGES & PUSH-DOWN AUTOMATA CONTEXT-FREE GRAMMARS, CFG Problems Sudkamp Problem. (3.2.) Which language generates the grammar G given by the productions S asa aba B bb b Problem 2. (3.2.2) Find a CFG that generates the language: Problem 3. (3.2.4) Find a CFG that generates the language Problem 4. (3.2.5) Consider the grammar What language does it generate? L(G) = { a n b m c m d 2n n, m > }. L(G) = { a n b m n m 2n}. S abscb λ B bb b Problems Lewis-Papadimitriou Construct context free grammars to accept the following languages. Problem 5. Problem 6. (2.4b) {w w starts and ends with the same symbol} (2.4c) {w w is odd} Problem 7. (2.4d) {w w is odd and its middle symbol is } 2
3 Problem 8. {w#x w R is a substring of x, where w, x {a, b} * } Problem 9. { n n n>} U { n 2n n>} Problem. { i j 2 k i j or j k} Problem. Binary strings with twice as many s as s. Problems Linz Problem 2. (34/8c): Find a Context-Free Grammar for the following language: Problem 3. (34/8c): Ambiguity L = {a n b m c k : k = n + m } L = {a n b m c k : k n + m } (Variation on a theme). Problem 4. Explain why the grammar below is ambiguous. S A B A AA S B BB S Problem 5. Given the following ambiguous context free grammar S Ab aab A a Aa B b (a) Find the string s generated by the grammar that has two leftmost derivations. Show the derivations. (b) Show the two derivation trees for the string s. (c) (d) Find an equivalent unambiguous context-free grammar. Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. ATT REDOVISA ORDINARIE REDOVISNING Problem 4 &Problem 8 ATT REDOVISA EXTRA REDOVISNING Problem 9 &Problem 5 3
4 PUSH-DOWN AUTOMATA, PDA Sudkamp Problem. CH Let M be the PDA that accepts even-length palindromes over {a, b}. That is, L(M) = { w w R w {a, b}*} Where non-determinism allows the machine to guess when the middle of the string has been reached. b λ/b a λ/a b B/λ a A/λ q λλ/λ q which in Linz notation looks like this: b, λ B a, λ A b, B λ a, A λ λ, λ λ q q (a, b/c stands for a, b c) a) Give the transition table of M. b) Trace all computation of the strings ab, abb, abbbb in M. c) Show that aaaa, baab L (M). d) Show that aaa, ab L (M). 4
5 Problem 2. CH8 3k Construct a PDA that accepts the set of palindromes over {a, b}. Problem 3. CH8 5a Let M be the PDA in example 8... the PDA that accepts the language R L = { wcw w { a, b} }. The stack is used to record the string w as it is processed. Stack symbols A and B represent input a and b respectively. b λ/b a λ/a q c λ/λ b B/λ a A/λ q A successful computation records the string w on the stack as it is processed. Once the c is encountered, the accepting state q is entered and the stack contains a string representing w R. The computation is completed by matching the remaining input with the elements of the stack. Trace the computation that accepts bbcbb. 5
6 NPDA EXAMPLES Sipser Construct non-deterministic pushdown automata to accept the following languages. (Note: ε has the same meaning as λ) Example. { n n n > } Example 2. { n 2n n } Example 3. { n n n>} U { n 2n n } Example 4. (+)* - {ww w in {,}*} (complement of ww) Linz Example 5. L = {a n b 2n : n } Example 6. Example 7. L = {ωσω R : ω {a,b}*, σ {a,b}} Construct the NPDA corresponding to the grammar S aabb aaa A abb a B bbb A (Problem 5 on page 94, Linz) DPDA EXAMPLES Sipser Construct deterministic pushdown automata to accept the following languages. Example 8. { n n n>} U { n 2n n>} Example 9. Binary strings that contain an equal number of s and s. Example. Binary strings with twice as many s as s. 6
7 Example. Binary strings that start and end with the same symbol and have the same number of s as s. Linz Example 2. Show that L = {a n b m : m n + 2} is deterministic. (Problem 2 on page 99.) Problems Linz Problem 6. (34/8c): Find a Context-Free Grammar for the following language: L = {a n b m c k : k = n + m } Problem 7. (34/8c): L = {a n b m c k : k n + m } (Variation on a theme). Ambiguity Problem 8. Explain why the grammar below is ambiguous. S A B A AA S B BB S ATT REDOVISA ORDINARIE REDOVISNING Example 6 & Example 8 ATT REDOVISA EXTRA REDOVISNING Problem 2 &Problem 7
8 PUMPING LEMMA: CONTEXT-FREE OR NOT? Problem. Show that the following language on Σ = {a, b, c} is not context-free. L = {a n b j c k : k = jn}. Problem 2. Show that the following language on Σ = {a, b} is not context-free: L = { ww R a w : w {a, b}*} Problem 3. (CH8 7c Sudkamp) Using the pumping lemma prove that the language below is not context-free. L i 2i = { a b a i i } Problem 4. Problem 5. (CH8 8a Sudkamp) Prove that the language i 2i j L = { a b c i, j } is context-free. (7 page 22, Linz) We want to prove that the language L = {a n b n : n and n is not a multiple of 5} is a context-free language. Problem 6. { k i i j j k i, j, k > } Problem 7. {w#x w is a substring of x, where w, x are in {,}*}. Problem 8. { i i j i i, j > } Problem 9. The complement of {( n n ) m m, n > }. Problem. 2.8 a. (Lewis-Papadimitriou): A = { n n n n n >= }. Problem. 2.8 b (Lewis-Papadimitriou): B = { n # 2n # 3n n >= }. Problem c (Lewis-Papadimitriou): C = { w#x w is a substring of x, where w, x {a, b}*}. ATT REDOVISA ORDINARIE REDOVISNING Problem 4 & Problem ATT REDOVISA EXTRA REDOVISNING Problem 2 &Problem 8
9 SOLUTIONS CONTEXT-FREE GRAMMARS, CFG Sudkamp examples Problem Which language generates the grammar G given by the productions S asa aba B bb b L(G) = { a n b m a n n >, m > }. The rule S asa recursively builds an equal number of a s on each end of the string. The recursion is terminated by the application of the rule S aba, ensuring at least one leading and one trailing a. The recursive B rule then generates any number of b s. To remove the variable B from the string and obtain a sentence of the language, the rule B b must be applied, forcing the presence of at least one b. Problem Find a CFG that generates the language L(G) = { a n b m c m d 2n n, m > }. The relationship between the number of leading a s and trailing d s in the language indicates that the recursive rule is needed to generate them. The same is true for b s and c s. Derivations in the grammar S asdd A A bac bc 9
10 generate strings in an outside-to-inside manner. The S rules produce the a s and d s while the A rules generate b s and c s. The rule A bc, whose application terminates the recursion, ensures the presence of the substring bc in every string in the language. Problem Find a CFG that generates the language L(G) = { a n b m n m 2n}. S asb asbb λ The first recursive rule of G generates a trailing b for every a, while the second generates two b s for each a. Thus there is at least one b for every a and at most two, as specified in the language. Problem Consider the grammar S abscb λ B bb b What language does it generate? The recursive S rule generates an equal number of ab s and cb s. The B rules generate b +. In a derivation, each occurrence of B may produce a different number of b s. For example in the derivation S abscb ababscbcb ababcbcb ababcbcb ababcbcbb ababcbcbb, the first occurrence of B generates a single b and the second occurrence produces bb. The language of the grammar consists of the set L(G) = { (ab) n (cb m ) n n, m > }.
11 Problems Lewis-Papadimitriou Construct context free grammars to accept the following languages. Σ = {, } Problem 5. (2.4b) {w w starts and ends with the same symbol} S A A A A A λ Problem 6. (2.4c) {w w is odd} S A A S S λ Problem 7. (2.4d) {w w is odd and its middle symbol is } S S S S S Problem 8. {w#x w R is a substring of x, where w, x {a, b} * } The following grammar generates language L, where S is the start variable. S AT A aaa bab #T T at bt λ The strings in the language have the form w#uw R v, where u and v are strings of the form (a + b)* (any string made from symbols a and b). The variable T generates the strings u and v, while variable A generates the string w#uw R and the variable S generates the desired string w#uw R v.
12 Problem 9. { n n n>} U { n 2n n>} S A B A A λ B B λ Problem. { i j 2 k i j or j k} S AC BC DE DF A A A B B B C 2 2C D D E E E2 F 2 F2 F2 Problem. Binary strings with twice as many s as s. S λ SSS SSS SSS Problem 2. Find a Context-Free Grammar for the following language: L = {a n b m c k : k = n + m } 2
13 Let G be the grammar with productions: S asc B B bbc λ Claim: L(G) = L Proof: Consider the following derivation: S * a n Sc n a n Bc n * a n b m Bc m c n a n b m (n + m) c (where the first * applies S asc n times, the second B bbc m times) Since all words in L(G) must follow this pattern in their derivations, it is clear that L(G) L Consider w L, w = a n b m c (n+m) for some n, m The derivation S * a n Sc n a n Bc n * a n b m Bc m c n a n b m (n + m) c clearly produces w for any n, m. L L(G) L = L(G) G is a CFG for L Problem 3. L = {a n b m c k : k n + m } (Variation on a theme). Let G be the grammar with productions: S EcC aae AU A aa λ B bb λ C cc λ E aec F F bfc λ 3
14 U auc V V bvc bb Note: L(E) = {a n b m c k : k = n + m } (from 4(a) in Linz book) Let L = {a n b m c k : k < n + m }, L2 = {a n b m c k : k > n + m } Claim: L(G) = L = L L2 Proof: Consider the leftmost productions following S EcC S EcC * a n b m c (n+m) cc * a n b m c (n+m) cc k C a n b m c (n+m) cc k = a n b m c (n+m+k+) (where the first * follows from 4(a), the second from k repetitions of { C cc }) Since (n+m) < (n+m+k+), L(EcC) L2 L 4(a)) Consider the leftmost productions following S aae S aae * aa k AE aa k E * aa k a n b m c (n+m) c = a (n+k+) b m c (n+m) (where the first * follows from k repetitions of { A aa }, the second from Since (n+m+k+) > (n+m), L(aAE) L L Consider the leftmost productions following S AU S AU * a k AU a k U * a k a n Uc n a k a n Vc n * a k a n b m Vc m c n a k a n b m bbc m c n * a k a n b m bb j Bc m c n a k a n b m bb j c m c n = a (k+n) b (m+j+) c (m+n) (where the first, second, third and fourth * are k, n, m, and j repetitions of { A aa }, { U auc }, { V bvc }, and { B bb }, respectively) Since ((k+n)+(m+j+)) > (m+n), L(AU) L L 4
15 L(G) = L(S) = L(EcC) L(aAE) L(AU) L L2 = L Consider w L, w = a n b m c (n+m+k) for some n, m, k, with k > Then w has the leftmost derivation: S EcC * a n b m c (n+m) cc * a n b m c (n+m) cc (k-) C a n b m c (n+m) cc k(k-) = a n b m c (n+m+k) = w L2 L(G) Consider w L2, w = a (n+j) b (m+k) c (n+m) for some j, k, m, n, with j+k > If k =, w has the leftmost derivation: S aae * aa (j-) AE aa (j-) E * aa (j-) a n Ec n aa (j-) a n Fc n * aa (j- ) a n b m Fc m c n aa (j-) a n b m c m c n = a (j+n) b (+m) c (m+n) = w L (k = ) L(G) If k >, then w has the leftmost derivation: S AU * a j AU a j U * a j a n Uc n a j a n Vc n * a j a n b m Vc m c n a j a n b m bbc m c n a j a n b m bb (k-) Bc m c n a j a n b m bb (k-) c m c n = a (j+n) b (m+k) c (m+n) = w L (k > ) L(G) L L(G) L = L L2 L(G) L = L(G) Ambiguity Problem 4. Explain why the grammar below is ambiguous. 5
16 S A B A AA S B BB S The grammar is ambiguous because we can find strings which have multiple derivations: S A AA S B S A AA S A Problem 5. Given the following ambiguous context free grammar S Ab aab A a Aa B b (a) Find the string s generated by the grammar that has two leftmost derivations. Show the derivations. The string s = aab has the following two leftmost derivations S aab aab S AB AaB aab aab (b) Show the two derivation trees for the string s. The two derivation trees of string aab are shown below. 6
17 (c) Find an equivalent unambiguous context-free grammar. The equivalent unambiguous grammar is following S Ab A a Aa This grammar is not ambiguous because at any derivation step there is only one choice to make. This grammar is equivalent to the previous one, because both grammars generate the same language: all the strings that start with one or more a, and end with a single b. (d) Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. With the new grammar the unique leftmost derivation and derivation tree of the string aab are shown below. 7
18 PUSH-DOWN AUTOMATA, PDA Problem. CH Sudkamp Let M be the PDA that accepts even-length palindromes over {a, b}. That is, L(M) = { w w R w {a, b}*} Where non-determinism allows the machine to guess when the middle of the string has been reached. b λ/b a λ/a b B/λ a A/λ q λλ/λ q which in Linz notation looks like this: b, λ B a, λ A b, B λ a, A λ λ, λ λ q q (a, b/c stands for a, b c) a) Give the transition table of M. b) Trace all computation of the strings ab, abb, abbbb in M. c) Show that aaaa, baab L (M). d) Show that aaa, ab L (M). 8
19 : a) Give the transition table of M. δ ( q δ ( q δ ( q, a, λ) = {[ q, b, λ) = {[ q, A]}, B]}, λ, λ) = {[ q, } δ ( q, a, A) = {[ q, } δ ( q, b, B) = {[ q, } δ a b λ q q λ /A q λ /B q λ / λ q q A/ λ q B/ λ φ Notation: The PDA consults the current state, input symbol, and the symbol on the top of the stack to determine the machine transition. The transition function δ lists all possible transitions for a given state, symbol, and stack top combination. The value of the transition function δ ( qi, a, A) = {[ q j, B],[ qk, C]} indicates that two transitions are possible when automaton is in state qi scanning an A with A on top of the stack. The transition [ q j, B] δ ( qi, a, A) [new state, new stack top] δ(current state, current input, current stack top) q i a, A B q j 9
20 b) Trace all computation of the strings ab, abb, abbbb in M. Computations for ab: [ q, ab, [ q, ab, [ q, ab, - [ q, b, A] - [ q, b, A], ab, - [ q, λ, BA], b, A] Rejected., λ, BA] Rejected. Rejected. Computations for abb: [ q, abb, [ q, abb, [ q, abb, [ q, abb, - [ q, bb, A] - [ q, bb, A] - [ q, bb, A], abb, - [ q, b, BA] - [ q, b, BA], bb, A] Rejected. - [ q, λ, BBA], b, BA] Rejected., λ, BBA], λ, A] Rejected. Rejected. Computations for abbb: c) Show that aaaa, baab L (M). Both aaaa, baab are accepted by this PDA, so they are in L (M). [ q, aaaa, [ q, baab, - [ q, aaa, A] - [ q, aa, AA], aa, AA], a, A], λ, Accepted. - [ q, aab, B] - [ q, ab, AB], ab, AB], b, B], λ, Accepted. 2
21 d) Show that aaa, ab L (M). The computations for string aaa: [ q, aaa, [ q, aaa, [ q, aaa, [ q, aaa, - [ q, aa, A] - [ q, aa, A] - [ q, aa, A], aaa, - [ q, a, AA] - [ q, a, AA], aa, A] Rejected. - [ q, λ, AAA], λ, AAA] Rejected., a, AA], λ, A] Rejected., a, Rejected. The computations for ab are shown in part b). There is none of the computations accepting the strings, so they are not in L (M). 2
22 Problem 2. CH8 3k Sudkamp p. 252 Construct a PDA that accepts the set of palindromes over {a, b}. : Construct the PDA: M: Q = q, q } F = { { = { a, b} Γ = { A, B} q } b λ/b a λ/a q b λ/λ a λ/λ λλ/λ b B/λ a A/λ q δ ( q δ ( q δ ( q, a, λ) = {[ q, b, λ) = {[ q, λ, λ) = {[ q, } δ ( q, a, A) = {[ q, } δ ( q, b, B) = {[ q, }, A],[ q, }, B],[ q, } 22
23 Problem 3. CH8 5a Let M be the PDA in example 8... the PDA that accepts the language R L = { wcw w { a, b} }. The stack is used to record the string w as it is processed. Stack symbols A and B represent input a and b respectively. b λ/b a λ/a q c λ/λ b B/λ a A/λ q A successful computation records the string w on the stack as it is processed. Once the c is encountered, the accepting state q is entered and the stack contains a string representing w R. The computation is completed by matching the remaining input with the elements of the stack. Trace the computation that accepts bbcbb. : [ q, bbcbb, - [ q, bcbb, B] - [ q, cbb, BB], bb, BB], b, B], λ, Accepted. 23
24 NPDA EXAMPLES (Sipser) Construct non-deterministic pushdown automata to accept the following languages. (Note: ε has the same meaning as λ) Example. { n n n>} Example 2. { n 2n n>=} Example 3. { n n n>} U { n 2n n>=} 24
25 Example 4. (+)* - {ww w in {,}*} (complement of ww) Linz Equivalent with Sipser Example 2, in different notation. Remark: The notation a, b/c stands for a, b c Example 5. L = {a n b 2n : n } a,a/aaa b,a/λ a,$/aa b,a/λ λ,$/$ Example 6. L = {ωσω R : ω {a,b}*, σ {a,b}} a,λ/a; b,λ/b a,λ/λ; b,λ/λ a,a/λ; b,b/λ λ,$/$ 25
26 Example 7. Construct the NPDA corresponding to the grammar (Problem 5 one page 94, Linz) S aabb aaa A abb a B bbb A λ,$/s λ,s/aabb λ,s/aaa λ,a/abb λ,a/a a,a/λ λ,b/bbb b,b/λ λ,$/$ DPDA EXAMPLES (Sipser) Construct deterministic pushdown automata to accept the following languages. Example 8. { n n n>} U { n 2n n>} 26
27 Example 9. Binary strings that contain an equal number of s and s. Example. Binary strings with twice as many s as s. 27
28 Example. Binary strings that start and end with the same symbol and have the same number of s as s. Example 2. Show that L = {a n b m : m n + 2} is deterministic. (Problem 2 on page 99, Linz a,λ/a b,a/λ b,a/λ b,$/$ b,$/$ b,$/$ b,$/$ Since there is a DPDA that accepts L, L is deterministic. 28
29 PUMPING LEMMA: CONTEXT-FREE OR NOT? Problem. Show that the following language on Σ = {a, b, c} is not context-free. L = {a n b j c k : k = jn}. Assume that L = {a n b j c k : k = jn} is a context free language. Let m m m w = a b c, w L 2 By the Pumping Lemma w can be decomposed as w = uvxyz with vxz m and vy such that uv xy z L, i i i case If i=, aaa 4243 K aab 4243 L bc L c uvxy z uv xy z = a m 2 vy b m c m L case 2 aaa 4243 K aab {{{ KbcK uv x y z If i=, uv xy z = a m 2 v b m y c m L case 3 If i=, aaa 4243 K abb{ K bbc 2 K 3c u vxy z uv xy z = a m b m 2 vy c m L case 4 aaa 4243 K abb{{{ KbbccKc u v x yz 29
30 If i=, uv xy z = a m b m v c m 2 y L case 5 aaa 42 4 K ab43 K4 bcc{ Kc u vxyz If i=, m uv xy z = a b m c 2 m vy L case 6 v or y containing ab or bc If I >, uv i xy i z would be a ab ba ab b c c Or a ab bc cb c Contrary to the assumption. Language is not context free. Problem 2. Show that the following language on Σ = {a, b} is not context-free: L = { ww R a w : w {a, b}*} case Assume that L = { ww R a w : w {a, b}*}is a context free language. Let w = a m b m R m m m m 2m, then ww a = a b b a a L w By the Pumping Lemma w can be decomposed as w = uvxyz with vxz m i i and vy such that uv xy z L, i a K 4243 ab K bb K4ba 4 K 24aa4 K3a uvxy z If i=, w = 2m - vy is less than w R. So uv xy z L. case 2 3
31 a 4243 K ab K b K4ba 4 K 24aa4K 3a uvxy If i=, w R = 2m - vy is less than w. So uv xy z L. z case 3 If i=, a K 4ab 44 Kbb 2 K 4ba 444 K3aab 4243 KK a u vxyz a w = 2 m vx < w. So uv xy z L. case 4 a K 23 abb 4243 KK bba 4243 KaaKa u vxy z If i=, ww R w = 4 m vy < 2 a = 4m. So uv xy z L. case 5 If i=, a K 4ab 4 K 2bb 4K4 3ba K a 4243 KK aaa23 K a w u w R a = 4 m vy < 2 w = 4 m. So uv xy z L. vxy z This is contrary to the assumption. Language L is therefore not context free. Problem 3. CH8 7c Sudkamp 3
32 Using the pumping lemma prove that the language below is not context-free. i 2i L = { a b a i i } Proof: k 2k k Assume that the language is context-free. By the pumping lemma, the string w = a b a, where k is the number specified by the pumping lemma, can be decomposed into sub-string uvwxy that i satisfy the condition length (vwx) k, length (v) + length (x) >, and uv wx Since the length (vwx) k, the vwx can have the following possibilities: Case : It contains a-s and b-s ( a i b j or b i a j, i j k i y L, ( i ). < +. Since length (vwx) k, it cannot have a-s at both side of b-s,). Then Case 2: uv 2 wx 2 y contains a b a b a. It will not be in L any more. It is contained in one of k a, k b 2 or second k a. Since the repetition in uv 2 wx 2 y will increase one of the string s lengths of a k k, b 2 or second a k, the ratio of :2: will not be satisfied. Then uv 2 wx 2 y L. There is no decomposition L that satisfies the condition of pumping lemma. Therefore, L is not context free. 32
33 Problem 4. CH8 8a i 2i j Prove that the language L = { a b c i, j } is context-free. Proof: A context-free language can be expressed by a context-free grammar. The context-free grammar below expresses the language L. G: S AB A aabb λ B cb λ Also, if a language L can be accepted by a PDA, it will be a context-free language. We can construct a PDA to accept language L as below. a λ/a c λ/λ λλ/λ q q λλ/λ q 3 b A/λ b λ/λ q 2 Therefore, the language L is context-free. Problem 5. 7 page 22, Linz We want to prove that the language L = {a n b n : n and n is not a multiple of 5} is a contextfree language. Consider the following two languages: L ={w : w is made from a s and b s and the length of w is a multiple of ten} 33
34 L 2 = {a n b n : n } Let L denote the complement of L. We have that L = L L 2. It is easy to see that L is a regular language, since we can easily build a finite automaton with states that accepts any string in this language. Since L is regular it must be that L is regular too, since regular languages are closed under complement (Theorem 4.). The language L 2 is context-free ( the grammar is: S->aSb λ). Therefore, the language L = L L 2 is also context-free, since context-free languages are closed under regular intersection (Theorem 8.5). Problem 6. { k i i j j k i, j, k > } CF. Here is a grammar that will generate the language. S A A A B B CC C D D D λ Problem 7. {w#x w is a substring of x, where w, x are in {,}*}. Not CF. Assume for the purpose of contradiction that it is. Then let the pumping length be p. Consider the string s= p p # p p, which is in the language. If we decompose s into s=uvwxy as in the statement of the pumping lemma, there are three cases to consider. If vwx is contained in the first half of the string s, then pumping up even once (that is, taking the string uv 2 wx 2 y) will give us a string where the first half is 34
35 longer than then second half, which means it can't be a substring of the second half. If vwx is contained completely in the second half, then when we pump down (that is, take the string uwy). Then the second half will be shorter than the first half (since vwx >=) and so the pumped down string will not be in the language. If vwx overlaps with the symbol #, then it must be the case that the # is contained in w, or else pumping up would give too many # symbols. So either the v will be a string of 's or the x will be a string of 's or both (We need the fact that vwx <= p here). If v is a nonempty string of 's then pumping up will give the left half more 's then the right side, so the left side will not be a subset of the right side. If x is a nonempty string of zeros then pumping down will give the right side fewer zeros than the left so the left side will not be a subset of the right side. In any case we come to the conclusion that no matter how we choose the decomposition, the conditions of the pumping lemma will be violated. So the language cannot be regular. Problem 8. { i i j i i, j > } Not CF. Suppose it is. Then let the pumping length be p. Consider the string s= p p p, which is in the language. If we decompose s into s=uvwxy as in the statement of the pumping lemma, then an argument like the previous one shows that if vwx is anything but the lone zero between the ones, then pumping up will give you something that is not in the language. On the other hand if vwx is the lone zero, then pumping down will give you. p p p, which is not in the language. This contradicts the pumping lemma, so therefore the language is not context free. Problem 9. The complement of {( n n ) m m, n > }. 35
36 CF. Here is a grammar that generates the language, with some comments on the side to explain what each non-terminal represents. S ABA A λ AC C C; n n B B D F; m n m n D D; one or more s F F; one or more s Why this works: Since R=(**)(**)* is regular, the complement ~R includes all strings which are not even of the correct form. We can Union ** complement... nondeterministically guess which pair mismatches. Problem. 2.8 a. (Lewis-Papadimitriou) A = { n n n n n >= }. Not CF. Let p be the pumping length given by the pumping lemma. We show that s = p p p p cannot be pumped. Let s = uvxyz. If either v or y contain more than one type of alphabet symbol, s` = uv 2 xy 2 z does not contain the symbols in the correct order. Hence s` A. If both v and y contain (at most) one type of alphabet symbol, uv 2 xy 2 z contains runs of s and s of unequal length. Hence s` A. Because s cannot be pumped in any way without violating the pumping lemma, A is not CF. 36
37 Problem. 2.8 b. B = { n # 2n # 3n n >= }. Not CF. Let p be the pumping length given by the pumping lemma. We show that s = p # 2p # 3p cannot be pumped. Let s = uvxyz. Neither v nor y can contain #, otherwise s` = uv 2 xy 2 z contains more than two #s. Therefore, if we divide x into three segments by #s: p, 2p, 3p, at least one of the segments is not contained within either v or y. Hence, s` = uv 2 xy 2 z is not in B because the : 2 : 3 length ratio of the segments is not maintained. Hence s` B. Because s cannot be pumped in any way without violating the pumping lemma, B is not CF. Problem c. C = { w#x w is a substring of x, where w, x {a, b}*}. Not CF. Let p be the pumping length given by the pumping lemma. We show that s = a p b p #a p b p cannot be pumped. Let s = uvxyz. Neither v nor y can contain #, otherwise s` = uv xy z does not contain # and therefore s` C. If both v and y are nonempty and occur on the LHS of the #, the string s` = uv 2 xy 2 z C because it is longer on the LHS than on the RHS. Similarly, if both strings occur on the RHS, the string s` = uv xy z C because, again, the LHS is longer than the RHS. If only one of v and y is nonempty ( vy >, therefore v and y can not be empty at the same time), treat them as if they both occurred on the same side of the # as above. The only remaining case will be where both v and y are nonempty and v is on the LHS, y on the RHS. However, vxy <= p, therefore, v can only contain b s and y can only contain a s. Hence s` = uv 2 xy 2 z C because it contains more b s on the LHS than on the RHS. 37
38 Since s cannot be pumped in any way without violating the pumping lemma, C is not CF. Referenser. Linz, An Introduction to Formal Languages and Automata, Jones & Bartlett 2 2. Sipser, Introduction to the Theory of Computation, PWS Sudkamp, Languages and Machines, Addison Wesley Lewis-Papadimitriou, Elements of the Theory of Computation, Prentice Hall
Pushdown Automata. place the input head on the leftmost input symbol. while symbol read = b and pile contains discs advance head remove disc from pile
Pushdown Automata In the last section we found that restricting the computational power of computing devices produced solvable decision problems for the class of sets accepted by finite automata. But along
CS103B Handout 17 Winter 2007 February 26, 2007 Languages and Regular Expressions
CS103B Handout 17 Winter 2007 February 26, 2007 Languages and Regular Expressions Theory of Formal Languages In the English language, we distinguish between three different identities: letter, word, sentence.
Automata and Computability. Solutions to Exercises
Automata and Computability Solutions to Exercises Fall 25 Alexis Maciel Department of Computer Science Clarkson University Copyright c 25 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010. Class 4 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 4 Nancy Lynch Today Two more models of computation: Nondeterministic Finite Automata (NFAs)
Pushdown automata. Informatics 2A: Lecture 9. Alex Simpson. 3 October, 2014. School of Informatics University of Edinburgh [email protected].
Pushdown automata Informatics 2A: Lecture 9 Alex Simpson School of Informatics University of Edinburgh [email protected] 3 October, 2014 1 / 17 Recap of lecture 8 Context-free languages are defined by context-free
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
(IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.
3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem
Automata and Formal Languages
Automata and Formal Languages Winter 2009-2010 Yacov Hel-Or 1 What this course is all about This course is about mathematical models of computation We ll study different machine models (finite automata,
CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013
CMPSCI 250: Introduction to Computation Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013 Regular Expressions and Their Languages Alphabets, Strings and Languages
Fundamentele Informatica II
Fundamentele Informatica II Answer to selected exercises 1 John C Martin: Introduction to Languages and the Theory of Computation M.M. Bonsangue (and J. Kleijn) Fall 2011 Let L be a language. It is clear
Increasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course [Extended Abstract] Susan H. Rodger [email protected] Jinghui Lim Stephen Reading ABSTRACT The introduction of educational
3515ICT Theory of Computation Turing Machines
Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation
2110711 THEORY of COMPUTATION
2110711 THEORY of COMPUTATION ATHASIT SURARERKS ELITE Athasit Surarerks ELITE Engineering Laboratory in Theoretical Enumerable System Computer Engineering, Faculty of Engineering Chulalongkorn University
Turing Machines: An Introduction
CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,
C H A P T E R Regular Expressions regular expression
7 CHAPTER Regular Expressions Most programmers and other power-users of computer systems have used tools that match text patterns. You may have used a Web search engine with a pattern like travel cancun
Regular Languages and Finite State Machines
Regular Languages and Finite State Machines Plan for the Day: Mathematical preliminaries - some review One application formal definition of finite automata Examples 1 Sets A set is an unordered collection
CS5236 Advanced Automata Theory
CS5236 Advanced Automata Theory Frank Stephan Semester I, Academic Year 2012-2013 Advanced Automata Theory is a lecture which will first review the basics of formal languages and automata theory and then
Theory of Computation Class Notes 1
Theory of Computation Class Notes 1 1 based on the books by Sudkamp and by Hopcroft, Motwani and Ullman ii Contents 1 Introduction 1 1.1 Sets.............................................. 1 1.2 Functions
Compiler Construction
Compiler Construction Regular expressions Scanning Görel Hedin Reviderad 2013 01 23.a 2013 Compiler Construction 2013 F02-1 Compiler overview source code lexical analysis tokens intermediate code generation
Reading 13 : Finite State Automata and Regular Expressions
CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model
Deterministic Finite Automata
1 Deterministic Finite Automata Definition: A deterministic finite automaton (DFA) consists of 1. a finite set of states (often denoted Q) 2. a finite set Σ of symbols (alphabet) 3. a transition function
Computability Theory
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.
CS 3719 (Theory of Computation and Algorithms) Lecture 4
CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a
Model 2.4 Faculty member + student
Model 2.4 Faculty member + student Course syllabus for Formal languages and Automata Theory. Faculty member information: Name of faculty member responsible for the course Office Hours Office Number Email
Introduction to Automata Theory. Reading: Chapter 1
Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a
CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.
CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write
Honors Class (Foundations of) Informatics. Tom Verhoeff. Department of Mathematics & Computer Science Software Engineering & Technology
Honors Class (Foundations of) Informatics Tom Verhoeff Department of Mathematics & Computer Science Software Engineering & Technology www.win.tue.nl/~wstomv/edu/hci c 2011, T. Verhoeff @ TUE.NL 1/20 Information
Regular Languages and Finite Automata
Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a
Automata on Infinite Words and Trees
Automata on Infinite Words and Trees Course notes for the course Automata on Infinite Words and Trees given by Dr. Meghyn Bienvenu at Universität Bremen in the 2009-2010 winter semester Last modified:
On Winning Conditions of High Borel Complexity in Pushdown Games
Fundamenta Informaticae (2005) 1 22 1 IOS Press On Winning Conditions of High Borel Complexity in Pushdown Games Olivier Finkel Equipe de Logique Mathématique U.F.R. de Mathématiques, Université Paris
Course Manual Automata & Complexity 2015
Course Manual Automata & Complexity 2015 Course code: Course homepage: Coordinator: Teachers lectures: Teacher exercise classes: Credits: X_401049 http://www.cs.vu.nl/~tcs/ac prof. dr. W.J. Fokkink home:
Markov random fields and Gibbs measures
Chapter Markov random fields and Gibbs measures 1. Conditional independence Suppose X i is a random element of (X i, B i ), for i = 1, 2, 3, with all X i defined on the same probability space (.F, P).
Implementation of Recursively Enumerable Languages using Universal Turing Machine in JFLAP
International Journal of Information and Computation Technology. ISSN 0974-2239 Volume 4, Number 1 (2014), pp. 79-84 International Research Publications House http://www. irphouse.com /ijict.htm Implementation
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy
Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety
Scanner. tokens scanner parser IR. source code. errors
Scanner source code tokens scanner parser IR errors maps characters into tokens the basic unit of syntax x = x + y; becomes = + ; character string value for a token is a lexeme
Push-down Automata and Context-free Grammars
14 Push-down Automata and Context-free Grammars This chapter details the design of push-down automata (PDA) for various languages, the conversion of CFGs to PDAs, and vice versa. In particular, after formally
Automata Theory. Şubat 2006 Tuğrul Yılmaz Ankara Üniversitesi
Automata Theory Automata theory is the study of abstract computing devices. A. M. Turing studied an abstract machine that had all the capabilities of today s computers. Turing s goal was to describe the
I. GROUPS: BASIC DEFINITIONS AND EXAMPLES
I GROUPS: BASIC DEFINITIONS AND EXAMPLES Definition 1: An operation on a set G is a function : G G G Definition 2: A group is a set G which is equipped with an operation and a special element e G, called
Regular Languages and Finite Automata
Regular Languages and Finite Automata A C Norman, Lent Term 1996 Part IA 1 Introduction This course is short, but it is present in Part 1A because of the way it introduces links between many different
Linear Algebra I. Ronald van Luijk, 2012
Linear Algebra I Ronald van Luijk, 2012 With many parts from Linear Algebra I by Michael Stoll, 2007 Contents 1. Vector spaces 3 1.1. Examples 3 1.2. Fields 4 1.3. The field of complex numbers. 6 1.4.
ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605
ASSIGNMENT ONE SOLUTIONS MATH 4805 / COMP 4805 / MATH 5605 (1) (a) (0 + 1) 010 (finite automata below). (b) First observe that the following regular expression generates the binary strings with an even
INCIDENCE-BETWEENNESS GEOMETRY
INCIDENCE-BETWEENNESS GEOMETRY MATH 410, CSUSM. SPRING 2008. PROFESSOR AITKEN This document covers the geometry that can be developed with just the axioms related to incidence and betweenness. The full
Formal Grammars and Languages
Formal Grammars and Languages Tao Jiang Department of Computer Science McMaster University Hamilton, Ontario L8S 4K1, Canada Bala Ravikumar Department of Computer Science University of Rhode Island Kingston,
Informatique Fondamentale IMA S8
Informatique Fondamentale IMA S8 Cours 1 - Intro + schedule + finite state machines Laure Gonnord http://laure.gonnord.org/pro/teaching/ [email protected] Université Lille 1 - Polytech Lille
T ( a i x i ) = a i T (x i ).
Chapter 2 Defn 1. (p. 65) Let V and W be vector spaces (over F ). We call a function T : V W a linear transformation form V to W if, for all x, y V and c F, we have (a) T (x + y) = T (x) + T (y) and (b)
Omega Automata: Minimization and Learning 1
Omega Automata: Minimization and Learning 1 Oded Maler CNRS - VERIMAG Grenoble, France 2007 1 Joint work with A. Pnueli, late 80s Summary Machine learning in general and of formal languages in particular
Lecture I FINITE AUTOMATA
1. Regular Sets and DFA Lecture I Page 1 Lecture I FINITE AUTOMATA Lecture 1: Honors Theory, Spring 02, Yap We introduce finite automata (deterministic and nondeterministic) and regular languages. Some
MATH10040 Chapter 2: Prime and relatively prime numbers
MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive
Fast nondeterministic recognition of context-free languages using two queues
Fast nondeterministic recognition of context-free languages using two queues Burton Rosenberg University of Miami Abstract We show how to accept a context-free language nondeterministically in O( n log
How To Compare A Markov Algorithm To A Turing Machine
Markov Algorithm CHEN Yuanmi December 18, 2007 1 Abstract Markov Algorithm can be understood as a priority string rewriting system. In this short paper we give the definition of Markov algorithm and also
Regular Expressions and Automata using Haskell
Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions
SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN
Course Code : CS0355 SRM UNIVERSITY FACULTY OF ENGINEERING & TECHNOLOGY SCHOOL OF COMPUTING DEPARTMENT OF SOFTWARE ENGINEERING COURSE PLAN Course Title : THEORY OF COMPUTATION Semester : VI Course : June
The Halting Problem is Undecidable
185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine
Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products
Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing
0 <β 1 let u(x) u(y) kuk u := sup u(x) and [u] β := sup
456 BRUCE K. DRIVER 24. Hölder Spaces Notation 24.1. Let Ω be an open subset of R d,bc(ω) and BC( Ω) be the bounded continuous functions on Ω and Ω respectively. By identifying f BC( Ω) with f Ω BC(Ω),
Overview of E0222: Automata and Computability
Overview of E0222: Automata and Computability Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. August 3, 2011 What this course is about What we study
Pushdown Automata. International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain
Pushdown Automata transparencies made for a course at the International PhD School in Formal Languages and Applications Rovira i Virgili University Tarragona, Spain Hendrik Jan Hoogeboom, Leiden http://www.liacs.nl/
Turing Machines, Part I
Turing Machines, Part I Languages The $64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context
Chapter 7 Uncomputability
Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction
1 Definition of a Turing machine
Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,
4. FIRST STEPS IN THE THEORY 4.1. A
4. FIRST STEPS IN THE THEORY 4.1. A Catalogue of All Groups: The Impossible Dream The fundamental problem of group theory is to systematically explore the landscape and to chart what lies out there. We
n k=1 k=0 1/k! = e. Example 6.4. The series 1/k 2 converges in R. Indeed, if s n = n then k=1 1/k, then s 2n s n = 1 n + 1 +...
6 Series We call a normed space (X, ) a Banach space provided that every Cauchy sequence (x n ) in X converges. For example, R with the norm = is an example of Banach space. Now let (x n ) be a sequence
1. Prove that the empty set is a subset of every set.
1. Prove that the empty set is a subset of every set. Basic Topology Written by Men-Gen Tsai email: [email protected] Proof: For any element x of the empty set, x is also an element of every set since
Estimating Probability Distributions
Estimating Probability Distributions Readings: Manning and Schutze, Section 6.2 Jurafsky & Martin, Section 6.3 One of the central problems we face in using probability models for NLP is obtaining the actual
Notes on Complexity Theory Last updated: August, 2011. Lecture 1
Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look
The common ratio in (ii) is called the scaled-factor. An example of two similar triangles is shown in Figure 47.1. Figure 47.1
47 Similar Triangles An overhead projector forms an image on the screen which has the same shape as the image on the transparency but with the size altered. Two figures that have the same shape but not
COMMUTATIVE RINGS. Definition: A domain is a commutative ring R that satisfies the cancellation law for multiplication:
COMMUTATIVE RINGS Definition: A commutative ring R is a set with two operations, addition and multiplication, such that: (i) R is an abelian group under addition; (ii) ab = ba for all a, b R (commutative
1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)
Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:
Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.
Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that
Chapter 17. Orthogonal Matrices and Symmetries of Space
Chapter 17. Orthogonal Matrices and Symmetries of Space Take a random matrix, say 1 3 A = 4 5 6, 7 8 9 and compare the lengths of e 1 and Ae 1. The vector e 1 has length 1, while Ae 1 = (1, 4, 7) has length
Mathematical Induction
Mathematical Induction (Handout March 8, 01) The Principle of Mathematical Induction provides a means to prove infinitely many statements all at once The principle is logical rather than strictly mathematical,
Solution to Homework 2
Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if
This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.
3. Axioms of Set theory Before presenting the axioms of set theory, we first make a few basic comments about the relevant first order logic. We will give a somewhat more detailed discussion later, but
1 Approximating Set Cover
CS 05: Algorithms (Grad) Feb 2-24, 2005 Approximating Set Cover. Definition An Instance (X, F ) of the set-covering problem consists of a finite set X and a family F of subset of X, such that every elemennt
Local periods and binary partial words: An algorithm
Local periods and binary partial words: An algorithm F. Blanchet-Sadri and Ajay Chriscoe Department of Mathematical Sciences University of North Carolina P.O. Box 26170 Greensboro, NC 27402 6170, USA E-mail:
A characterization of trace zero symmetric nonnegative 5x5 matrices
A characterization of trace zero symmetric nonnegative 5x5 matrices Oren Spector June 1, 009 Abstract The problem of determining necessary and sufficient conditions for a set of real numbers to be the
k, then n = p2α 1 1 pα k
Powers of Integers An integer n is a perfect square if n = m for some integer m. Taking into account the prime factorization, if m = p α 1 1 pα k k, then n = pα 1 1 p α k k. That is, n is a perfect square
Computational Models Lecture 8, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance
Lecture 18 Regular Expressions
Lecture 18 Regular Expressions Many of today s web applications require matching patterns in a text document to look for specific information. A good example is parsing a html file to extract tags
Finite Automata. Reading: Chapter 2
Finite Automata Reading: Chapter 2 1 Finite Automaton (FA) Informally, a state diagram that comprehensively captures all possible states and transitions that a machine can take while responding to a stream
E3: PROBABILITY AND STATISTICS lecture notes
E3: PROBABILITY AND STATISTICS lecture notes 2 Contents 1 PROBABILITY THEORY 7 1.1 Experiments and random events............................ 7 1.2 Certain event. Impossible event............................
Introduction to Finite Automata
Introduction to Finite Automata Our First Machine Model Captain Pedro Ortiz Department of Computer Science United States Naval Academy SI-340 Theory of Computing Fall 2012 Captain Pedro Ortiz (US Naval
3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.
Page 331, 38.2 Assignment #11 Solutions Factor the following positive integers into primes. a. 25 = 5 2. b. 4200 = 2 3 3 5 2 7. c. 10 10 = 2 10 5 10. d. 19 = 19. e. 1 = 1. Page 331, 38.4 Suppose a is a
Matrix Representations of Linear Transformations and Changes of Coordinates
Matrix Representations of Linear Transformations and Changes of Coordinates 01 Subspaces and Bases 011 Definitions A subspace V of R n is a subset of R n that contains the zero element and is closed under
Increasing Interaction and Support in the Formal Languages and Automata Theory Course
Increasing Interaction and Support in the Formal Languages and Automata Theory Course Susan H. Rodger Duke University ITiCSE 2007 June 25, 2007 Supported by NSF Grant DUE 0442513. Outline Overview of JFLAP
v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.
3. Cross product Definition 3.1. Let v and w be two vectors in R 3. The cross product of v and w, denoted v w, is the vector defined as follows: the length of v w is the area of the parallelogram with
Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008.
Philadelphia University Faculty of Information Technology Department of Computer Science First Semester, 2007/2008 Course Syllabus Course Title: Theory of Computation Course Level: 3 Lecture Time: Course
CS 103X: Discrete Structures Homework Assignment 3 Solutions
CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering
Math 319 Problem Set #3 Solution 21 February 2002
Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod
THE BANACH CONTRACTION PRINCIPLE. Contents
THE BANACH CONTRACTION PRINCIPLE ALEX PONIECKI Abstract. This paper will study contractions of metric spaces. To do this, we will mainly use tools from topology. We will give some examples of contractions,
Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.
Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole
Automata, languages, and grammars
Automata, languages, and grammars Cristopher Moore January 24, 2015 Abstract These lecture notes are intended as a supplement to Moore and Mertens The Nature of Computation, and are available to anyone
Section 1.1 Real Numbers
. Natural numbers (N):. Integer numbers (Z): Section. Real Numbers Types of Real Numbers,, 3, 4,,... 0, ±, ±, ±3, ±4, ±,... REMARK: Any natural number is an integer number, but not any integer number is
The Optimum One-Pass Strategy for Juliet
Master s Thesis One-Pass Strategies for Context-Free Games Christian Cöster August 2015 Examiners: Prof. Dr. Thomas Schwentick Prof. Dr. Christoph Buchheim Technische Universität Dortmund Fakultät für
