computational

Can I reduce the computational complexity of this?

Well, I have this bit of code that is slowing down the program hugely because it is linear complexity but called a lot of times making the program quadratic complexity. If possible I would like to reduce its computational complexity but otherwise I'll just optimize it where I can. So far I have reduced down to: def table(n): a = 1 ...

7 Point computational stencil cache access problem in C (or..map a 3D array into a 1D array)

Hi all, I have a problem I am trying to tackle that involves a 7 point computational stencil. For those who may not know, this would be a 3D grid, and the 7 points are the n'th point, and the neighbors one point away in the x, y and z directions, both positive and negative (or neighbors to the east/west/north/south and up/down). So thes...

I need a book where can I find a lot of reductions

Hi all, do you know a book where there are proofs of reductions between different problems? I have the papadimitriou and others but there are only a few reductions.. Thanks in advance, bye ...

What's the relationship between Calculus and programming syntaxes?

I'm starting Calculus this semester and I've been using programming (or scripting) languages before—mostly PHP and C# (not much low-level work). The only relationships I've made between the syntaxes are Anonymous functions with Y-Combinators and Arrays with Set-notation (I'm not even sure if these are correct). I always see similaritie...