• Aucun résultat trouvé

Charles Lin Charles Lin

N/A
N/A
Protected

Academic year: 2022

Partager "Charles Lin Charles Lin"

Copied!
107
0
0

Texte intégral

(1)

Charles Lin

Charles Lin

(2)

•• Graph Representation Graph Representation

•• DFS DFS

•• B BFS FS

•• Dijkstra Dijkstra

•• A* Search A* Search

•• Bellman Bellman--Ford Ford

•• Floyd Floyd--Warshall Warshall

•• Iterative? Non Iterative? Non--iterative? iterative?

•• MST MST

•• Flow Flow –– Edmond Edmond--Karp Karp

(3)

•• Adjacency Matrix Adjacency Matrix

–– bool bool way[100][100]; way[100][100];

–– cin cin >> i >> j; >> i >> j;

–– way[i][j] = true; way[i][j] = true;

(4)

•• Adjacency Linked List Adjacency Linked List

–– vector< vector<int int> v[100]; > v[100];

–– cin cin >> i >> j; >> i >> j;

–– v[i]. v[i].push_back push_back(j); (j);

(5)

•• Edge List Edge List struct

struct Edge { Edge {

int int Start_Vertex Start_Vertex, , End_Vertex End_Vertex;;

} edge[10000];

} edge[10000];

cin

cin >> edge[i]. >> edge[i].Start_Vertex Start_Vertex >> >>

edge[i].

edge[i].End_Vertex End_Vertex;;

(6)
(7)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(8)

•• Mission: To go from Point A to Point E Mission: To go from Point A to Point E

•• How? How?

(9)

•• Structure to use: Structure to use: Stack Stack

•• See See “The House of Santa Claus” “The House of Santa Claus”

(10)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(11)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(12)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(13)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(14)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(15)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

B is visited already

B is visited already

(16)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(17)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(18)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(19)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

(20)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

We find a path from Point A to Point E, We find a path from Point A to Point E, but ……

but ……

(21)

stack<int> s;

bool Visited[MAX];

void DFS(int u) { s.push(u);

if (u == GOAL) {

for (int x = 0; x < s.size(); x++) printf(“%d “, s[x]);

return ; }

for (int x = 0; x < MAX; x++) if (!Visited[x]) {

Visited[x] = true;

DFS(x);

Visited[x] = false;

}

s.pop();

}

int main() {

memset(Visited, 0, sizeof(Visited));

// Input Handling (GOAL = ?) DFS(0);

}

Very Important Very Important

It needs to be restored for other It needs to be restored for other points to traverse, or the path points to traverse, or the path may not be found

may not be found

(22)

•• Usage: Usage:

–– Finding a path from start to destination Finding a path from start to destination

(NOT RECOMMENDED (NOT RECOMMENDED –– TLE) TLE) –– Topological Topological Sort (T Sort (T--Sort) Sort)

–– Strongly Strongly--Connected Connected Component (SCC) Component (SCC)

(23)

•• Topological Sort Topological Sort

–– Directed Acyclic Graph (DAG) Directed Acyclic Graph (DAG)

–– Find the order of nodes such that Find the order of nodes such that for each node, for each node, every parent is before that node on the list

every parent is before that node on the list

–– Dump Method: Check for root of residual graph Dump Method: Check for root of residual graph (Do it n times)

(Do it n times)

–– Better Method: Reverse of finishing time Better Method: Reverse of finishing time

(24)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Cycle Exists !!!

Cycle Exists !!!

TT--Sort: Sort:

(25)

A

B

C

D

E

OK OK

TT--Sort: Sort:

(26)

A

B

C

D

E

Things in output stack: NONE Things in output stack: NONE

TT--Sort: Sort:

(27)

A

B

C

D

E

Things in output stack: NONE Things in output stack: NONE

TT--Sort: Sort:

(28)

A

B

C

D

E

Things in output stack: NONE Things in output stack: NONE

