70 likes | 167 Views
Quiz #2. Grades: Total: 45 Avg: 31 Median: 29. Q1: conditional independence. The definition of A and B are conditionally independent given C P(A|B,C) = P(A|C) P(B|A,C) = P(B|C) P(A,B|C) = P(B|C) P(A|C)
E N D
Quiz #2 • Grades: • Total: 45 • Avg: 31 • Median: 29
Q1: conditional independence • The definition of A and B are conditionally independent given C • P(A|B,C) = P(A|C) • P(B|A,C) = P(B|C) • P(A,B|C) = P(B|C) P(A|C) • Once we know C, knowing B does not help us to predict the value of A; that is, C provides all the information that B could provide about A. • P(xn | x1, …, xn-1) = P(xn | xn-1); that is, xn is conditionally independent from x1, …, xn-2, given xn-1.
Q2: chain rule P(X1, …, Xn) = P(X1) P(X2) … P(Xn) (?) = P(X1) P(X2 | X1) … P(Xn | Xn-1) (?) = P(X1) P(X2 | X1) … P(Xn | X1, …, Xn-1)
Q3: write a CFG • L1 = {an bn | n>=0} S a S b | ² • L2 = {a2n bn | n>= 0} S a a S b | ² • L3 = {a2n+1 c* bn | n>= 0} S1 a a S1 b | S2 S2 c S2 | ² S a S1
Q3 (cont) • L3 = {a2n+1 c* bn | n>= 0} S S1 S2 S3 S1 a S1 | ² S2 c S2 | ² S3 b S3 | ² Is it correct?
Q4: write an FSA for Regex Regex is (a|b)+ c* d? b+ Regex is (a|b)+ (c|d)* e? f+
Q5: draw an FST { (a2n c*, bn) | n>=0 } {(an, d* b2n+1) | n>= 0}