Introduction to Graphs: Vertices, Edges, and Applications in Data Structures Cartes | Quizlet

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/414

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

415 Terms

1
New cards

Graph

A data structure for representing connections among items, consisting of vertices connected by edges.

<p>A data structure for representing connections among items, consisting of vertices connected by edges.</p>
2
New cards

Vertex

Represents an item in a graph.

3
New cards

Edge

Represents a connection between two vertices in a graph.

4
New cards

Adjacency

Two vertices are adjacent if connected by an edge.

5
New cards

Path

A sequence of edges leading from a source (starting) vertex to a destination (ending) vertex.

6
New cards

Path Length

The number of edges in the path.

7
New cards

Distance

The number of edges on the shortest path between two vertices.

8
New cards

Number of Vertices (V)

The total count of vertices in a graph.

9
New cards

Number of Edges (E)

The total count of edges in a graph.

10
New cards

Maximum Number of Edges

Given 4 vertices A, B, C, and D and at most one edge between a vertex pair, the maximum number of edges is 6.

11
New cards

Computer Network Graph

A graph that represents connections among computers and servers.

12
New cards

Social Network Graph

A graph that represents friendships among people.

13
New cards

Example of Vertices in a Computer Network

PC1, PC2, Server1, Server2, and Server3.

14
New cards

Example of Edges in a Computer Network

Connections include PC1 to Server1, PC1 to Server2, Server1 to Server2, Server1 to Server3, Server2 to PC2, and Server3 to PC2.

15
New cards

Friendship in Social Network

Raj and Maya are friends, but Raj and Jen are not.

16
New cards

Can a Vertex Have More Than One Edge?

Yes.

17
New cards

Can an Edge Connect More Than Two Vertices?

No.

18
New cards

Are Maya and Thuy Friends?

No.

19
New cards

Computer Network Graph Vertices Count

5

20
New cards

Computer Network Graph Edges Count

6

21
New cards

Shortest Path from PC1 to PC2

e2, e5.

22
New cards

Distance from PC1 to PC2

2

23
New cards

Adjacent Vertices

Two vertices are adjacent if connected by an edge.

24
New cards

Vertex Distance

Vertex distance is the length of the shortest path.

25
New cards

Shortest Path

The shortest path from PC1 to PC2 is e2, e5.

26
New cards

Graph Representation

Graphs are often used to represent a geographic map, which can contain information about places and travel routes.

27
New cards

Vertices in Graphs

Vertices in a graph can represent airports, with edges representing available flights.

28
New cards

Edge Weights

Edge weights in such graphs often represent the length of a travel route, either in total distance or expected time taken to navigate the route.

29
New cards

Travel Time Assignment

A map service with access to real-time traffic information can assign travel times to road segments.

30
New cards

Driving Directions

Driving directions use graphs and shortest path algorithms to determine the best route from start to destination.

31
New cards

Total Travel Time

Total travel time = 28 min.

32
New cards

Graph Edges and Vertices

Each street is a graph edge and each intersection a vertex.

33
New cards

Graph Example

A Street, B Street, C Street, 4th Street, Diagonal Street, House Road, 3rd Street, 2nd Street, 1st Street, and an unlabeled street connecting 1st Street to the Beach.

34
New cards

Path from B to G

Which of the following is a path from B to G? e3, e7; e1, e3, e7; No path from B to G.

35
New cards

Distance from D to C

What is the distance from D to C? 3, 4, 5.

36
New cards

PC1 and Server1

PC1 and Server1 are adjacent.

37
New cards

PC1 and Server3

PC1 and Server3 are not adjacent.

38
New cards

Vertices

House, Beach, Intersection of 4th Street and A Street, Intersection of Diagonal and A Street, Intersection of 2nd Street and A Street, Intersection of 1st Street and A Street, Intersection of Diagonal Street and B Street, Intersection of 3rd Street and B Street, Intersection of 2nd Street and B Street, Intersection of 1st Street and B Street, Intersection of Diagonal Street and C Street, Intersection of House Road and C Street, Intersection of 3rd Street and C Street, Intersection of 2nd Street and C Street, intersection of 1st street and the road to the beach.

39
New cards

Travel Time

Sections of roads between vertices have weights labeled as travel time, in minutes.

40
New cards

5 min

Travel time from intersection of 2nd Street and A Street to intersection of 1st Street and A Street.

41
New cards

9 min

Travel time from intersection of 4th Street and A Street to intersection of Diagonal Street and A Street.

42
New cards

10 min

Travel time from intersection of Diagonal Street and A Street to intersection of 2nd Street and A Street.

43
New cards

2 min

Travel time from intersection of 3rd Street and B Street to intersection of 2nd Street and B Street.

44
New cards

7 min

Travel time from intersection of 2nd Street and A Street to intersection of 2nd Street and B Street.

45
New cards

6 min

Travel time from intersection of Diagonal Street and B Street to intersection of Diagonal Street and C Street.

46
New cards

3 min

Travel time from intersection of 3rd Street and B Street to intersection of 3rd Street and C Street.