TT--Sort: Sort:

(29)

A

B

C

D

E

Things in output stack: NONE Things in output stack: NONE

TT--Sort: Sort:

(30)

A

B

C

D

E

Things in output stack: NONE Things in output stack: NONE

TT--Sort: Sort:

(31)

A

B

C

D

E

Things in output stack: E Things in output stack: E

TT--Sort: Sort:

(32)

A

B

C

D

E

Things in output stack: E, D Things in output stack: E, D

TT--Sort: Sort:

(33)

A

B

C

D

E

Things in output stack: E, D, B Things in output stack: E, D, B

TT--Sort: Sort:

(34)

A

B

C

D

E

Things in output stack: E, D, B Things in output stack: E, D, B

TT--Sort: Sort:

(35)

A

B

C

D

E

Things in output stack: E, D, B Things in output stack: E, D, B

TT--Sort: Sort:

(36)

A

B

C

D

E

Things in output stack: E, D, B Things in output stack: E, D, B

TT--Sort: Sort:

(37)

A

B

C

D

E

Things in output stack: E, D, B Things in output stack: E, D, B

TT--Sort: Sort:

(38)

A

B

C

D

E

Things in output stack: E, D, B, C Things in output stack: E, D, B, C

TT--Sort: Sort:

(39)

A

B

C

D

E

Things in output stack: E, D, B, C, A Things in output stack: E, D, B, C, A

TT--Sort Output: A, C, B, D, E Sort Output: A, C, B, D, E

TT--Sort: Sort:

(40)

•• Strongly Connected Components Strongly Connected Components

–– Directed Graph Directed Graph

–– Find Find groups of groups of nodes such that nodes such that in each group, in each group,

every node has an edge to every other node

every node has an edge to every other node

(41)

•• Strongly Connected Components Strongly Connected Components

–– Method: DFS twice Method: DFS twice

–– Do DFS on Graph G, record finishing time of node Do DFS on Graph G, record finishing time of node –– Do DFS on Graph G Do DFS on Graph G

TT

, by decreasing finish time , by decreasing finish time

–– Output the Output the vertices vertices

(42)

•• Strongly Connected Components Strongly Connected Components

•• Note: After grouping the vertices, the new Note: After grouping the vertices, the new nodes form a Directed Acyclic Graph

nodes form a Directed Acyclic Graph

•• Problem: Where’s the back button Problem: Where’s the back button

(43)

•• Structure to use: Structure to use: Queue Queue

(44)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in queue:

Things in queue:

A, C 3 A, B 10

(45)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in queue:

Things in queue:

A, B 10 A, C, E 5 A, C, B 7 A, C, D 8

(46)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in queue:

Things in queue:

A, C, E 5 A, C, B 7 A, C, D 8 A, B, C 11 A, B, D 12

(47)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in queue:

Things in queue:

A, C, B 7 A, C, D 8 A, B, C 11 A, B, D 12

We are done !!!

We are done !!!

(48)

•• Application: Application:

–– Finding shortest path Finding shortest path –– Flood Flood--Fill Fill

(49)

•• Structure to use: Structure to use: Priority Priority Queue Queue

•• Consider the past Consider the past

–– The length of path visited so The length of path visited so far far

•• No negative edges allowed No negative edges allowed

(50)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in priority queue:

Things in priority queue:

A, C 3 A, B 10

Current Route:

Current Route:

A

(51)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in priority queue:

Things in priority queue:

A, C, E 5 A, C, B 7 A, B 10 A, C, D 11 Current Route:

Current Route:

A, C

(52)

A

B

C

D

E 10

3

1 4

2 2

8 7 9

Things in priority queue:

Things in priority queue:

A, C, B 7 A, B 10 A, C, D 11

We find the shortest path already !!!

We find the shortest path already !!!

Current Route:

Current Route:

A, C, E

(53)

•• Structure to use: Structure to use: Priority Priority Queue Queue

