What is the best way to finding logic errors in algorithms?
Also, are there any places to find preliminary papers? I have looked everywhere and there seems to be nothing
Logic errors are a tough one - the first issue is even knowing that a logic error exists. there's no certain way to find a logic error without testing the code or desk checking every single step of the algorithm.
That being said, if you wrote the algorithm yourself, you should have a good idea of what the expected outputs are and where the program is diverging, which narrows down the scope of an error. You can then check the parts where the relevant variable is used see whether it's behaving as expected.
If it's an exam question, you might not have that luxury and you'll be limited to whatever information you're given. In that case, you should get a clear idea of what the algorithm is doing and how you expect it to behave. You can then do a quick desk check to confirm your theories, which should either confirm or deny that a logic error exists. The fact that something works is also valuable information, since it tells you that the error isn't in that part of the algorithm.
The most common error you'll see by far is an off by one error, where a counter or index is off by one. These often occur due to variables being initialized at 1 or 0, and when the wrong comparison operator (> versus >=) is used, as well as when accessing arrays. (array[1] actually refers to the second element of an array when indexed from 0). Check for these first, then move onto more through debugging methods. Over time as you write more algorithms, you'll also naturally gain a sense for where these logic errors commonly happen as you develop as a programmer.
Hope this helps!