47
New cards

4 min

Travel time from intersection of 2nd Street and B Street to intersection of 1st Street and B Street.

48
New cards

1 min

Travel time from intersection of House Road and C Street to the house itself.

49
New cards

Road Map Representation

A road map can be represented by a graph. Each intersection of roads is a vertex. Destinations like the beach or a house are also vertices.

50
New cards

Edges

Roads between vertices are edges.

51
New cards

True/False Statement 1

The longer a street is, the more vertices will be needed to represent that street.

52
New cards

True/False Statement 2

When using the physical distance between vertices as edge weights, a shortest path algorithm finds the fastest route of travel.

53
New cards

True/False Statement 3

Navigation software would have no need to place a vertex on a road in a location where the road does not intersect any other roads.

54
New cards

True/False Statement 4

If navigation software uses GPS to automatically determine the start location for a route, the vertex closest to the GPS coordinates can be used as the starting vertex.

55
New cards

Flight delays

Factors that may change the weight of an edge connecting two airport vertices.

56
New cards

Weather conditions

Factors that may change the weight of an edge connecting two airport vertices.

57
New cards

Flight cost

Factors that may change the weight of an edge connecting two airport vertices.

58
New cards

Graph of product relationships

Can be used to produce recommendations based on purchase history.

59
New cards

Game console

A product purchased by a customer that is represented in the graph.

60
New cards

Dishwashing soap

A product purchased by a customer that is represented in the graph.

61
New cards

Television 1

A product purchased by a customer that is represented in the graph.

62
New cards

Television 2

A product purchased by a customer that is represented in the graph.

63
New cards

Game console game 1

A product to recommend to the customer.

64
New cards

Game console game 2

A product to recommend to the customer.

65
New cards

Game console game 3

A product to recommend to the customer.

66
New cards

Tablet computer

A product purchased by a customer that is represented in the graph.

67
New cards

Blender

A product purchased by a customer that is represented in the graph.

68
New cards

Kitchen towels

A product purchased by a customer that is represented in the graph.

69
New cards

Oven mitts

A product purchased by a customer that is represented in the graph.

70
New cards

Muffin pan

A product purchased by a customer that is represented in the graph.

71
New cards

Muffin mix

A product purchased by a customer that is represented in the graph.

72
New cards

Secondary recommendations

Include all products adjacent to recommended products.

73
New cards

Product recommendations

Based on the customer's purchase history.

74
New cards

Largest number of recommendations

Produced by purchasing a game console.

75
New cards

Professional network graph

A graph where edges commonly represent business conducted between people.

76
New cards

Adjacency list

A common approach for representing a graph where each vertex has a list of adjacent vertices.

77
New cards

Graph with 14 vertices and 17 edges

A specific graph representation that includes 14 vertices and 17 edges.

78
New cards

Graph with 14 vertices and 16 edges

A specific graph representation that includes 14 vertices and 16 edges.

79
New cards

Business connection

A relationship represented by an edge in a professional network graph.

80
New cards

Participation Activity 9.2.6

Professional networks represented by graphs help people establish business connections.

81
New cards

Participation Activity 9.2.7

Refers to the animation's graph representing the professional network.

82
New cards

Who has conducted business with Eusebio?

Giovanna, Manuel, Keira.

83
New cards

Best person to introduce Octavio to Wilford

Shayla, Natasha, Manuel, Rita.

84
New cards

Length of the shortest path between Salvatore and Reva

5, 6, 7.

85
New cards

Graph with four vertices

A graph that includes vertices A, B, C, and D.

86
New cards

Edges in a graph with four vertices

A to B, A to C, B to C, and B to D.

87
New cards

Step 1 in professional network graph

Vertices represent people and edges represent a business connection.

88
New cards

Step 2 in professional network graph

Tuyet conducts business with Wilford, adding a new edge in the graph.

89
New cards

Step 3 in professional network graph

The graph can help professionals find new connections.

90
New cards

Static figure of a graph

A visual representation of a graph showing vertices and edges.

91
New cards

Vertices in the graph

Rita, Octavio, Reva, Wilford, Manuel, Tuyet, Shayla, Cyrus, Eusebio, Keira, Giovanna, Salvatore, Bruno, and Alona.

92
New cards

Edges in the graph

Connections between vertices that represent relationships.

93
New cards

Mutual contact

A person who connects two others in a network.

94
New cards

Sparse Graph

A graph that has far fewer edges than the maximum possible.

95
New cards

O(V + E)

The size of an adjacency list graph representation, where V is the number of vertices and E is the number of edges.

96
New cards

Adjacency Matrix

A representation of a graph where each vertex is assigned to a matrix row and column, with a matrix element of 1 if there is an edge between the vertices.

97
New cards

Direct Bus Route

A bus route that connects two locations directly without any stops.

98
New cards

Minimum Number of Buses

The least number of buses required to travel between two locations.

99
New cards

Graph Data Structure

A data structure that consists of a set of vertices and edges.

100
New cards

Matrix Element

An entry in a matrix that indicates the relationship between two vertices.