Main ideas
Being recognizable means you can build an automatic process (we'll get back to that later) that takes a word as a parameter such that
- If the automatic process ends, it returns either YES or NO.
- This automatic process doesn't have to terminate on every input, but it has to terminate if the input word is in the language.
Being co-recognizable means the language ${w\in \Sigma^*, w\not\in L}$ (or, in english, the set of all the words that are not in $L$, i.e. its complementary) is recognizable.
Being decidable means you can build an automatic process that takes a word as an input, such that
- The automatic process always ends
- It answers YES or NO. If it answers YES, the word is in the language, if it answers NO, the word is not in the language.
One important result is that $L$ is decidable if and only if $L$ is recognizable and co-recognizable.
The idea to prove this result, is that you can build up an automatic process from the processes that recognizability and co-recognizability give you, by alternating steps from both processes, until one of those gives you the answer YES. One of those have to do so, as every word either is or isn't in the language)
Automatic processes
Without being too formal, many types of machines have been designed, and basically all of them have been linked to types of languages (those types depend on the tools needed to define such languages. For more information, Chomsky Hierarchy may help).
The usual meaning of automatic process, regarding to decidability, is a Turing Machine.
You can define a Turing Machine such that it can :
- Receive values from the input
- Store values
- Read the values it stored
- Compute basic mathematical operations on values
- Test basic mathematical properties on those values, and act accordingly, eventually looping.
Basically, a Turing Machine can do everything you can define in a program, except it is a mathematical object, with infinite memory and time to spend on a computation. It doesn't always terminates.
Another important property of Turing Machines, is that you can describe a Turing machine as a single word (this is encoding), and there exists a Turing machine that, given as inputs the encoding of a machine $M$, and a word $w$, can simulate the computation of $M$ on the input $w$. This will be important in a bit.
Let's just point out that regular languages — which are (almost) the simplest kind of language you can think of from a maths point of view — have the peculiar property that they are closed under complement. This basically means that on those languages, the notions of recognizability and decidability are equivalent. This doesn't hold as you move up in Chomsky Hierarchy.
Example of an undecidable language
We will study the Halting problem. The question is, can we build a Turing Machine that, given the encoding of another Turing Machine $M$ and a word $w$, decides wether $M$ terminates on input $w$ ?
Obviously, this is recognizable, as we just have to simulate $M$ on $w$ until it terminates, and when it does, say YES.
However, if $M$ never does terminate, we won't say NO, so we're recognizing this language, but not deciding it.
It has been proven that this language cannot be decided by a Turing Machine. This involves a usual mathematical scheme : a diagonal argument, which I wouldn't call intuitive. You can check this sketch of proof to get used to it.
To sum up
You won't be able, given a language, to just state if it's decidable or not. There isn't any algorithm that can do that, and proving a language isn't decidable takes some thinking, and can require some knowledge on Turing Machines, Diagonal arguments, etc...
However, here is my personal way of handling this question.
Usually, when studying a language, I assume that it is decidable, unless it shows some form of reference to the way Turing Machine work. In that case, I start warying, and try to define an algorithm deciding the language. If this doesn't look easy, it sometimes help to split up the work in both a recognizing, and a co-recognizing algorithms. If I still can't do it, I'd try to make a connection between this language, and another undecidable one, such as "If I can decide that language, I can decide the halting problem". This is a Turing reduction to an undecidable problem, so the first problem can't be decidable. If all of those fails, I can try to use diagonal arguments, but this can be a bit tricky.