Functions


Max-Cut


Description

Computes max-cut in a given graph.


Input

A graph in the edge list file. Example of format:

7 9
1 2 46
2 3 -22
3 4 76
4 5 -180
5 6 22
6 7 -50
7 1 14
1 5 61
3 7 3

The first line contains the number of vertices n and the number of edges m. The next m lines contain three integers denoting edges and their weights.


Output

A file with the result and info about running on HPC.

Stable set


Description

Computes the maximum stable set in a given unweighted graph.


Input

A graph in the edge list file. Example of format:

7 9
1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 1 1
1 5 1
3 7 1

The first line contains the number of vertices n and the number of edges m. The next m lines contain three integers denoting edges and their weights.


Output

A file with the result and info about running on HPC.