# New Algorithms for Counting Temporal Graph Pattern

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Definitions and Problem

**Definition**

**1.**

**Temporal Graph.**A temporal graph $G=(V,E)$ consists of a set of vertices V and a set of temporal edges $E=\left\{\right(u,v,t\left)\right|u,v\in V\}$, where t is the timestamp of the edge.

**Definition**

**2.**

**-Temporally Related Edges.**Given two edges ${e}_{i}=({u}_{i},{v}_{i},{t}_{i})$ and ${e}_{j}=({u}_{j},{v}_{j},{t}_{j})$, the edge ${e}_{i}$ is $\Delta T$-temporally related to edge ${e}_{j}$ if they are temporally adjacent, i.e., $\{{u}_{i},{v}_{i}\}\cap \{{u}_{j},{v}_{j}\}\ne \varnothing $ and $|{t}_{i}-{t}_{j}|\le \Delta T$.

**Definition**

**3.**

**-Temporally Connected Graph.**A temporal graph $G=(V,E)$ is $\Delta T$-temporally connected graph if and only if the graph is weakly connected and all the adjacent edges are $\Delta T$-temporally related edges.

**Definition**

**4.**

**Temporal Graph Pattern.**A temporal graph pattern $H=(g,\Delta T)$, also known as the temporal motif, is a $\Delta T$-temporally connected graph $g=({V}_{h},{E}_{h})$.

**Definition**

**5.**

**Temporal Graph Isomorphism.**If a temporal subgraph $G=(V,E)$ is temporally isomorphic to the temporal graph pattern $H=(g,\Delta T)$, where $g=({V}_{h},{E}_{h})$, then there exists an injective function $\phi :{V}_{h}\to V$ which satisfies the following conditions:

(1)$\forall {u}_{h}\in {V}_{h},\exists \phi \left({u}_{h}\right)\in V$ |

(2)$\forall \phantom{\rule{0.277778em}{0ex}}{e}_{h}=({u}_{h},{v}_{h},{t}_{h})\in {E}_{h},\exists e=(\phi \left({u}_{h}\right),\phi \left({v}_{h}\right),t)\in E$ |

(3)$\mathbf{For}\phantom{\rule{0.277778em}{0ex}}{e}_{{h}_{i}}=({u}_{{h}_{i}},{v}_{{h}_{i}},{t}_{{h}_{i}}),{e}_{{h}_{j}}=({u}_{{h}_{j}},{v}_{{h}_{j}},{t}_{{h}_{j}})\in {E}_{h}$ |

$\mathbf{if}\phantom{\rule{0.277778em}{0ex}}{t}_{{h}_{i}}<{t}_{{h}_{j}}$ |

$\mathbf{then}\phantom{\rule{0.277778em}{0ex}}\exists \phantom{\rule{0.277778em}{0ex}}{e}_{i}=(\phi \left({u}_{{h}_{i}}\right),\phi \left({v}_{{h}_{i}}\right),{t}_{i}),{e}_{j}=(\phi \left({u}_{{h}_{j}}\right),\phi \left({v}_{{h}_{j}}\right),{t}_{j})\in E$ |

$\mathbf{s}\mathbf{.}\mathbf{t}\mathbf{.}\phantom{\rule{0.277778em}{0ex}}{t}_{i}<{t}_{j}$. |

## 3. The Counting Algorithms for TGP

#### 3.1. The Exact Algorithm

#### 3.1.1. The Overall Idea of the Algorithm

#### 3.1.2. Counting the Number of TGP in Each Subgraph

Algorithm 1 The counting algorithm for subgraph ${G}_{{t}_{i}}$. |

Input:${G}_{{t}_{i}}=({V}_{{t}_{i}},{E}_{{t}_{i}})$: the temporal subgraph obtained from graph partitioning, |

$H=(g,\Delta T)$: the temporal graph pattern. |

Output:${C}_{i}$: the number of the subgraphs isomorphic to H in ${G}_{{t}_{i}}$. |

