(btw- it will be easier to construct CFG and and check if equals to the empty set by using the algorithm in lecture 5)

]]>construct a PDA that accepts the intersection of L_i and L2

check if its language is empty

]]>but one more thing: how can you check if exist some y in L2 that delta(q_0, y) = q_i ? ]]>

there is an epsilon transition from s to q_i in A_1 <=> there is some y in L2 s.t. delta(q_0, y) = q_i

so we can "jump" to q_i and read some x and get to some q_j

up to this point we simulated delta(q_0, yx) for some y in L2

to accept we need an epsilon transition from q_j in A_1 to an accepting state in A_2

such transition exists <=> there is some z in L2 s.t. delta(q_j, z) is in F

so if we see such transition we jump to an accepting state, by this time we simulated delta(q_0, yxz) for some y,z in L2

now if there is no y,z in L2 s.t delta(q_0, yxz) is in F, then no matter what transition we pick before and after x

we will end up in (Q\F) x {2}, because delta(q_0, yxz) is in Q\F

the problem is that it may be hard to compute all the epsilon transitions but once we computed them we have NFA for A(L1,L2)

]]>but I didn't understand your solution, y and z are in L2 (that is Context Free Language). how can two copies of L1 help us?

we need to have y,z in L2 that yxz is in L1…

I try to use Myhill-Nerode Theorem… (how can you check that all the epsilon transition of the word y will end in accepting state in L2?) ]]>

for every y in L2 add epsilon transition from s to delta(q_0, y) in <A,1>

for every q_i in <A,1> and every z in L2 add epsilon transition to delta(q_i, z) in <A,2>.

accepting states are F x {2}.

]]>L1 is Regular, L2 Context Free Language

$A(L1,L2)=\{x\in\Sigma^*|\exists y,z\in L2\ such\ that\ yxz\in L1\}$

]]>