Module 5 Flashcards

1
Q
  • MATHEMATICAL STRUCTURE THAT REPRESENTS RELATIONSHIPS BETWEEN PAIRS OF OBJECTS.
  • DENOTED AS G = (V, E),
    o VERTICES (V): A FINITE SET OF DISTINCT POINTS REPRESENTING ENTITIES.
    o EDGES (E): A SET OF PAIRS OF VERTICES, INDICATING RELATIONSHIPS
A

Graphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Different Kinds of Graphs

A

Undirected Graphs
Complete Undirected Graphs
Directed Graphs (Disgraphs)
Completed Directed Graphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • IN AN ___________, EDGES DO NOT HAVE A DIRECTION ASSOCIATED WITH THEM.
A

Undirected Graphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • A ______________ IS ONE WHERE EVERY PAIR OF DISTINCT VERTICES IS CONNECTED BY AN EDGE.
A

Complete Undirected Graphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • IN A _______, EDGES HAVE A DIRECTION ASSOCIATED WITH THEM.
A

Directed Graphs (Disgraphs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • A ___________ HAS EVERY PAIR OF DISTINCT VERTICES CONNECTED BY TWO EDGES—ONE IN EACH DIRECTION
A

Completed Directed Graphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Graph Terminologies

A

Subgraphs
Path and Connectivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • IT CONSISTS OF SELECTED VERTICES AND EDGES FROM THE ORIGINAL GRAPH.
A

Subgraphs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  • Path
    o A SEQUENCE OF VERTICES CONNECTED BY EDGES FROM A STARTING VERTEX TO AN ENDING VERTEX.
  • Simple Path
    o A PATH WHERE ALL VERTICES ARE DISTINCT.
  • Simple Cycle
    o A SIMPLE PATH THAT FORMS A CLOSED LOOP, BEGINNING AND ENDING AT THE SAME VERTEX.
  • Connectivity
    o TWO VERTICES ARE CONNECTED IF THERE EXISTS A PATH BETWEEN THEM
A

Path and Connectivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

o A SEQUENCE OF VERTICES CONNECTED BY EDGES FROM A STARTING VERTEX TO AN ENDING VERTEX

A

Path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

o A PATH WHERE ALL VERTICES ARE DISTINCT.

A

Simple Path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

o A SIMPLE PATH THAT FORMS A CLOSED LOOP, BEGINNING AND ENDING AT THE SAME VERTEX.

A

Simple Cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

o TWO VERTICES ARE CONNECTED IF THERE EXISTS A PATH BETWEEN THEM

A

Connectivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Advanced Concepts

A

Weighted Concepts
Spanning Trees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  • REFERS TO THE PROCESS OF VISITING ALL VERTICES AND EDGES OF A GRAPH SYSTEMATICALLY TO PERFORM SPECIFIC OPERATIONS OR SEARCHES.
A

Graph Traversals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  • BEGIN AT A CHOSEN START VERTEX AND EXPLORE AS DEEPLY AS POSSIBLE ALONG EACH BRANCH BEFORE BACKTRACKING.
    o DEEP EXPLORATION: FOCUSES ON DIVING DEEPLY INTO THE GRAPH’S STRUCTURE, BEFORE BACKTRACKING.
    o STACK-BASED BACKTRACKING: USES A STACK OR RECURSION
    o TO TRACK AND BACKTRACK FROM DEAD-END PATHS.
A

Depth First Search (DFS)

17
Q
  • BEGIN AT A CHOSEN START VERTEX AND EXPLORE ALL ITS NEIGHBORS BEFORE MOVING ON TO THE NEXT LEVEL OF NEIGHBORS.
  • Characteristic of BFS
    o LAYER-BY-LAYER EXPLORATION: FOCUSES ON EXPLORING ALL NEIGHBORS OF A VERTEX BEFORE MOVING ON TO THE NEXT
    o QUEUE-BASED TRAVERSAL: USES A QUEUE TO MAINTAIN ORDER AND PRIORITIZE VISITING NEIGHBORS BEFORE DEEPER EXPLORATION.
A

Breadth First Search(BFS)

18
Q

SUITABLE FOR EXPLORING DEEPER PATHS

A

Depth First Search (DFS)

19
Q

IDEAL FOR SHORTEST PATH FINDING

A

Breadth First Search(BFS)

20
Q
  • CHOOSE AN INITIAL VERTEX AND PLACE IT IN U.
  • SELECT THE VERTEX CONNECTED TO U BY THE LOWEST-COST EDGE AND ADD IT TO U AND ITS CORRESPONDING EDGE TO T.
  • REPEAT STEP 2 UNTIL U INCLUDES ALL VERTICES (U = V), CREATING THE MST.
A

Prim’s Algorithm

21
Q
  • START WITH THE EDGE OF LEAST COST AS THE INITIAL EDGE IN T.
  • CONSIDER EDGES IN NON-DECREASING ORDER OF COST.
  • INCLUDE AN EDGE IF IT DOESN’T CREATE A CYCLE IN T; REJECT OTHERWISE.
  • EMPHASIZE THE SIGNIFICANCE OF SORTING EDGES IN NON-DECREASING ORDER FOR COMPUTATIONAL EFFICIENCY.
A

Kruskal Algorithm

22
Q
  • ASSIGNS VERTICES TO DIFFERENT CLASSES BASED ON THEIR CALCULATED SHORTEST DISTANCES FROM THE SOURCE.
  • ITERATIVELY DETERMINES THE SHORTEST PATH FROM A SINGLE SOURCE VERTEX TO ALL OTHER VERTICES.
A

Dijkstra Algorithm

23
Q
  • COMPUTES THE SHORTEST PATHS BETWEEN ALL PAIRS OF VERTICES IN A WEIGHTED GRAPH.
  • STEPS OF ______
    o INITIALIZATION OF MATRICES A AND PATH.
    o ITERATIVE COMPUTATION OF SHORTEST PATHS USING INTERMEDIATE VERTICES
A

Floyds Algorithm

24
Q
A