•• Consider the past + future Consider the past + future

•• How to consider the future? How to consider the future?

–– Admissible Heuristic (Best Admissible Heuristic (Best--Case Prediction) Case Prediction)

–– How to predict? How to predict?

(54)

•• Prediction 1: Prediction 1: Displacement Displacement

–– Given coordinates, calculate the displacement of Given coordinates, calculate the displacement of current node to destination

current node to destination –– sqrt sqrt((x2 ((x2 –– x1) x1)

22

+ (y2 + (y2 –– y1) y1)

22

))

•• Prediction 2: Prediction 2: Manhattan Distance Manhattan Distance

–– Given grid, calculate the horizontal and Given grid, calculate the horizontal and vertical movement

vertical movement –– (x2 (x2 –– x1) + (y2 x1) + (y2 –– y1 y1))

(55)

•• Prediction 3: Hamming Distance Prediction 3: Hamming Distance

–– Given pieces and location, find out the number Given pieces and location, find out the number of misplaced pieces

of misplaced pieces

(56)

Dest

Start

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(57)

Dest

1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(58)

Dest 2 + 4 = 6

1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(59)

3 + 3 = 6 Dest 2 + 4 = 6

1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(60)

4 + 4 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6 1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(61)

4 + 4 = 8 5 + 3 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6 1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(62)

4 + 4 = 8 5 + 3 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6 1 + 5 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(63)

4 + 4 = 8 5 + 3 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(64)

4 + 4 = 8 5 + 3 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(65)

4 + 4 = 8 5 + 3 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6 4 + 4 = 8

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(66)

4 + 4 = 8 5 + 3 = 8 6 + 2 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6 4 + 4 = 8

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(67)

4 + 4 = 8 5 + 3 = 8 6 + 2 = 8 7 + 1 = 8

3 + 3 = 6 4 + 2 = 6 Dest

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6 4 + 4 = 8

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(68)

4 + 4 = 8 5 + 3 = 8 6 + 2 = 8 7 + 1 = 8 8 + 2 = 10

3 + 3 = 6 4 + 2 = 6 Dest (8 + 0 = 8)

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6 4 + 4 = 8

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(69)

4 + 4 = 8 5 + 3 = 8 6 + 2 = 8 7 + 1 = 8 8 + 2 = 10

3 + 3 = 6 4 + 2 = 6 Dest (8 + 0 = 8)

2 + 4 = 6

1 + 5 = 6 3 + 3 = 6

Start (0 + 6 = 6) 1 + 5 = 6 2 + 4 = 6 3 + 3 = 6 4 + 4 = 8

- Manhattan Distance is used

- If there is a tie, consider the one with lowest heuristic first - If there is still a tie, consider in Up, Down, Left, Right order

(70)

•• A* Search = Past + Future A* Search = Past + Future

•• A* Search A* Search –– Future = ? Future = ?

•• Dijkstra Dijkstra

•• A* Search A* Search –– Past = ? Past = ?

•• Greedy Greedy

(71)

•• How about graph with negative edges? How about graph with negative edges?

–– Bellman Bellman--Ford Ford

(72)

•• Consider the source as weight 0, others as infinity Consider the source as weight 0, others as infinity

•• Count = 0, Improve = true Count = 0, Improve = true

•• While (Count < n and Improve) { While (Count < n and Improve) {

–– Improve = false Improve = false –– Count++ Count++

–– For For e each edge ach edge uv uv

•• If If u.weightu.weight + + uvuv distance < distance < v.weightv.weight {{

–– Improve = trueImprove = true

–– v.weightv.weight = = u.weightu.weight + + uv.distanceuv.distance

•• }}

•• }}

•• If (Count == n) print “Negative weight cycle detected” If (Count == n) print “Negative weight cycle detected”

•• Else print shortest path distance Else print shortest path distance

(73)

•• Time Time Compleity Compleity: O(VE) : O(VE)

