Longest common subsequence on a PRAM model (complexity)

46 views Asked by At

enter image description here

I'm trying to solve this exercise for this algorithm.

I've tried to research on multithreading but I couldn't come up with a solution.

1

There are 1 answers

0
Criminal_Affair_At_SO On

Cache-oblivious traversal is not about complexity, it is about efficient use of the CPU cache.

The performance when traversing matrices is very dependent on the CPU cache. There can be orders of magnitude difference between two algorithms with identical complexity but with different cache access patterns.

It is a technique that can be used both in a single-threaded and a multi-threaded implementation.

It's basic idea is that you do not traverse the matrix line by line but quadrant by quadrant allowing the CPU to bring in the data from memory in its cache. Experiment with the size of your quadrant and you will see a huge improvement.