• Nenhum resultado encontrado

¾Algebraic and analytic methods for grammar ambiguity¿

N/A
N/A
Protected

Academic year: 2023

Share "¾Algebraic and analytic methods for grammar ambiguity¿"

Copied!
34
0
0

Texto

As we will see later, GF(2)-grammars are therefore very suitable for algebraic manipulations. While the latter condition is strictly speaking stronger, it may turn out to be easier to prove because GF(2)-grammars have good algebraic properties and are also closed under symmetric difference, which means that the proof can use more tools. .

Basics of GF(2)-grammars

Then the substitution A = LG(A) for all A∈N is a solution of the following system of linguistic equations. In the following sections we need the classicization of unary languages ​​that can be described by GF(2) grammars.

Alternatively, one can prove the uniqueness of the solution to System (2) by some kind of fixed point argument. However, I stick to proving that the determinant is not zero, especially since the proof of Theorem 5 still uses Cramer's rule regardless of how the uniqueness of the solution is determined.

Using Theorem 1

Moreover, we can choose in such a way that pd6= 0: not allpia are equal to zero, because otherwise the denominator of the fraction would be equal to zero. Because the sum takes only a number of values, it is equal to zero for a large enough number.

Although the proof uses commutative mappings, it is handled very carefully, always taking care to ensure that the letters appear in the correct order. Similarly, we formally cut our GF(2) grammar into Chomsky's normal form with the language a∗b∗c∗. However, only the central non-terminalsCa→are important, as are the non-terminals of typea→in the proof of Theorem 1.

In a sense, we used Theorem C as a springboard to the proof of Theorem 1, but now we can use Theorem 1 as a springboard to the proof of Theorem 5. Again, this system has a unique solution, since we can prove that det(A+B +I) 6 = 0 in the same way as before. Induction by k, the induction step is similar to the way we used Theorem 1 in the proof of Theorem 5.

AiBiCi with an additional condition that no ofp,q andr is zero: otherwise the denominator of the right-hand side of equation 6 is zero. For any formal power series of three variables a, b, and c we can deny its trace: such a subset of N30, that triple (x, y, z) is in this subset if and only if the coefficient of the series before axbycz is one. Intuitively, the trace of the left side should be close to the diagonal x =y=z in its entirety, because pqrf is a polynomial pqr, multiplied by f.

On the other hand, the trace of the right-hand side has a block structure: as we will establish later, it should be an infinite union of disjoint sets of type X×Y×Z. This conclusion is very natural: the trace of the left side shows a high dependence between x,yandz, while the coordinates are almost independent in the trace of the right side (and they would be completely independent if there were only one set X ×Y ×Z in the disjoint union). Since the total degree of the second factor is 2, but its degree in each variable is only 1, there are exactly 2 variables in the second factor.

Are converse statements true?

But this is impossible, because each of the polynomials sp,qandr is nonzero (here we finally used that condition) and does not depend on any of the variables. We have just proven that the language{anbmc` |n=m or m=`} is not described by a GF(2) grammar. More importantly, we have proven that the language {anbmc` |n6=m or m6=`} is not described by a GF(2) grammar and is therefore inherently ambiguous.

The only difference between the definitions of Ra,bandRinta,bi is that the denominatorcp of the fraction must be invertible as an element of F2[[a, b]]⊃poly(a, b). Let S be the initial symbol of some GF(2)-grammar describing asSeries−1(Pn . i=1AiBi) (such a GF(2)-grammar exists due to the closure property). On the contrary, I do not believe in analogous claims for four and and more letters.

Conclusion

If is a language described by a fuzzy grammar, and ak is the number of words of length k in L, then the power series +∞P. If is a language described by a GF(2) grammar, then is the number of words of length L, then the power series +∞P. A naive approach to problem 1 would be to count all words of length at most f(G1, G2), where is a computable function, and, for each one, check whether it belongs to L(G1) and L( G2) with the standard cubic-time parsing algorithm.

On the other hand, the existence of such f for unambiguous grammars is equivalent to the fact that problem 1 is decidable. The equivalence of univocal grammars is directly related to the question of the emptiness of a given GF(2)-grammar. If the emptiness of a GF(2)-grammar is decidable, then so is the equivalence of univocal grammars.

Semenov's approach

Perhaps there is an approach that could work well even in the hypothetical case, when the first difference has a very large length. Power series are equal if and only if they are equal at all points in an arbitrarily small origin neighborhood. Given two unambiguous grammars G1 and G2, there is an algorithm to check whether comm(L(G1)) and comm(L(G2)) are equal.