(74)

•• All we have just dealt with is single source All we have just dealt with is single source

•• How about multiple How about multiple sources (all sources)? sources (all sources)?

–– Floyd Floyd--Warshall Warshall Algorithm Algorithm

(75)

•• Makes use of Makes use of memoization memoization

•• 1. Find all smallest 1 1. Find all smallest 1--hop distance hop distance

•• 2. Find all smallest 2 2. Find all smallest 2--hops distance hops distance

•• 3. … 3. …

•• N. Find all smallest n N. Find all smallest n--hops distance hops distance

•• Done ! Done !

(76)

•• For ( For (int int k = 0; k < MAX; k++) { k = 0; k < MAX; k++) { –– For ( For (int int I = 0; I < MAX; I = 0; I < MAX; ii++) { ++) {

•• For ( For (int int j = 0; j < MAX; j++) { j = 0; j < MAX; j++) {

–– Path[ Path[ii][j] = min(Path[ ][j] = min(Path[ii][j], Path[ ][j], Path[ii][k] + ][k] + Path[k][j]);

Path[k][j]);

•• }}

–– }}

•• }}

(77)

•• What is iterative What is iterative--deepening? deepening?

•• Given limited time, find the current most optimal Given limited time, find the current most optimal solution

solution

•• Dijkstra Dijkstra (Shortest 1 (Shortest 1--step Solution) step Solution)

•• Dijkstra Dijkstra (Shortest 2 (Shortest 2--steps Solution) steps Solution)

•• Dijkstra Dijkstra (Shortest 3 (Shortest 3--steps Solution) steps Solution)

••

•• Dijkstra Dijkstra (Shortest n (Shortest n--steps Solution) steps Solution)

•• Suitable in bi Suitable in bi--directional search (Faster than 1 directional search (Faster than 1--way way search)

search)

(78)

s t

(79)

s t

(80)

•• Given an undirected graph, find the minimum cost Given an undirected graph, find the minimum cost so that every node has path to other

so that every node has path to other nodes nodes

•• Kruskal’s Kruskal’s Algorithm Algorithm

•• Prim’s Algorithm Prim’s Algorithm

(81)

•• Continue Finding Shortest Edge Continue Finding Shortest Edge

•• If no cycle is formed If no cycle is formed

–– add it into the list add it into the list

–– Construct a parent Construct a parent--child child relationship relationship

•• If all nodes have the same parent, we are done If all nodes have the same parent, we are done (path compression)

(path compression)

(82)

Node A B C D E

Parent A B C D E

A

B

C

D

E 4

3

1

2

7 8

10

(83)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A B B D E

10

(84)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A B B B E

10

(85)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A A A A E

10

(86)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A A A A E

Cycle formed Cycle formed

10

(87)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A A A A E

10

(88)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A A A A E

Cycle formed Cycle formed

10

(89)

A

B

C

D

E 4

3

1

2

7 8

Edge List:

Edge List:

BC 1

Node A B C D E

Parent A A A A A

10

(90)

•• Path Compression can be done when we find Path Compression can be done when we find parent

parent

int

int find_parent find_parent((int int x) { x) {

return (parent[x] == x)? x: return (parent[x] == x)? x:

(parent[x] = (parent[x] = find_parent find_parent(parent[x])); (parent[x]));

}}

(91)

•• While not all nodes are visited While not all nodes are visited

–– While the list is not empty and the minimum edge While the list is not empty and the minimum edge connects to visited node

connects to visited node

•• Pop out the edge Pop out the edge

–– If the list is empty, print Impossible and return If the list is empty, print Impossible and return –– Else Else

•• Mark that node as visited Mark that node as visited

•• Add all its unvisited Add all its unvisited edges to the list edges to the list

•• Print the tree Print the tree

(92)

A

B

C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

AC 3

AB 4

(93)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

CB 1

AB 4

CD 7

CE 10