1: $L\leftarrow $ Sort the edges of g according to the TFS algorithm; |

2: Get the first edge ${e}_{{h}_{0}}$ of the traversal order L; |

3: M = ∅; |

4: ${C}_{i}$ = 0; |

5: for edge $e\in {G}_{{t}_{i}}$ |

6: if e satisfies the matching conditions |

7: P = Pair($e,{e}_{{h}_{0}}$); |

8: $M=M\cup P$; |

9: $count$ = Match($M,L,{G}_{{t}_{i}},0$); |

10: ${C}_{i}={C}_{i}+count$; |

11: M = ∅; |

12: end if |

13: end for |

14: return ${C}_{i}$ |

Algorithm 2 Match($M,L,G,count$). |

Input:M: the matched edge pairs, L: the sorted edges of the temporal graph pattern, |

G: the temporal graph, $count$: the number of the subgraphs isomorphic to H. |

Output:$count$: the number of the subgraphs isomorphic to H. |

1: if M covers all the edges of the L then |

2: $count++$; |

3: return $count$ |

4: end if |

5: ${e}_{{h}_{j}}\leftarrow $ Get the next unmatched edge of L; |

6: ${E}_{c}\leftarrow $ Get all the candidate edges from the adjacent edges of matched edges; |

7: for edge ${e}^{\prime}\in {E}_{c}$ do |

8: if ${e}^{\prime}$ satisfies the matching conditions then |

9: P = Pair(${e}^{\prime},{e}_{{h}_{j}}$); |

10: $M=M\cup P$; |

11: Match($M,L,G,count$); |

12: Delete($M,P$); |

13: end if |

14: end for |

#### 3.1.3. Algorithm Summary and Computational Complexity

Algorithm 3 The exact algorithm for the temporal graph pattern. |

Input:$G=(V,E)$: the temporal graph, $H=(g,\Delta T)$: the temporal graph pattern. |

Output:C: the number of the subgraphs isomorphic to H in G. |

$S\leftarrow $ partition the graph G into subgraphs ${G}_{{t}_{i}},i=0,1\dots ,M$; |

2: for subgraph ${G}_{{t}_{i}}$ in S do |

3: ${C}_{i}\leftarrow $ count the number of the subgraphs isomorphic to H in ${G}_{{t}_{i}}$; |

4: end for |

5: $C={\sum}_{i=0}^{M}{C}_{i}$ |

6: return C |

#### 3.2. The Estimation Algorithm

Algorithm 4 The estimation algorithm for the temporal graph pattern. |

Input:$G=(V,E)$: the temporal graph, $H=(g,\Delta T)$: the temporal graph pattern, p: the probability of edge sampling. |

Output:$\widehat{C}$: the approximate number of the temporal subgraphs isomorphic to H |

1: ${E}_{p}$ = ∅; |

2: for all $e\in E$ do |

3: $x\leftarrow $ Toss a biased coin with success probability p |

4: if x = 1 then |

5: ${E}_{p}\leftarrow {E}_{p}\cup e$ |

6: end if |

7:end for |

8: ${G}_{p}=({V}_{p},{E}_{p})\leftarrow $ build a temporal graph according to the ${E}_{p}$, |

9: ${C}_{p}\leftarrow $ count the number of H in ${G}_{p}$ |

10: $\widehat{C}={C}_{p}/{p}^{{m}_{h}}$, where ${m}_{h}$ is the number of the edges in H. |

11: return $\widehat{C}$. |

**Lemma**

**1.**

**Proof**

**of**

**Lemma**

**1.**

**Lemma**

**2.**

**Proof**

**of**

**Lemma**

**2.**

