# Graph Algorithms ![rw-book-cover](https://images-na.ssl-images-amazon.com/images/I/518u4HX9IXL._SL200_.jpg) ## Metadata - Author: [[Mark Needham, Amy E. Hodler]] - Full Title: Graph Algorithms - Category: #apache-spark #python ## Highlights - What makes graphs so remarkably important are directional relationships and transitive relationships. In directional relationships, A may cause B, but not the opposite. In transitive relationships, A can be directly related to B and B can be directly related to C, while A is not directly related to C, so that consequently A is transitively related to C. ([Location 96](https://readwise.io/to_kindle?action=open&asin=B07S1Z51TB&location=96)) - Graph algorithms provide one of the most potent approaches to analyzing connected data because their mathematical calculations are specifically built to operate on relationships. ([Location 188](https://readwise.io/to_kindle?action=open&asin=B07S1Z51TB&location=188)) - Most graph queries consider specific parts of the graph (e.g., a starting node), and the work is usually focused in the surrounding subgraph. We term this type of work graph local, and it implies declaratively querying a graph’s structure, ([Location 218](https://readwise.io/to_kindle?action=open&asin=B07S1Z51TB&location=218)) - The input to the algorithm is usually the whole graph, and the output can be an enriched graph or some aggregate value such as a score. We categorize such processing as graph global, and it implies processing a graph’s structure using computational algorithms (often iteratively). ([Location 224](https://readwise.io/to_kindle?action=open&asin=B07S1Z51TB&location=224)) - whole-graph operations are processed by computational algorithms and subgraph operations are queried in databases. ([Location 229](https://readwise.io/to_kindle?action=open&asin=B07S1Z51TB&location=229))