Summary: | 碩士 === 國立臺灣大學 === 資訊工程學研究所 === 96 === In this paper, we develop a new algorithm to count the number of triangles in a graph $G(n, m)$.
The latest efficient algorithm, Forward Algorithm, needs $O(m^{3/2})$ basic instructions'' execution time
and $Theta(m)$ memory space.
With the combination of the well-known Four-Russians'' Algorithm, we obtain an algorithm that requires
$O(m^{3/2}/log^{1/2} m)$ execution of the population count procedure using $Theta(m)$ memory space.
Some CPUs support population count directly.
In such cases, the population count can be executed with one instruction;
otherwise, an alternative method should be employed.
The known best one is named as extit{bitwise twiddling} method,
which can be executed with $Theta(log^{(2)}g)$ basic instructions.
Owing to it is not necessary to exactly know the result of each population count, we can replace
each population count with an amortized population count.
Therefore, we also develop an efficient algorithm to fast execute the amortized population count.
Based on the theoretic analysis, we conclude that the amortized population count can be executed with
$o(log^{(3)}g)$ basic instructions.
Besides, the experiment result also shows the performance of our amortized population count is better
than others.
As a result, our triangle counting algorithm is faster than the previous known best one by
a factor $omega(g^{1/2} / log^{(3)} g)$ where $g = Omega(log m)$.
|