(94)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

BD 2

AB 4

CD 7

CE 10

(95)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

AB 4

CD 7

DE 8

CE 10

(96)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

CD 7

DE 8

CE 10

Cycle formed

Cycle formed

(97)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

DE 8

CE 10

Cycle formed

Cycle formed

(98)

A

B

C C

D

E 4

3

1

2

7 8

10

Edge List:

Edge List:

CE 10

We are done We are done

(99)

•• We have just dealt with undirected MST. We have just dealt with undirected MST.

•• How about directed? How about directed?

•• Using Using Kruskal’s Kruskal’s or Prim’s cannot solve directed or Prim’s cannot solve directed MST problem

MST problem

•• How? How?

•• Chu Chu--Liu/Edmonds Algorithm Liu/Edmonds Algorithm

(100)

•• For each vertex, find the smallest incoming edge For each vertex, find the smallest incoming edge

•• While there is cycle While there is cycle

–– Find an edge entering the cycle with smallest increase Find an edge entering the cycle with smallest increase

–– Remove the edge pointing to the same node and replace by new Remove the edge pointing to the same node and replace by new edge

edge

•• Print out the tree Print out the tree

(101)

A

B

C

D

E 10

3

5 2

8 4

2 7 9

(102)

Cycle formed (B, C, D) A  B, C, D = 10 – 2 = 8

A  B, C, D = 3 – 2 = 1 E  B, C, D = 9 – 4 = 5 A

B

C

D

E 10

3

5 2

8 4

2 7 9

(103)

No Cycle formed, that’s it !!!

A

B

C

D

E 10

3

5 2

8 4

2 7 9

(104)

•• Using this algorithm may unloop a cycle and Using this algorithm may unloop a cycle and create another cycle…

create another cycle…

•• … But since the length of tree is increasing, there … But since the length of tree is increasing, there will have an end eventually

will have an end eventually

•• Worst Case is doing n Worst Case is doing n--1 times 1 times

•• Time Complexity is O(EV) Time Complexity is O(EV)

(105)

•• A graph with weight (capacity) A graph with weight (capacity)

•• Mission: Mission: Find out the maximum flow from source Find out the maximum flow from source to destination

to destination

•• How? How?

(106)

•• Do { Do {

–– Do BFS on the graph to find maximum flow in the Do BFS on the graph to find maximum flow in the graph

graph

–– Add it to the total flow Add it to the total flow

–– For each edge in the maximum flow For each edge in the maximum flow –– Deduct the flow just passed Deduct the flow just passed

•• } While the flow is not zero; } While the flow is not zero;

(107)

Références

Documents relatifs

Composition-, temperature- and pH-dependent phase behaviour of the doubly phosphorylated phytol guest lipid (PhyP2) in host monoolein bulk phase formulations in excess water

oj+e,, ri wkh Eùkp wuhh ri x1 L uvw vkrz wkdw +fi wkh sursrvlwlrq 8, li d eudqfk e ri x lv +w&gt; d, xvhixo dqg wkhuh lv d ghfrudwlrq iru +x&gt; e,/ wkhq wkhuh lv d ghfrudwlrq

Our method is independent of the classification method (Support Vector Machine, K-Nearest Neighbours, Neural Network, etc.), however, in any case we need to transform each

These isolates showed unique internal transcribed spacer sequences, different enough from those of any described species to justify new species status.. These three distinct

Patient preference for subcutaneous trastuzumab via handheld syringe versus intravenous infusion in HER2-positive early breast cancer: cohort 2 of the PrefHer study; abstract

In this section, we will present an algorithm which is capable of solving our optimization problem, stated as follows: given a directed hypergraph H representing all the

The aim of this research work, therefore, is the design and implementation of a classification system, which is able to separate relevant news from noise and which allows a

We then introduce the graph path ordering inspired by the recursive path ordering on terms and show that it is a well-founded rewrite ordering on graphs for which checking