# Can I use the CYK-Algorithm for a Grammar where all results still have a Variable in them?

Let the Grammar be G = ({S}, Σ, P, S), where Σ = {⟨,⟩,[,]} and

P: S → ⟨S⟩, [S], SS, ε
[⟨ → ⟨[


Can I still use the CYK-Algorithm and if yes then how would I do it for a word like ⟨[]⟩ ?

• I don't understand your notation in the quoted block. I don't understand what either line is trying to say. Can you use more standard notation for grammars? ote that you can use LaTeX here to typeset mathematics in a more readable way. See here for a short introduction.
– D.W.
Jan 16 at 20:58
• What are your thoughts? What are the guarantees on what kinds of grammars CYK is guaranteed to work for? If you read some resources on CYK, you should be able to answer that. Then, is this grammar one of those kinds of grammars? You have used the context-free tag. Is this a context-free grammar? What are your thoughts on that? Please edit your question to show your progress and your thoughts. (continued)
– D.W.
Jan 16 at 20:59
• We're not particularly looking for questions that are the statement of an exercise-like task and a request for us to solve it for you, as those are unlikely to be helpful to you in the long run or helpful to others after you.
– D.W.
Jan 16 at 20:59
• Your grammar doesn't appear to be context-free. CYK only works for context-free grammars. Jan 16 at 22:25