I have a language, for example $\{a^m b^n c^n \mid m, n \in \mathbb{N}, m = 2n\}$ $\{a^l b^m \mid l, m \in \mathbb{N}, l=4^m\}$How can I see at a glance whether the language is deterministic context-free, context-free or not context-free?  I'm not willing to try to prove the language to be context-free.  I just want a heuristic -- a quick test I can apply by inspection, without use of a computer, that will often be correct.
How can I quickly guess if L is context-free or det. context-free?
formal languages;context free;nondeterminism
This answer was first written before the OP edited the question to specifythat he wanted a quick test I can apply by inspection, without use ofa computer, that will often be correct.Of course, I do not think anyone has such a test. To begin with, weshould first define a meta-language defining sets of strings to whichsuch a test could be applied. How general should this language be, aswe can even define metalanguages that can describe only context-free sets.But that is no help, since the difficulty remains in the translationbetween metalanguages.  In other words, this is simply an ill definedquestion as asked.And even if we were to agree on the language, as something that looksmore or less like the examples, we just do not have suchtests. Actually the question was raised before, as a suggestion forresearch, but I do not recall there was any follow-up.This discussion is mostly intended for the determination ofCF-ness. Raphael rightly commented that if the language is known to beCF, even assuming that a CF grammar is known for it, it remainsundecidable to determine whether it is deterministic CF. However, theOP is not asking for a decision procedure, but only a test which worksmost of the time. So assuming there is a proper definition of whatmost of the time means, such a test could still exist, though I do notknow of any. To take an example in a somewhat different family ofproblems, there are primality tests that are fast and known to workmost of the time, with a probability of error that can be chosenarbitrarily low (with increased cost).Before I knew the OP wanted a quick test, I thought he was onlyasking for the heuristics we use to get a feeling that some languageis more likely to be this or that. I tried to give some hints on how Ido it. There is nothing more to my answer. It is based on a fewpatterns that we see often enough, though the devil in the details maysometimes change the answer.Here is what I first answeredSince your question is whether we can see things at a glance, theanswer is that for many exercises, we can ... though we mayoccasionally make mistakes.Very often the stack is used simply as a counter, which is only asmall part of the CF power.This is typically the case of the following example: $\{a^l b^m \mid l, m\in \mathbb{N}, l=4m\}$, you have to check that 2 subparts of thestring have the same length $m$, up to a multiplicative rationalconstant (4 in this case). That is easily done with a pushdown stack,by pushing $m$ times in the stack the first time, and then popping $m$times, checking that there is enough and not too much to pop. When youpush, or pop, you can do it for several symbols to account for theconstant.However, this allows you to synchronize the sizes of two parts of theinput string, but not more. Once the information is popped, it is lostand there is no way you can check a third part for the same size.This is the case of your first example, where you would have to checkfor $2n$ and twice for $n$, which makes three times, one too many.The second example can be discounted as non CF for another reason. Thepumping lemma, without going into details, does tell you that aninfinite CF language has strings that can increase in size by constantincrements. That is, there is some number $n$ such that you can find aninfinite sequence of strings that increase in length by exactly $n$.For a language of the form $\{a^l b^m \mid l, m \in \mathbb{N},l=4^m\}$, when you increase $m$ by 1, the number of $a$ increases by$4^{m+1}-4^m=3\times 4^m$.  That is incompatible with the presence of a linearlyincreasing sequence. Exponentials usually do that.This is an example of using the pumping lemma without even botheringto try pumping anything. Geological considerations tell you the well will be dry.Hence I conclude that none of your examples is CF,But that is not always a full proof (though the pumping lemma use could be considered one). Mostly first evaluation at a glance, heuristics. One might combine exponentials so that things work.As for deterministic, it is another kind of game. Basically, you tryto see whether you have to guess sometning in order to do yourcounting right, so that it succeeds.In the first example I gave, you obviously do not need any guess. It isdeterministic CF.But if you consider the language $\{a^n b^{2n}c \mid n\in \mathbb{N}\} \cup\{a^n b^{4n}d \mid n\in \mathbb{N}\}$it is non deterministic because you have to guess the last symbol ofthe string before you decide to count with the constant 2 or with theconstant 4.Thanks to  Hendrik Jan for pointing out my misreading of one example.