- Case 1: $i=j$. When $i=j$, we have $Cov[{\delta}_{i},{\delta}_{j}]=E\left[{\delta}_{i}^{2}\right]-{p}^{2{m}_{h}}$. Since ${\delta}_{i}$ obeys the 0–1 distribution shown in Table 1, $E\left[{\delta}_{i}^{2}\right]$ can be calculated as $E\left[{\delta}_{i}^{2}\right]={0}^{2}\xb7(1-{p}^{{m}_{h}})+{1}^{2}\xb7{p}^{{m}_{h}}={p}^{{m}_{h}}$. Then, we can get $Cov[{\delta}_{i},{\delta}_{j}]={p}^{{m}_{h}}-{p}^{2{m}_{h}}$.
- Case 2: $i\ne j$ and the subgraphs corresponding to ${\delta}_{i},{\delta}_{j}$ do not share any edges. In this case, whether the ith subgraph is sampled is unrelated to the jth subgraph, which means that ${\delta}_{i}$ and ${\delta}_{j}$ are independent. Thus, we have $Cov[{\delta}_{i},{\delta}_{j}]=E\left[{\delta}_{i}\right]E\left[{\delta}_{j}\right]-{p}^{2{m}_{h}}=0$.
- Case 3: $i\ne j$ and the subgraphs corresponding to ${\delta}_{i},{\delta}_{j}$ share edges. Assume that the ith and jth subgraphs share $k\phantom{\rule{0.277778em}{0ex}}(k<{m}_{h})$ edges. Thus, the probability that the shared edges are sampled is ${p}^{k}$, and the probability that the remaining $2{m}_{h}-2k$ edges of the two subgraphs are sampled is ${p}^{2{m}_{h}-2k}$. Based on these two probabilities, the probability of both subgraphs being sampled can be denoted as $E\left[{\delta}_{i}{\delta}_{j}\right]={p}^{k}\xb7{p}^{2{m}_{h}-2k}={p}^{2{m}_{h}-k}$. Then, we can obtain the covariance $Cov[{\delta}_{i},{\delta}_{j}]={p}^{2{m}_{h}-k}-{p}^{2{m}_{h}}$.

## 4. Experiments and Discussion

#### 4.1. Datasets and Setup

**CollegeMsg data [35]:**The data record the private messages between users of the online social network at the University of California, Irvine. In these data, the temporal edge $(u,v,t)$ of the temporal network means that the user u sends a private message to the user v at time t.

**Email data [30]:**These data were collected from European research institution and contain the e-mails between institution members from October 2003 to May 2005 (18 months). In these data, the directed edge $(u,v,t)$ denotes that an e-mail is sent from member u to member v at time t.

**MathOverflow data [30]:**The temporal network was generated using the interactions on the stack exchange website Math Overflow. The temporal edge $(u,v,t)$ represents that user u answers user v’s question or comments on user v’s question/answer at time t.

#### 4.2. Experimental Results

#### 4.2.1. Results of the Exact Algorithm

#### 4.2.2. Results of the Estimation Algorithm

