# Advanced algorithms

If you require procedures designed to solve specific graph problems, there is a
number of advanced algorithms available in Memgraph.

[BFS](https://memgraph.com/docs/advanced-algorithms/deep-path-traversal#breadth-first-search),
[DFS](https://memgraph.com/docs/advanced-algorithms/deep-path-traversal#depth-first-search), [Weighted
shortest path](https://memgraph.com/docs/advanced-algorithms/deep-path-traversal#weighted-shortest-path),
[All shortest
paths](https://memgraph.com/docs/advanced-algorithms/deep-path-traversal#all-shortest-paths) and [K
shortest paths](https://memgraph.com/docs/advanced-algorithms/deep-path-traversal#k-shortest-paths) are
built-in deep path traversal algorithms you can run using their specific
clauses. 

[Dynamic graph
algorithms](https://memgraph.com/docs/advanced-algorithms/available-algorithms#dynamic-graph-algorithms-enterprise)
allow you to perform real-time, scalable computations on changing data. These
algorithms have been specifically developed to handle high-speed updates and
large-scale graph changes without needing to restart the computation process.
Dynamic graph algorithms are a part of [Memgraph Enterprise
license](https://memgraph.com/docs/database-management/enabling-memgraph-enterprise). 

For more algorithms, check the **Memgraph Advanced Graph Extensions** (**MAGE**)
library. It is part of the [Memgraph GitHub repository](https://github.com/memgraph/memgraph/tree/master/src/mage)
that contains [graph algorithms](https://memgraph.com/docs/advanced-algorithms/available-algorithms)
written by the team behind Memgraph and its users in the form of query modules.
The project aims to give everyone the tools they need to tackle the most
interesting and challenging graph analytics problems.

**Query module** is a concept introduced by Memgraph and it refers to
user-defined procedures, grouped into modules that extend the Cypher query
language. Procedures are implementations of various algorithms in multiple
programming languages and they are all runnable inside Memgraph.

> **Info**
>
> As of version 3.8.0, the [MAGE repository](https://github.com/memgraph/mage) is now part of the
> [Memgraph GitHub repository](https://github.com/memgraph/memgraph) under the `mage` directory and
> will be archived.

## Quick start

### Install MAGE

If you started Memgraph with the `memgraph-mage` Docker
image, MAGE is already included and you can skip to step 3.

If you are using Linux, you can [install MAGE from
source](https://memgraph.com/docs/advanced-algorithms/install-mage#linux).

### Load query modules

If your instance was already running when you installed MAGE, you need to
execute the following query to load them:

```
CALL mg.load_all();
```

Check [the list](https://memgraph.com/docs/advanced-algorithms/available-algorithms) of available graph
algorithms and query modules.

### Call procedures

You are ready to [call procedures](https://memgraph.com/docs/advanced-algorithms/run-algorithms) within
queries and tackle that graph analytics problem that's been keeping you awake. 

## Memgraph compatibility

With changes in Memgraph API, MAGE started to track version numbers. Check out
MAGE compatibility with Memgraph versions.

> **Info**
>
> For versions 3.0.0 and later, the MAGE version is the same as the Memgraph version.

| MAGE version | Memgraph version  |
|--------------|-------------------|
| == Memgraph  | >=3.0               | 
| 1.22         | 2.22              |
| 1.22.1       | 2.22.1            |
| 1.21         | 2.21              |
| 1.20.1       | 2.20.1            |
| 1.20         | 2.20              |
| 1.19         | 2.19              |
| 1.18.1       | 2.18.1            |
| 1.18         | 2.18              |
| 1.17         | 2.17              |
| 1.16.1       | 2.16.1            |
| 1.16         | 2.16              |
| 1.15.2       | 2.15.2            |
| 1.15.1       | 2.15.1            |
| 1.15         | 2.15              |
| 1.14.1       | 2.14.1            |
| 1.14         | 2.14              |
| 1.13         | 2.13              |
| 1.12.1       | 2.12.1            |
| 1.12         | 2.12              |
| 1.11.1       | 2.11              |
| 1.11.0       | 2.11              |
| 1.10         | 2.10.1            |
| 1.9          | 2.10.0            |
| 1.8          | 2.9               |
| 1.7          | 2.8               |
| >= 1.6       | >= 2.5.2          |
| >= 1.4       | >= 2.4.0          |
| >= 1.0       | >= 2.0.0          |
| ^0           | >= 1.4.0 &lt;= 1.6.1 |

## Custom query modules

You can [create your own graph algorithms](https://memgraph.com/docs/custom-query-modules) and query
modules using C/C++ or Python, and
[contribute](https://memgraph.com/docs/custom-query-modules/contributing) them to the MAGE library.
