Discrete Math 1019 Final Exam

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/104

flashcard set

Earn XP

Description and Tags

Discrete Math 1019 with Albi Kazazi. York University, Summer 2026. 10.1-11.1

Last updated 11:01 PM on 7/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

105 Terms

1
New cards

What is a graph?

A graph G = (V, E) consists of V—a nonempty set of vertices, and E—a set of edges. Each edge has one or two vertices associated with it, called its endpoints.

2
New cards
<p>What are V and E for the following graph?</p>

What are V and E for the following graph?

V = {a, b, c, d, e}

E = {{a, b}, {a, c}, {b, c}, {b, d}, {c, d}}

3
New cards

True or False: the edge {a, b} is the same as the edge {b, a}

True. The { implies that it is an undirected graph, meaning the order of the vertices does not matter.

4
New cards

What is a simple graph?

A graph in which each edge connects two different vertices(no loops), and no two edges connect the same pair of vertices(no duplicate edges)

5
New cards

True or False: any edge {a, b} in a simple graph is a two-element subset of V.

True.

ex: {a, b} ⊆ {a, b, c, d, e}

<p>True. </p><p>ex: {a, b} <span>⊆ {a, b, c, d, e}</span></p>
6
New cards

True or False: in a simple graph, edges relate vertices symmetrically

True. If an edge {a, b} exists, then a is related to b through that edge, and b is related to a through that edge. Unless a graph is directed, it is symmetric.

7
New cards

What is a multigraph?

A graph in which multiple edges between the same pair of vertices are allowed. Loops, however, are still not allowed.

8
New cards

What is a pseudograph?

A graph in which multiple edges between the same pair of vertices, as well as loops, are allowed.

9
New cards

What is a directed graph?

A graph with directed edges which can be represented as ordered pairs (u, v) of vertices. An edge (u, v) starts at u and ends at v. Directions of edges are represented with arrows.

<p>A graph with directed edges which can be represented as ordered pairs (u, v) of vertices. An edge (u, v) starts at u and ends at v. Directions of edges are represented with arrows.</p>
10
New cards

What are the two types of directed graphs?

Simple directed graph: a directed graph that does not allow loops or repeated directed edges

Directed multigraph: repeated directed edges are allowed, as well as loops.

11
New cards

True or False: the edges (u, v) and (v, u) are the same

False. The ( implies that the graph is directed, and edges are ordered.

12
New cards
<p>What is the m of (u, v) for the following graph?</p>

What is the m of (u, v) for the following graph?

The multiplicity m for the edge (u, v) is 2, as there are 2 edges (u, v) in this graph.

13
New cards

True or False: a relation R on a set V is best represented by a directed graph on V

True

14
New cards

When an edge (u, v) exists in a graph G, what can we say u is to v and vice versa? What terms can we give u and v?

u is adjacent to v, and v is adjacent from u.

u is the initial vertex of (u, v), and v is the terminal vertex.

15
New cards

What is a mixed graph?

A graph with both directed and undirected edges. They allow loops and duplicate edges.

16
New cards

Which of the following types of graphs allow duplicate edges? Which allow loops?

Simple graph

Multigraph

Pseudograph

Simple directed graph

Directed multigraph

Mixed graph

Simple graph —→ neither

Multigraph —→ only duplicate edges

Pseudograph —→ both

Simple directed graph —→ neither

Directed multigraph —→ both

Mixed graph —→ both

17
New cards

What type of graph would you use to represent acquaintanceships?

Undirected and simple.

Undirected because acquaintanceship is symmetric (if person a has met person b, then person b has met person a).

Simple because it is assumed that a person has met themself(so no loops necessary), and duplicate edges would not make sense in this scenario(if you have met someone once, you are acquainted… no need for multiple edges)

<p>Undirected and simple.</p><p>Undirected because acquaintanceship is symmetric (if person a has met person b, then person b has met person a). </p><p>Simple because it is assumed that a person has met themself(so no loops necessary), and duplicate edges would not make sense in this scenario(if you have met someone once, you are acquainted… no need for multiple edges)</p>
18
New cards

What type of graph would you use to represent websites, where an edge shows if one website links to another?

Directed, simple graph.

Directed because linking is not symmetric (if website a links to website b, that does not imply that b links to a)

Simple because a website would not link back to itself(so no loops necessary), and duplicate edges would not make sense in this scenario(we don’t care about the number of times website a links to website b)

<p>Directed, simple graph.</p><p>Directed because linking is not symmetric (if website a links to website b, that does not imply that b links to a)</p><p>Simple because a website would not link back to itself(so no loops necessary), and duplicate edges would not make sense in this scenario(we don’t care about the number of times website a links to website b)</p>
19
New cards

Let G be a simple graph G = (V, E). Consider the relation R on V where uRv if and only if there is an edge {u, v}.

Is R reflexive? Is R symmetric?

Reflexive: No. A simple graph does not allow loops, so an edge {u, u} will never exist, and thus u will never be related to u through R.

Symmetric: Yes. If uRv, then there exists an edge {u, v}. The edge {u, v} is the same as the edge {v, u}. If an edge {v, u} exists, then vRu. So, whenever uRv, vRu.

20
New cards

What does it mean for two vertices u and v to be adjacent? What is a synonym for adjacent?

Vertices u and v are adjacent if an edge {u, v} exists. In other words, if u and v share an edge, they are adjacent.

Neighbors is a synonym for adjacent.

21
New cards

What does it mean for an edge to be incident on a vertex?

An edge is incident on a vertex v if it touches v. In other words, if v is an endpoint of the edge, then that edge is incident on v.

22
New cards
<p>True or False: the edge e is incident on u in the following image</p>

True or False: the edge e is incident on u in the following image

True. u is an endpoint of the edge e.

23
New cards
<p>True or False: the edge e is incident on u in the following image</p>

True or False: the edge e is incident on u in the following image

False. u is not an endpoint of the edge e.

24
New cards
<p>Which vertices are adjacent in the following image? Which are not?</p>

Which vertices are adjacent in the following image? Which are not?

v and u are adjacent, v and w are adjacent.

u and w are not adjacent.

25
New cards

What is the neighborhood of a vertex v? How can it be denoted?

The neighborhood of a vertex v is all of the vertices that are adjacent to v(all of the vertices sharing an edge with v)

It can be denoted by N(v) = {u ∈ V: u is adjacent to v}

26
New cards

What is the neighborhood of a set A⊆V? How can it be denoted?

The neighborhood of a set A⊆V is the union of the neighborhoods of each vertex in A. In other words, all of the vertices that share an edge with a vertex in A.

It can be denoted by N(A) = ᵥ∈ᴀ N(v) —→ neighborhood of A = the union of N(v) for each v in A.

27
New cards
<p>What is the neighborhood of vertex v in the following image?</p>

What is the neighborhood of vertex v in the following image?

N(v) = {a, b, c}

28
New cards
<p>What is the neighborhood of A in the following image if A = {a, b, c}?</p>

What is the neighborhood of A in the following image if A = {a, b, c}?

N(A) = N(a) ⋃ N(b) ⋃ N(c) = {v} ⋃ {v} ⋃ {v, d} = {v, d}

29
New cards

What is the degree of a vertex? How is it denoted?

The degree of a vertex v is the number of edges incident with v(the number of edges touching v). Loops are counted twice.

The degree of a vertex v is denoted as deg(v)

30
New cards

What do we call a vertex of degree 1? What do we call a vertex of degree 0?

Degree 1: leaf or pendant

Degree 0: isolated

31
New cards
<p>What is the degree of each vertex in the following graph? Which vertices are pendant/leaves? Which vertices are isolated?</p>

What is the degree of each vertex in the following graph? Which vertices are pendant/leaves? Which vertices are isolated?

deg(a) = 2

deg(b) = 3

deg(c) = 3

deg(d) = 1 —→ pendant/leaf

deg(e) = 4

deg(f) = 1 —→ pendant/leaf

deg(g) = 0 —→ isolated

32
New cards
<p>What is the degree of the vertex c in the following graph?</p>

What is the degree of the vertex c in the following graph?

5 (loops count twice)

33
New cards

What is the Handshaking Lemma?

The Handshaking Lemma is the statement that, in an undirected graph with m edges, the sum of the degrees of each of the vertices is equal to 2m.

<p>The Handshaking Lemma is the statement that, in an undirected graph with m edges, the sum of the degrees of each of the vertices is equal to 2m.</p>
34
New cards

True or False: the Handshaking Lemma does not work for loops or multiple edges

False. The Handshaking Lemma works even if multiple edges or loops are present.

35
New cards

If a graph has 10 vertices, each of degree 6, how many edges does that graph have?

The sum of the degrees would be 60, as 10 vertices x 6 degrees is 60.

Because of the Handshaking Lemma, we know that the sum of the degrees is equal to two times the number of edges. So, 60 = 2m.

If 60 = 2m, we can divide both sides by 2 and get m = 30.

36
New cards

What is true about the number of vertices of odd degree in an undirected graph?

In an undirected graph, there is always an even number of vertices of odd degree.

37
New cards

Prove that, in an undirected graph, there is always an even number of vertices of odd degree

We can prove this by splitting the vertices into two groups: the vertices of even degree: Vₑ, and the vertices of odd degree Vₒ.

By the Handshaking lemma, the sum of the degrees of Vₑ + the sum of degrees of Vₒ = 2m.

2m is obviously an even number(2 times any integer is even), and the sum of degrees of Vₑ is obviously even(even + even = even). This means that the sum of degrees of Vₒ must also be even, because it is impossible for an even number + an odd number to equal an even number.

If the sum of degrees of Vₒ is even, but the degrees themselves are odd, that must mean that the number of vertices in Vₒ is even(as an odd number of odd vertices would lead to an odd number).

38
New cards

At a party with 7 people, is it possible that every person shakes hands with exactly 3 others?

No. This would create a graph with 7 vertices of odd degree, which is impossible.

39
New cards

What are the two degrees of a vertex in a directed graph? How is each denoted?

In a directed graph, each vertex has two degrees:

The in-degree (denoted deg⁻(v)), which is the number of edges ending at v.

The out-degree (denoted deg⁺(v)), which is the number of edges starting at v.

40
New cards
<p>What are the in and out degrees of each vertex in the following graph?</p>

What are the in and out degrees of each vertex in the following graph?

deg⁻(a) = 0 deg⁺(a) = 2

deg⁻(b) = 2 deg⁺(b) = 2

deg⁻(c) = 2 deg⁺(c) = 0

41
New cards

What is true about the number of edges in a directed graph?

It is equal to the sum of the in-degrees of each vertex, as well as the sum of the out-degrees of each vertex.

<p>It is equal to the sum of the in-degrees of each vertex, as well as the sum of the out-degrees of each vertex.</p>
42
New cards

What is the family Kₙ?

A graph Kₙ is a complete graph. It is a simple graph of n vertices, with an edge existing between every pair of vertices.

<p>A graph Kₙ is a complete graph. It is a simple graph of n vertices, with an edge existing between every pair of vertices.</p>
43
New cards

How many edges are in the graph Kₙ?

Each vertex in Kₙ has degree n - 1 (connected to every other vertex but itself). That means we have n vertices of degree n - 1.

So, by the Handshaking Lemma, n(n - 1) = 2m. Equivalently,

m = (n(n-1))/2

44
New cards

How many edges are in the graph K₆?

6 edges of degree 5 —→ m = (6(5))/2 = 15

45
New cards

What is the family Cₙ?

A graph Cₙ is a cycle with n vertices. A graph Cₙ can not exist if n is less than 3. It is a path where the first vertex connects to the last.

<p>A graph Cₙ is a cycle with n vertices. A graph Cₙ can not exist if n is less than 3. It is a path where the first vertex connects to the last.</p>
46
New cards

How many edges are in the graph Cₙ?

A graph Cₙ has n edges of degree 2.

So, by the Handshaking Lemma, 2n = 2m. Equivalently,

m = n

47
New cards

How many edges are in the graph C₆?

6 vertices of degree 2 —→ m = (6×2)/2 = 6

48
New cards

What is the family Wₙ?

The wheel Wₙ is obtained from Cₙ by adding one vertex(the hub) adjacent to all n cycle vertices. This means that Wₙ has n + 1 vertices.

<p>The wheel Wₙ is obtained from Cₙ by adding one vertex(the hub) adjacent to all n cycle vertices. This means that Wₙ has n + 1 vertices.</p>
49
New cards

How many edges does the graph Wₙ have?

The graph Wₙ has n vertices of degree 3 (2 from the cycle, and one connected to the hub), and one vertex of degree n.

This means that the sum of degrees of Wₙ is (n*3) + n, or 4n.

So, by the Handshaking Lemma, 4n = 2m. Equivalently,

m = 2n

50
New cards

How many edges are in the graph W₆?

6 vertices of degree 3 + 1 vertex of degree 6 —→ m = (4×6)/2 = 12

51
New cards

What is the family Qₙ?

The hypercube Qₙ is a graph in which each vertex represents a bit string of length n. Two vertices are adjacent if and only if they differ in exactly one bit.

<p>The hypercube Qₙ is a graph in which each vertex represents a bit string of length n. Two vertices are adjacent if and only if they differ in exactly one bit. </p>
52
New cards

Construct the graph Q₂

knowt flashcard image
53
New cards

How many edges are in the graph Qₙ?

The number of vertices in n is equal to 2ⁿ (there are 2ⁿ bit strings of length n), and every vertex has degree n(for a bit string of length n, there are n different bits to disagree on).

This means that the sum of degrees of Qₙ is 2ⁿ*n.

So, by the Handshaking Lemma, 2m = 2ⁿ*n. Equivalently,

m = (2ⁿ*n)/2 = n*2ⁿ⁻¹

54
New cards

How many edges are in the graph Q₃?

2³ = 8 vertices of degree 3 —→ m = (8×3)/2 = 12

55
New cards

How can Qₙ₊₁ be created from Qₙ?

Create two copies of Qₙ, and put an 0 at the end of each string in one copy, and a 1 at the end of each string in the other. Then, add edges that connect two vertices between the two that only differ in one bit.

56
New cards

What is a bipartite graph?

A graph G is bipartite if V can be split into two groups: V₁, and V₂, where no vertices of V₁ exist in V₂ and vice versa(V₁⋃V₂ = V and V₁⋂V₂ = ∅)

AND every edge joins a vertex of V₁ to a vertex of V₂(no edges join V₁ with V₁, or V₂ with V₂).

57
New cards

What is an easy way we can determine whether or not a graph is bipartite?

A graph is bipartite if and only if its vertices can be coloured with two colours, such that no edge joins two vertices of the same colour.

<p>A graph is bipartite if and only if its vertices can be coloured with two colours, such that no edge joins two vertices of the same colour.</p>
58
New cards
<p>Which of the following graphs are bipartite?</p>

Which of the following graphs are bipartite?

B and D (A and C contain triangles, meaning they need at least 3 colours).

59
New cards

What is the family Kₘₙ?

A graph Kₘₙ is a complete bipartite graph with one set of vertices V₁ of size m, and a second set of vertices V₂ of size n. Every vertex of V₁ is connected to every vertex of V₂, and vice versa. Tr

No edges connect vertices of V₁ with V₁, or V₂ with V₂.

<p>A graph Kₘₙ is a complete bipartite graph with one set of vertices V₁ of size m, and a second set of vertices V₂ of size n. Every vertex of V₁ is connected to every vertex of V₂, and vice versa. Tr</p><p>No edges connect vertices of V₁ with V₁, or V₂ with V₂.</p>
60
New cards

How many edges are in the graph Kₘₙ?

There are m edges of degree n, and n edges of degree m.

This means that the sum of degrees of Kₘₙ is 2mn.

By the Handshaking Lemma, 2m = 2mn. Equivalently,

m = mn

61
New cards

How many edges are in the graph K₂₃?

2 vertices of degree 3 + 3 vertices of degree 2 —→ m = (2(2×3))/2 = 6

62
New cards

What is a matching? What is a complete matching?

A matching M in a graph is a set of edges {u, v} wherein no two edges share a vertex (ex: {{u, v}, {w, z}})

A complete matching from V₁, to V₂ is a matching in which every vertex of V₁ is matched. These occur in bipartite graphs.

<p>A matching M in a graph is a set of edges {u, v} wherein no two edges share a vertex (ex: {{u, v}, {w, z}})</p><p>A complete matching from V₁, to V₂ is a matching in which every vertex of V₁ is matched. These occur in bipartite graphs.</p>
63
New cards

Is the following set a matching? {{a, b}, {c, d}, {e, b}}

No. b appears more than once

64
New cards

How can we figure out if a complete matching exists from sets V₁, to V₂?

In a bipartite graph, every subset S of V₁ must have a number of vertices less than or equal to the number of vertices in the neighborhood of S (in order for a complete matching to exist).

|N(S)| ≥ |S| for every subset S⊆V₁

65
New cards

What is a Subgraph? What is a proper subgraph?

A subgraph of a graph G = (V, E) is a graph H = (W, F) with a set of vertices which is a subset of V, and a set of edges that is a subset of E. (So, W⊆V and F⊆E)

A proper subgraph is a subgraph where G ≠ H

66
New cards

How can you denote a subgraph of G where an edge e has been removed?

G - e

67
New cards

Given a graph G = (V, E), what will the vertex and edge sets look like if you remove an edge e? What about if you remove a set of edges E’?

G - e = (V, E - {e}) —→ the set of vertices stays the same, and the edge e is subtracted from the set E.

G - E’ = (V, E = E’) —→ the set of vertices stays the same, and the set of edges E’ is subtracted from the set E.

68
New cards

How can you denote a subgraph of G where an edge e has been added?

G + e

69
New cards

Given a graph G = (V, E), what will the vertex and edge sets look like if you add an edge e?

G + e = (V, E⋃{e}) —→ the set of vertices stays the same, and the edge e is added to the set of edges.

70
New cards
<p>Given the following graph G, what would G - {v1, v2} look like? Is this a subgraph of G?</p>

Given the following graph G, what would G - {v1, v2} look like? Is this a subgraph of G?

This is a subgraph of G

<p>This is a subgraph of G</p>
71
New cards
<p>Given the following graph G, what would the graph G + {v1, v3} look like? Is this a subgraph of G?</p>

Given the following graph G, what would the graph G + {v1, v3} look like? Is this a subgraph of G?

This is not a subgraph of G

<p>This is not a subgraph of G</p>
72
New cards

Given a graph G = (V, E), what will the vertex and edge sets look like if you remove a vertex v? What about if you remove a set of vertices V’?

G - v = (V - {v}, E’) —→ the set of vertices minus v, and E’: the set of edges in G that are not incident to v(all of the edges from E that do not touch v)

G - V’ = (V - V’, E’) —→ the set of vertices minus the vertices in V’, and the set of edges in G that do not touch any vertices in V’.

73
New cards
<p>For the following graph, if W = {v1, v2, v3}, what is G[W]?</p>

For the following graph, if W = {v1, v2, v3}, what is G[W]?

A subgraph of G that keeps only the vertices in W, and the edges in G that have both endpoints in W.

<p>A subgraph of G that keeps only the vertices in W, and the edges in G that have both endpoints in W.</p>
74
New cards

What is the union of two graphs G₁ = (V₁, E₁) and G₂ = (V₂, E₂)?

G₁G₂ = (V₁⋃V₂, E₁⋃E₂) —→ the set of vertices+edges is the union of each graph’s set of vertices+edges. If any edges are shared between graphs, they appear only once in the new graph.

75
New cards
<p>What does the union of G₁ and G₂ look like?</p>

What does the union of G₁ and G₂ look like?

Since v2 and v3 are shared by both graphs, as well as their connecting edge {v2, v3}, they all appear only once in the union.

<p>Since v2 and v3 are shared by both graphs, as well as their connecting edge {v2, v3}, they all appear only once in the union.</p>
76
New cards
<p>What does G₁⋃G₂ look like if V₁ and V₂ are the same?</p>

What does G₁⋃G₂ look like if V₁ and V₂ are the same?

The vertex set is the same, and we take the union of the edge sets

<p>The vertex set is the same, and we take the union of the edge sets</p>
77
New cards
<p>What does G₁⋃G₂ look like if V₁ and V₂ have no vertices in common?</p>

What does G₁⋃G₂ look like if V₁ and V₂ have no vertices in common?

The new graph will be two connected components

<p>The new graph will be two connected components</p>
78
New cards

What is an edge contraction?

Contracting an edge {u, v} involves merging u and v into a single vertex w, and connecting w to every neighbor of u and v(with edges).

79
New cards

Given a graph G = (V, E), what will the vertex and edge sets look like if you contract an edge {u, v}?

V’ = (V - {u, v})⋃{w} —→ V without u and v, and an added vertex w

E’ = edges in E which are not connected to u or v, AND new edges connecting w to every neighbor of u and v.

80
New cards
<p>What would this graph look like if we contracted the edge {u, v}?</p>

What would this graph look like if we contracted the edge {u, v}?

knowt flashcard image
81
New cards
<p>What would this graph look like if we contracted the edge {v1, v2}?</p>

What would this graph look like if we contracted the edge {v1, v2}?

knowt flashcard image
82
New cards
<p>What would this graph look like if we contracted the edge {b, c}?</p>

What would this graph look like if we contracted the edge {b, c}?

contracted by replacing {b, c} with f

<p>contracted by replacing {b, c} with f</p>
83
New cards

What is an adjacency list? When are they useful?

A chart that lists the neighbors of each vertex. They are useful when the graph has few edges(sparse)

84
New cards
<p>Make an adjacency list for the following graph</p>

Make an adjacency list for the following graph

knowt flashcard image
85
New cards

How are adjacency lists made for directed graphs?

By listing the terminal vertices of each vertex

86
New cards
<p>Make an adjacency list for the following graph</p>

Make an adjacency list for the following graph

knowt flashcard image
87
New cards

What is an adjacency matrix?

The adjacency matrix of a graph is a grid with a slot for each combination of vertices. A 1 goes in this slot if those two vertices share an edge, and a 0 goes there if not.

88
New cards
<p>Make an adjacency matrix for the following graph</p>

Make an adjacency matrix for the following graph

<p></p>
89
New cards

True or False: adjacency matrixes are symmetric for undirected graphs

True. This can be observed in the following adjacency matrix, where the row and column for v1 are the same.

<p>True. This can be observed in the following adjacency matrix, where the row and column for v1 are the same.</p>
90
New cards
<p>Given the following adjacency matrix, what is the degree of v1?</p>

Given the following adjacency matrix, what is the degree of v1?

2. This is determined by adding up the 1s in the column or row of v1.

91
New cards
<p>Given the following adjacency matrix, how many edges are in this graph?</p>

Given the following adjacency matrix, how many edges are in this graph?

Adding up each column/row gives the degree of each vertex, so adding up all of the 1s in the matrix gives the sum of degrees of each vertex: 10. So, by the Handshaking Lemma, 2m = 10. Equivalently,

m = 5.

92
New cards

What do adjacency matrixes look like in multigraphs?

The number in each slot is the number of edges between the two vertices

93
New cards

What do adjacency matrixes look like in directed graphs?

In directed graphs, adjacency matrixes are no longer symmetric. The row sum of a vertex is the out-degree (deg⁺(v)), and the column sum of a vertex is the in-degree(deg⁻(v)).

94
New cards
<p>Make an adjacency matrix for the following graph</p>

Make an adjacency matrix for the following graph

knowt flashcard image
95
New cards
<p>Draw the graph represented by this adjacency matrix</p>

Draw the graph represented by this adjacency matrix

<p></p>
96
New cards

What are incidence matrices?

Charts that order vertices and edges, where their intersections have a 1 if that vertex is an endpoint of that edge, and a 0 if not.

97
New cards
<p>Give an incidence matrix for this graph</p>

Give an incidence matrix for this graph

knowt flashcard image
98
New cards

What makes two simple graphs G₁ and G₂ isomorphic?

G₁ and G₂ are isomorphic if there is a bijection V₁ → V₂. In other words, there is some function f that can be applied to an edge {u, v} in E₁ so that {f(u), f(v)} is in E₂

Essentially, if we can relabel the vertices in G₁ and preserve the adjacency of G₂, then the graphs are isometric.

99
New cards
<p>Are these graphs isomorphic? If so, give the bijection</p>

Are these graphs isomorphic? If so, give the bijection

u1—>v1

u2—→v2

u3—→v3

u4—→v4

<p>u1—&gt;v1</p><p>u2—→v2</p><p>u3—→v3</p><p>u4—→v4</p>
100
New cards

What are the steps in checking isomorphism?

First, check degrees(a degree-3 vertex can only map to a degree-3 vertex)

Then, check adjacencies.