O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Graphs | Data Structures - OCR Computer Science A Level

Malachy Moran-Tun Computer Science A level Inglês 11 flashcards

Flashcards do conjunto (11)

  1. 1What are Graphs?> Form of abstract data structure (in the data structure topic‽ wow!)
    > Used to represent complex relationships
    > Set of vertices or nodes connected by edges or arcs
  2. 2What is the Difference between Directed and Undirected Graphs?> Directed graphs (digraphs) have at least one one-way edge
    > Undirected graphs all have two-way edges
  3. 3What is the Difference between Weighted and Unweighted Graphs?> Weighted graphs show a sort of cost from one vertex to another - e.g.: a distance
    > Unweighted graphs do not show this
  4. 4What is the Adjacency Matrix?> Two dimensional array used to implement and represent a graph
    > Rows and columns represent nodes
    > Values in cells represents connecting edges
    > Undirected graphs have symmetrical adjacency matrices
  5. 5What is the Adjacency List?> List used to implement and represent a graph
    > Each node points to a list of adjacent nodes
    > If weighted, is implemented using a list of dictionaries, with the key being the node, and the value being the weight: {node : weight}
    > If unweighted, an array is used to represent all adjacent nodes
  6. 6What are the Advantages and Disadvantages of the Adjacency Matrix?> Convenient to work with and simple to understand
    > Sparse graphs leave most elements empty
    > The 2D array is static: it cannot grow or shrink, so the graph is limited to the size defined at the beginning of the program
  7. 7What are the Advantages and Disadvantages of the Adjacency List?> More space efficient than adjacency matrix - no empty spaces
    > Can be dynamic (i.e.: not use an array), allowing the graph to grow or shrink while the program is running
    > Less convenient to work with and therefore harder to understand
    > If dynamic, could potentially cause under / overflow errors
  8. 8What are the 2 ways of Traversing a Graph?1. Depth-first
    2. Breadth-first
  9. 9What is Depth-First Traversal in Graphs?> Type of traversal that goes as far down one route as possible before backtracking
    > Changes route at each intersection
    > Follows the graph alphabetically / numerically
    > Begins at the first letter / number
    > Finishes once all nodes have been visited
  10. 10What is Breadth-First Traversal in Graphs?> Type of traversal that visits all neighbouring nodes
    > Visits the first visited node after all neighbouring nodes, then repeats the process
    > Follows the graph alphabetically / numerically
    > Begins at the first letter / number
    > Finishes once all nodes have been visited
  11. 11What are some Examples of Graphs being Used?> Computer networks - nodes being computers, weighted edges being the bandwidth
    > Roads between towns, with weighted edges representing distance, journey time, fares etc.
    > Tasks in a project, some of which have to be completed before others
    > Webpages and links

Informações

Descrição
A level Computer Science (Data Structures) FlashCards sobre Graphs | Data Structures - OCR Computer Science A Level, criado por Malachy Moran-Tun em 11-10-2021.
Visualizações
5
Histórico
  • Criado por Malachy Moran-Tun · 6 out 2021
  • Copiado por Malachy Moran-Tun · 11 out 2021
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?