Here the sum spans all rules corresponding to the non-terminal C: the first sum is over all normal rulesC→DE and the second sum is over all nal rulesC →awitha∈Σ (remember that each element of Σ can be interpreted as a variable) . It is known that two formal power series are equal as series as long as they are equal as functions in all points of a small neighborhood of the origin. For all ways of assigning real values ​​to the elements of ΣtN1tN2 (the letters of the alphabet and the non-terminals of G1 and G2), (Small∧Correctness)⇒(S1=S2).

Matrix substitution and polynomial identities

Finally, saying whether the second statement is true or not is a special case of Tarski Seidenberg's theorem about the determinacy of the first-order theory of reals. So, in the end, this is a first-order sentence about reals with only universal quantities. So if d is xed, the condition A = BC can be expressed as a relation of d2 polynomial equations over the real numbers.

Write a first-order formula similar to that of Example 6, but with matrices instead of real numbers. Then the corresponding equation (8) of degree n is non-trivial and, due to homogeneity, it applies to all real matrices and not only to those with a small norm. Indeed, it seems intuitive that there is no single non-trivial matrix equation that holds for all d×d ford>2 matrices.

What can we do with matrix substitution?

As we shall see in the forthcoming Sections 4.14.3, this similarity can be given a useful explanation. Therefore, it is possible to pump the interior of these large pieces quite separately. If both G1 and G2 are in Chomsky normal form, it is possible to solve problem 2 in O(n3·(|G1|+|G2|)) time with bounded one-sided error due to randomness.

Given a unique grammarGin Chomsky normal form and a field F, it is possible to evaluatef(K) at a point x ∈F|Σ|·n in O(n3· |G|) field operations, where K is the nth slice of L (G). Note that there is no requirement that the concatenation KL be unique, because it is automatically unique. It is possible to check whether L(G1) and L(G2) have a divergence of length of at most n (rather as precisely n, as in theorem 10) with the same running time.

Relations to circuit complexity

A word-like entry is a redundant representation of a word: instead of just n letters, we have |Σ| ·n answers to the questions, is there a letter a in the i-th place?. Therefore, the value of f(K) on a word input simply indicates whether the corresponding word lies in K or not. In fact, on closer inspection (I won't go into details), the proof of Theorem 11 turns out to be exactly the standard cubic-time decomposition algorithm if we only consider the word-like entriesex.

Limiting ourselves to only word-like input would be the same as choosing random words of length and checking whether they belong to L1 and L2. The exact nature of the variables, function and circuit depends on the type of grammar. It is already known that the size of the smallest regular grammar for Pn grows exponentially with n [10, Theorem 30].

Matrix substitution and noncommutative determinant

Furthermore, each of the two steps only increases the grammar size by a polynomial factor. Therefore, there is no ordinary grammar for P (grammar for P implies small grammars for Pn, which in turn implies small monotonic circuits for perfect matching). To be honest, this isn't a particularly interesting (or new) result, but it does a good job of highlighting the steps of the plan.

As mentioned in the plan from the previous section, the same logic can work with more complicated identities as long as we can use polynomial size deterministic (or even unique) transducers to get a similar situation with non-commutative determinant. Of course, similarly to the previous section, we can use this technique to prove that there is no unique grammar for some languages. However, all such languages ​​are bound to be quite artic because they must correspond to a problem known or commonly assumed to be difficult for some subclass of arithmetic circuits.

Can we do the same with conjunctive grammars?

However, as mentioned in situation 1 of Idea 1, the interesting case is when it is large compared to max(|G1|,|G2|). By the above argument, since there exists a polynomial-sized conjunctive grammar for Pn, there must be a polynomial-sized monotonic circuit operating on all word-like inputs. Informally, this formula checks whether each letter of the alphabet appears somewhere in the word.

In fact, as mentioned in the previous section, the result of evaluating f(K) on a word-like input corresponding to wordw is 1 whenw∈K and 0whenw /∈K. So if we want to prove that there is no conjunctive grammar for Lorig, we need to prove that the inclusion problem for Ln is harder in terms of time or memory than the cubic parsing algorithm that we used in the reduction. Ultimately, our best hope here is to arrive at a weaker version of Theorem I in a very roundabout way.

Referências

Documentos relacionados

a) In Classical Logic, there is a formal inference, in which a process of the type PQ is assumed, P then Q, assuming the importance of form in warranting or not the validity of