Turing Machines: What is the difference between the language realised by a problem and the language for which the TM accepts on?
An algorithm solves a problem. Let’s assume that our algorithm is made to solve problem A.

The TM which implements this algorithm should halt and accept on all solutions to problem A. Due to the fact that the algorithm solves A.

Let’s now define L2 as the set of all inputs that the TM halts and accepts on. This will be the set of solutions to problem A.

If we define L1 as the set of all solutions to problem A.

Then in this sense, L1 and L2 should be the same.

I imagine that your confusion is when to use one or the other when defining the language. I am
not sure when you should use each one, however I usually note that if the Turing Machine recognises a language L which is the solution set to a problem A, then this TM can solve problem A.

Remember recognises means it halts and accepts on L.