## 5. Discussion

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Gao, W.; Wu, H.; Siddiqui, M.K.; Baig, A.Q. Study of biological networks using graph theory. Saudi J. Biol. Sci.
**2018**, 25, 1212–1219. [Google Scholar] [CrossRef] [PubMed] - Trinajstic, N. Chemical Graph Theory; Routledge: London, UK, 1992. [Google Scholar]
- Yang, P.; Freeman, R.A.; Gordon, G.J.; Lynch, K.M.; Srinivasa, S.S.; Sukthankar, R. Decentralized estimation and control of graph connectivity for mobile sensor networks. Automatica
**2010**, 46, 390–396. [Google Scholar] [CrossRef] [Green Version] - Yu, J.; Shen, Y.; Yang, Z. Topic-STG: Extending the session-based temporal graph approach for personalized tweet recommendation. In Proceedings of the 23rd International Conference on World Wide Web, Seoul, Korea, 7–11 April 2014; ACM: New York, NY, USA, 2014; pp. 413–414. [Google Scholar]
- Choudhury, S.; Holder, L.; Chin, G.; Ray, A.; Beus, S.; Feo, J. Streamworks: A system for dynamic graph search. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, New York, NY, USA, 22–27 June 2013; pp. 1101–1104. [Google Scholar]
- Kovanen, L.; Kaski, K.; Kertész, J.; Saramäki, J. Temporal motifs reveal homophily, gender-specific patterns, and group talk in call sequences. Proc. Natl. Acad. Sci. USA
**2013**, 110, 18070–18075. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Harshaw, C.R.; Bridges, R.A.; Iannacone, M.D.; Reed, J.W.; Goodall, J.R. Graphprints: Towards a graph analytic method for network anomaly detection. In Proceedings of the 11th Annual Cyber and Information Security Research Conference, Oak Ridge, TN, USA, 5–7 April 2016; p. 15. [Google Scholar]
- Berry, J.W.; Hendrickson, B.; LaViolette, R.A.; Phillips, C.A. Tolerating the community detection resolution limit with edge weighting. Phys. Rev. E
**2011**, 83, 056119. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Iliofotou, M.; Faloutsos, M.; Mitzenmacher, M. Exploiting dynamicity in graph-based traffic analysis: Techniques and applications. In Proceedings of the 5th International Conference on Emerging Networking Experiments and Technologies, Rome, Italy, 1–4 December 2009; pp. 241–252. [Google Scholar]
- Braha, D.; Bar-Yam, Y. Time-Dependent Complex Networks: Dynamic Centrality, Dynamic Motifs, and Cycles of Social Interactions. In Adaptive Networks: Theory, Models and Applications; Springer: Berlin/Heidelberg, Germany, 2009; pp. 39–50. [Google Scholar]
- Al Hasan, M.; Dave, V.S. Triangle counting in large networks: A review. Wiley Interdiscip. Rev. Data Min. Knowl. Discov.
**2018**, 8, e1226. [Google Scholar] [CrossRef] - Lim, Y.; Kang, U. Mascot: Memory-efficient and accurate sampling for counting local triangles in graph streams. In Proceedings of the 21th ACM SIGKDD International Conference On Knowledge Discovery and Data Mining, Sydney, NSW, Australia, 10–13 August 2015; pp. 685–694. [Google Scholar]
- Pearce, R. Triangle counting for scale-free graphs at scale in distributed memory. In Proceedings of the 2017 IEEE High Performance Extreme Computing Conference (HPEC), Waltham, MA, USA, 12–14 September 2017; pp. 1–4. [Google Scholar]
- Stefani, L.D.; Epasto, A.; Riondato, M.; Upfal, E. TRIÈST: Counting Local and Global Triangles in Fully-dynamic Streams with Fixed Memory Size. ACM Trans. Knowl. Discov. Data (TKDD)
**2017**, 11, 43. [Google Scholar] [CrossRef] - Pinar, A.; Seshadhri, C.; Vishal, V. Escape: Efficiently counting all 5-vertex subgraphs. In Proceedings of the 26th International Conference on World Wide Web, Perth, Australia, 3–7 April 2017; pp. 1431–1440. [Google Scholar]
- Marcus, D.; Shavitt, Y. Efficient counting of network motifs. In Proceedings of the 2010 IEEE 30th International Conference on Distributed Computing Systems Workshops, Genova, Italy, 21–25 June 2010; pp. 92–98. [Google Scholar]
- Hočevar, T.; Demšar, J. A combinatorial approach to graphlet counting. Bioinformatics
**2014**, 30, 559–565. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Wang, P.; Zhao, J.; Zhang, X.; Li, Z.; Cheng, J.; Lui, J.C.; Towsley, D.; Tao, J.; Guan, X. MOSS-5: A fast method of approximating counts of 5-node graphlets in large graphs. IEEE Trans. Knowl. Data Eng.
**2017**, 30, 73–86. [Google Scholar] [CrossRef] - Chen, X.; Lui, J.C.S. Mining Graphlet Counts in Online Social Networks. ACM Trans. Knowl. Discov. Data (TKDD)
**2018**, 12, 41:1–41:38. [Google Scholar] [CrossRef] - Bressan, M.; Chierichetti, F.; Kumar, R.; Leucci, S.; Panconesi, A. Counting graphlets: Space vs. time. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining, Cambridge, UK, 6–10 February 2017; pp. 557–566. [Google Scholar]
- Bhuiyan, M.A.; Rahman, M.; Rahman, M.; Al Hasan, M. Guise: Uniform sampling of graphlets for large graph analysis. In Proceedings of the 12th International IEEE Conference on Data Mining, Brussels, Belgium, 10–13 December 2012; pp. 91–100. [Google Scholar]
- Rahman, M.; Bhuiyan, M.A.; Al Hasan, M. Graft: An Efficient Graphlet Counting Method for Large Graph Analysis. IEEE Trans. Knowl. Data Eng.
**2014**, 26, 2466–2478. [Google Scholar] [CrossRef] - Jha, M.; Seshadhri, C.; Pinar, A. Path Sampling: A Fast and Provable Method for Estimating 4-Vertex Subgraph Counts. In Proceedings of the 24th International Conference on World Wide Web, WWW ’15, Florence, Italy, 18–22 May 2015; pp. 495–505. [Google Scholar]
- Bressan, M.; Leucci, S.; Panconesi, A. Motivo: Fast motif counting via succinct color coding and adaptive sampling. arXiv
**2019**, arXiv:1906.01599. [Google Scholar] [CrossRef] - Bajardi, P.; Barrat, A.; Natale, F.; Savini, L.; Colizza, V. Dynamical patterns of cattle trade movements. PLoS ONE
**2011**, 6, e19869. [Google Scholar] [CrossRef] [PubMed] - Zhao, Q.; Tian, Y.; He, Q.; Oliver, N.; Jin, R.; Lee, W.C. Communication motifs: A tool to characterize social communications. In Proceedings of the 19th ACM International Conference on Information and Knowledge Management, Toronto, ON, Canada, 26–30 October 2010; pp. 1645–1648. [Google Scholar]
- Kovanen, L.; Karsai, M.; Kaski, K.; Kertész, J.; Saramäki, J. Temporal motifs in time-dependent networks. J. Stat. Mech. Theory Exp.
**2011**, 2011, P11005. [Google Scholar] [CrossRef] - Jurgens, D.; Lu, T.C. Temporal Motifs Reveal the Dynamics of Editor Interactions in Wikipedia. In Proceedings of the Sixth International AAAI Conference on Weblogs and Social Media (ICWSM 2012), Dublin, Ireland, 4–7 June 2012. [Google Scholar]
- Wu, W.; Hu, X.; Guo, S.; He, X. Methods of Analyzing Combat SoS Coordination Pattern Based on Temporal Motif. In Theory, Methodology, Tools and Applications for Modeling and Simulation of Complex Systems; Springer: Singapore, 2016; pp. 544–554. [Google Scholar]
- Paranjape, A.; Benson, A.R.; Leskovec, J. Motifs in Temporal Networks. In Proceedings of the Tenth ACM International Conference on Web Search and Data Mining, Cambridge, UK, 6–10 February 2017; pp. 601–610. [Google Scholar]
- Mackey, P.; Porterfield, K.; Fitzhenry, E.; Choudhury, S.; Chin, G. A chronological edge-driven approach to temporal subgraph isomorphism. In Proceedings of the 2018 IEEE International Conference on Big Data (Big Data), Seattle, WA, USA, 10–13 December 2018; pp. 3972–3979. [Google Scholar]
- Liu, P.; Benson, A.R.; Charikar, M. Sampling methods for counting temporal motifs. In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining, Melbourne VIC, Australia, 11–15 February 2019; pp. 294–302. [Google Scholar]
- Sun, X.; Tan, Y.; Wu, Q.; Chen, B.; Shen, C. TM-Miner: TFS-Based Algorithm for Mining Temporal Motifs in Large Temporal Network. IEEE Access
**2019**, 7, 49778–49789. [Google Scholar] [CrossRef] - Tsourakakis, C.E.; Kang, U.; Miller, G.L.; Faloutsos, C. Doulion: Counting triangles in massive graphs with a coin. In Proceedings of the 15th ACM SIGKDD International Conference On Knowledge Discovery and Data Mining, Paris, France, 28 June–1 July 2009; pp. 837–846. [Google Scholar]
- Panzarasa, P.; Opsahl, T.; Carley, K.M. Patterns and Dynamics of Users’ Behavior and Interaction: Network Analysis of an Online Community. J. Assoc. Inf. Sci. Technol.
**2010**, 60, 911–932. [Google Scholar] [CrossRef] - Gurukar, S.; Ranu, S.; Ravindran, B. COMMIT: A Scalable Approach to Mining Communication Motifs from Dynamic Networks. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, Melbourne, Victoria, Australia, 31 May–4 June 2015; pp. 475–489. [Google Scholar]
- Zignani, M.; Quadri, C.; Del Vicario, M.; Gaito, S.; Rossi, G.P. Temporal Communication Motifs in Mobile Cohesive Groups. In Proceedings of the International Workshop on Complex Networks and Their Applications, Cambridge, UK, 11–13 December 2018; pp. 490–501. [Google Scholar]

**Figure 1.**Temporal graph patterns used in the experiments: (

**a**) a classical triangle motif, and the temporal relationship is ${t}_{0}<{t}_{1}<{t}_{2}$; (

**b**) s path motif whose edge time increases from left to right, and the motif indicates the propagation of information on the path; and (

**c**) the bi-fan motif, and the temporal relationship is ${t}_{0}<{t}_{1}<{t}_{2}<{t}_{3}$.

**Figure 2.**The running time of the exact and BT algorithms under different $\Delta T$ in CollegeMsg dataset. (

**a**) the result for the Triangle TGP, (

**b**) the result for the Path TGP, (

**c**) the result for the Bi-fan TGP.

**Figure 3.**The running time of the exact and BT algorithms under different $\Delta T$ in Email dataset. (

**a**) the result for the Triangle TGP, (

**b**) the result for the Path TGP, (

**c**) the result for the Bi-fan TGP.

**Figure 4.**The running time of the exact and BT algorithms under different $\Delta T$ in MathOverflow dataset. (

**a**) the result for the Triangle TGP, (

**b**) the result for the Path TGP, (

**c**) the result for the Bi-fan TGP.

**Figure 5.**The number of subgraphs in set S. (

**a**) the result of CollegeMsg, (

**b**) the result of Email, (

**c**) the result of MathOverflow.

${\mathit{\delta}}_{\mathit{i}}$ | 0 | 1 |
---|---|---|

probability | $1-{p}^{{m}_{h}}$ | ${p}^{{m}_{h}}$ |

Dataset | # Node | # Static Edges | # Temporal Edges | Time Span |
---|---|---|---|---|

CollegeMsg | 1.9 K | 20.3 K | 59.8 K | 194 days |

986 | 24.9 K | 332 K | 2.20 years | |

MathOverflow | 24.8 K | 228 K | 390 K | 6.44 years |

Datasets | TGP | $\mathbf{\Delta}\mathit{T}=1800$ | $\mathbf{\Delta}\mathit{T}=3600$ | $\mathbf{\Delta}\mathit{T}=5400$ | $\mathbf{\Delta}\mathit{T}=7200$ | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Exact | BT | $\mathbf{Sr}$ | Exact | BT | $\mathbf{Sr}$ | Exact | BT | $\mathbf{Sr}$ | Exact | BT | $\mathbf{Sr}$ | ||

College | Triangle | 0.52 | 0.52 | 1.0 | 0.54 | 0.57 | 1.1 | 0.56 | 0.67 | 1.2 | 0.56 | 0.723 | 1.3 |

Path | 0.47 | 0.41 | 0.8 | 0.50 | 0.87 | 1.7 | 0.54 | 1.02 | 1.9 | 0.58 | 1.23 | 2.1 | |

Bi-fan | 0.58 | 1.04 | 1.8 | 0.64 | 1.43 | 2.2 | 0.71 | 1.65 | 2.3 | 0.78 | 1.73 | 2.2 | |

