# Graph - Data Structure (Physical Representation)

### Table of Contents

## 1 - About

A graph is represented generally in a physical data structure

## 2 - Articles Related

## 3 - Format

### 3.1 - Two set

The graph is composed of two set.

- a set of vertices (node)

Node |
---|

a |

b |

c |

- and set of egde represented for a :
- directed graph by a ordered pairs of vertices
- undirected graph by a set of unordered pairs of vertices

Node | adjacent to Node |
---|---|

a | b |

a | c |

b | a |

b | c |

c | a |

c | b |

### 3.2 - Adjacency list

The graph is composed of set.

- a set of vertices (node)

Node | |
---|---|

a | |

b | |

c |

- and a set of a set of adjacent vertices

Node | adjacent to Nodes |
---|---|

a | b,c |

b | a,c |

c | a,b |

### 3.3 - Adjacency matrix

Adjacency matrix is a matrix of adjacent vertices where the coordinates (x,y) may be stored in a set

a | b | c | |
---|---|---|---|

a | 0 | 1 | 1 |

b | 1 | 0 | 1 |

c | 1 | 1 | 1 |