GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Week 3: Data Structures & Decomposition

Melina Mackey Computer Science Englisch 9 Karten

Week 3: Data Structures & Decomposition

Karten in diesem Stapel (9)

  1. 1Storing data- Clarity, simplicity, easy to access, easy to modify
    - E.g. tables, lists, graphs
  2. 2Graphs- Abstraction of relational data
    - Useful for representing relationships between things
    - Made up of vertices (things) and edges (relationships)
  3. 3Directed graph- For ordered relations
    - Edge relation is asymmetric i.e. v can be reachable from w but not the other way around
    - Path - a sequence of edges which join a set of unique vertices
  4. 4Simple graphs, cycles and connectivity- Simple graph - no loops or parallel edges
    - Cycle - path (non-self-intersecting) with same start and end vertex
    - Connected graph - every vertex can be reached from every other vertex
  5. 5Representation of graphs in Python1. Adjacency matrix - table with one column and one row per vertex; each cell represents existence of edge (1 or 0)
    2. Adjacency list - list of lists, with one inner list per vertex containing its neighbours
    3. Edge list - list of list/tuple pairs holding the source and destination vertices for each edge
  6. 6Simple treeT = (V, E) is connected and has no cycles
    Properties:
    1. Minimally connected (removing any edge renders disconnected)
    2. Unique path between any 2 vertices
  7. 7Spanning tree of a graph- Assume G = (V, E) is a simple and connected graph
    - Spanning tree of G is a subgraph T = (V, F) of G that:
    1. Contains all vertices of G
    2. Is a tree (connected and cycle-free)
  8. 8Prim's algorithm with decompositionPrim's algorithm with decomposition
  9. 9Decomposition- Breaking down programs/problems into sub-programs/problems
    - Leads to re-usable components
    - Main tool for decomposition = functions

Informationen

Beschreibung
Computer Science (FIT1045: Algorithms & Programming Fundamentals in Python) Karteikarten am Week 3: Data Structures & Decomposition, erstellt von Melina Mackey am 02/09/2019.
Erstellt von
Melina Mackey
Aufrufe
0
Verlauf
  • Erstellt von Melina Mackey · 2 Sep 2019
  • Kopiert von Melina Mackey · 2 Sep 2019
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck