by jonathanstrange · 8y ago · 0 comments
The problem is that, as far as I know, sequential algorithms form a uniform class, because e.g. equivalence between different sequential models like Turing machines and the untyped lambda calculus can be proved. AFAIK, this is not possible for parallel models of computation, there are different models of them with different expressivity. (I'm not an expert on that, so take this with a grain of salt and please correct me if I'm wrong!)
Or essentially, you can always simulate parallel algorithms on sequential hardware.
Of course you are correct if the sequential OR is executed naively :-)
...or if you force side-effect free short-circuiting within the sequential OR execution. But then it wouldn't really the same OR (as in the parallel case), now would it?
For all the parallel modes of computation I've seen, you can pretty easily simulate them on a single machine by just keeping the full state of each machine and simulating each time unit 1 machine at a time. It's slow, but equivalence isn't about speed.
ie IF (A OR B) THEN ...
Now this casual remark during my work time is starting to bother me a lot, and I really hope some distinguished expert could jump into the discussion. We know that the pi calculus can embed the lambda calculus (and similar for other parallel models of computation), and I've always assumed that the opposite is not generally true - that you cannot express all parallel computations on Turing machines or in lambda calculus such that the same input yields the same output, at least not if you allow some of the computations not to terminate.
Now I'm no longer sure about that and cannot find any foundational theorem that would prove this.
Am I the victim of a prejudice? :o Where are the computer scientists when you need them?