Triangle | 10.39 | 11.24 | 1.1 | 10.65 | 12.42 | 1.2 | 10.78 | 13.70 | 1.3 | 11.34 | 16.22 | 1.4 | |

Path | 10.58 | 13.69 | 1.3 | 10.79 | 15.41 | 1.4 | 10.88 | 18.26 | 1.7 | 10.91 | 21.59 | 2.0 | |

Bi-fan | 10.10 | 23.56 | 2.3 | 10.40 | 27.79 | 2.7 | 10.50 | 32.90 | 3.1 | 10.65 | 37.52 | 3.5 | |

Math | Triangle | 11.00 | 10.64 | 0.9 | 11.25 | 11.12 | 1.0 | 12.28 | 12.35 | 1.0 | 12.82 | 13.62 | 1.1 |

Path | 10.19 | 10.61 | 1.0 | 11.23 | 11.27 | 1.0 | 12.59 | 13.48 | 1.1 | 12.79 | 14.34 | 1.1 | |

Bi-fan | 12.29 | 21.91 | 1.8 | 13.47 | 22.62 | 1.7 | 13.50 | 23.78 | 1.8 | 13.40 | 25.63 | 1.9 |

**Table 4.**The average $\u03f5$ and $Sr$ of the estimation algorithm under different probabilities (10 trials).

Datasets | TGP | $\mathit{p}=0.6$ | $\mathit{p}=0.7$ | $\mathit{p}=0.8$ | $\mathit{p}=0.9$ | ||||
---|---|---|---|---|---|---|---|---|---|

$\mathit{\u03f5}$ | $\mathbf{Sr}$ | $\mathit{\u03f5}$ | $\mathbf{Sr}$ | $\mathit{\u03f5}$ | $\mathbf{Sr}$ | $\mathit{\u03f5}$ | $\mathbf{Sr}$ | ||

CollegeMsg | Triangle | 5.29% | 2.00 | 3.93% | 1.87 | 2.96% | 1.62 | 1.43% | 1.52 |

Path | 4.84% | 2.23 | 3.02% | 1.81 | 1.98% | 1.44 | 1.67% | 1.15 | |

Bi-fan | 5.05% | 2.20 | 2.95% | 1.53 | 2.13% | 1.48 | 1.98% | 1.33 | |

Triangle | 3.44% | 2.92 | 1.35% | 2.20 | 1.32% | 1.71 | 1.17% | 1.32 | |

Path | 3.14% | 2.85 | 2.52% | 2.12 | 1.85% | 1.64 | 1.01% | 1.21 | |

Bi-fan | 4.70% | 2.74 | 2.24% | 2.10 | 2.19% | 1.61 | 1.19% | 1.27 | |

MathOverflow | Triangle | 4.05% | 3.03 | 2.85% | 2.18 | 2.43% | 1.64 | 1.47% | 1.33 |

Path | 5.65% | 2.88 | 4.43% | 2.13 | 3.04% | 1.59 | 1.96% | 1.28 | |

Bi-fan | 4.76% | 2.94 | 3.76% | 2.04 | 1.90% | 1.53 | 1.56% | 1.20 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Sun, X.; Tan, Y.; Wu, Q.; Wang, J.; Shen, C.
New Algorithms for Counting Temporal Graph Pattern. *Symmetry* **2019**, *11*, 1188.
https://doi.org/10.3390/sym11101188

**AMA Style**

Sun X, Tan Y, Wu Q, Wang J, Shen C.
New Algorithms for Counting Temporal Graph Pattern. *Symmetry*. 2019; 11(10):1188.
https://doi.org/10.3390/sym11101188

**Chicago/Turabian Style**

Sun, Xiaoli, Yusong Tan, Qingbo Wu, Jing Wang, and Changxiang Shen.
2019. "New Algorithms for Counting Temporal Graph Pattern" *Symmetry* 11, no. 10: 1188.
https://doi.org/10.3390/sym11101188