How to construct a context free grammar $G$ such that $L(G) = \{ a^i b^j c^k| j \gt i+k\} $? I don’t have much idea how to approach this one. Could some help me to understand how to approach these kinds of problem?

I need to find and to prove (by the pumping lemma or by building a grammar) if $L=\{o^{i}1^{i}o^{j}1^{i} | i,j>0\}$ is a context free language. I would like to get some help. thanks!

I’m trying to convert this into GNF: $S \rightarrow ASaa | bab$ $A \rightarrow Ba | bAB$ $B \rightarrow abba$ So I’m getting this, but I’m not sure understanding and applying correctly the concept of where exactly the variables and terminals should be in this format: $S \rightarrow a A_0 S_0 | b A B […]

From this question, I gather that whether unambiguous CF grammar can be parsed in linear time is an open problem. I’d like to know what the major roadblocks to achieve this are. That is, what made the attempts to produce such a parser fail ?

This is a follow-up question to Why is it hard to parse unambiguous context-free grammar in linear time? I know that Parsing Expression Grammars (PEG) can be parsed in linear time using a packrat parser. Those parser use memoization to accomplish the linear time complexity: basically each non-terminal can be “expanded” at most once at […]

The original problem Suppose M is DCFL (Deterministic Context Free Language) and N is a regular language. Answer the following questions and justify your answers. a) Is M-N necessarily context-free? b) Is N-M necessarily context-free? My attempt Since DCFLs are closed under complementation, if N is DCFL, then both a and b are true, but […]

I am trying to prove that $L=${$a^mb^n | n=m^2$} is not a CFL with the help of the pumping lemma for CFL’s. I chose $w=a^mb^{m^2}$ = $a^{m-S}a^Sb^Tb^{m^2-T}$ $\in L$ And now in order to contradict the pumping lemma assumption I am looking for $i$ such that $a^{m-S}a^{S^i}b^{T^i}b^{m^2-T}$ $\notin L$ for $i>=0$. Is it possible to […]

Let $L = L_1 \cap L_2 $, where $L_1$ and $L_2$ are languages as defined below: $L_1= \left \{ a^m b^mca^nb^m \mid m,n \geq 0 \right \}$ $L_2=\left \{ a^i b^j c^k \mid i,j,k \geq 0 \right \}$ Then L is Not recursive Regular Context free but not regular Recursively enumerable but not context free. […]

I was reading this wikipedia article for generating grammar. They have mentioned that for generating null string in the grammar we can have a rule $$S \rightarrow \lambda$$ only if $S$ doesn’t appear on the right of any production rule. However in some examples like the following $L(G) = \{ a^nb^n : n \ge 0 […]

A variable $A$ in a context free grammar $G= \langle V, \Sigma, S, P\rangle$ is live if $A \Rightarrow^* x$ for some $x \in \Sigma^*$. Give a recursive algorithm for finding all live variables in a certain context free grammar. I don’t necessarily need an answer to this. Mostly I am having a very difficult […]

Intereting Posts

Why is polynomial regression considered a kind of linear regression?
What does “only” mean?
Linear Homogeneous Recurrence Relations and Inhomogenous Recurrence Relations
Give a demonstration that $\sum\limits_{n=1}^\infty\frac{\sin(n)}{n}$ converges.
Examples of involutions on $\mathbb{R}$
Show that $u(x)=\ln\left(\ln\left(1+\frac{1}{|x|}\right)\right)$ is in $W^{1,n}(U)$, where $U=B(0,1)\subset\mathbb{R}^n$.
A Counter example for direct summand
What is the difference between ⊢ and ⊨?
How to rotate a matrix by 45 degrees?
Variety generated by finite fields
Existence in ZF of a set with countable power set
Proof verification: $V \otimes V^* \cong \mathscr{L}(V,V)$
Recurrence Relation Solving Problem
Algebra and Substitution in Quadratic Form―Einstein Summation Notation
Using the distributivity law for propositional logic