Discrete 2 Midterm 3

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/77

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.

78 Terms

1
New cards

Graph

A ___ is a non-empty set of vertices and edges connecting vertices. A ____G is with a set of vertices V and edges G, denotes as G(V,E)

where

  • V = {V1,V2, V3…Vn}

  • E = {e1,e2,e3…en}

2
New cards

End Vertices

2 vertices V1 and V2 are _____ of edge e1.

3
New cards

Parallel

edges that have the same end vertices are _____.

4
New cards

Loop

an edge of the form (V,V) is a ____.

5
New cards

Simple

A graph without any Parallel edges or loop is called ____ .

6
New cards

Empty

A graph with no edges is called ____.

7
New cards

Null

A graph with no vertices is a ____.

8
New cards

Trivial

A graph with only one vertices is ____.

9
New cards

Adjacent

Edges are ____, if they share a common end vertex. 2 vertices U and V are ____, if they’re connected by a edge.

10
New cards

Degree of a Vertex

The ____ written as d(V) is the number of edges with V as an end vertex. By convention; we count loop twice.

11
New cards

Pendant Vertex

A ___ is a vertex with a degree 1.

12
New cards

Isolated Vertex

An ___ is a vertex whose degree is 0.

13
New cards

Pendant Edge

An edge that has a pendant vertex as a end point, is a _____.

14
New cards

Max Degree

The minimum degree of the vertices in a graph G is denotes as S(G) and the _____ denoted as Δ(G).

15
New cards

Handshaking Theorem

In any undirected graph, the sum of the degrees of all the vertices is equal to twice the number of edges.

Imagine a room of people shaking __ :

  • Each ___ involves two people

  • So if there are 10 , there are 20 _involved

  • Similarly, each edge contributes 2 to the total degree count (1 per vertex)

<p>In any undirected graph, the sum of the degrees of all the vertices is equal to twice the number of edges.</p><p>Imagine a room of people shaking __ :</p><ul><li><p class="">Each ___ involves <strong>two people</strong></p></li><li><p class="">So if there are 10 <strong> , there are 20 </strong>_<strong>involved</strong></p></li><li><p class="">Similarly, each <strong>edge</strong> contributes <strong>2</strong> to the total degree count (1 per vertex)</p></li></ul><p></p>
16
New cards

When does Handshaking Theorem not apply:

In a graph with an odd number of vertices with odd degree, the ____ is violated

17
New cards

Subgraph

A graph Gi = (Vi,Ei) is a ____of G (V,E) if:

  • Vi ⊆ V

  • Ei ⊆ E, and each edge in Ei has the same endpoints in G

  • So: A ___ just carves out part of the original graph - it doesn’t modify connections.

18
New cards

Bipartite Graph

A graph is ____if its vertex set V can be partitioned into 2 disjoint sets V1 and V2 such that

  1. V = V1 ∪ V2

  2. Every edge connects a vertex from V1 to a vertex from V2

  3. So: No edge connects vertices within the same part

  4. A graph is _____if and only if it has no odd-length cycle

19
New cards

Complete Bipartite Graph

Denoted by Km,n

Every vertex in V1 is connected to every vertex in V2

Number of edges = m x n

K3,4 : 3 vertices on left, 4 on right, all cross-connected

20
New cards
<p>Cycle Graph </p>

Cycle Graph

A graph with n >= 3 vertices, each of degree 2

All vertices form a closed loop

21
New cards
<p>Wheel Graph </p>

Wheel Graph

Formed by adding a center vertex to a cycle Cn-1

That new vertex connects to all vertices of the cycle.

step 1: take Cx step 2: add a vertex to Cx step 3: connect all vertices

22
New cards
<p>Complementary Graph (or Graph Complement)</p>

Complementary Graph (or Graph Complement)

The ___ (G with a overline) of a simple graph G has the same vertices as G.

2 vertices are adjacent in (G with a overline) if and only if they are not adjacent in G.

23
New cards

Complete Graph

The __ with n vertices; K is a graph contains all possible edges between every pair of its vertices.

24
New cards

Adjacent paths are different colors means its bipartite graph.

knowt flashcard image

<img src="https://knowt-user-attachments.s3.amazonaws.com/3c88daeb-e452-4eb7-b7c1-8d6d94ec17e7.png" data-width="75%" data-align="center" alt="knowt flashcard image"><p></p>
25
New cards

Walk

A sequence of vertices and edges that helps us to travel from initial vertex a vertex to any other vertices (terminal vertex) in a graph (can repeat both)

26
New cards

Trail

A walk with no repeated edges

27
New cards

Path

A walk with no repeated vertices

28
New cards

Closed Walk

A walk that starts and ends at the same vertex

29
New cards

Closed Trail

a _____ that starts and ends at the same vertex - a circuit

30
New cards

Closed Path

a ____ that starts and ends at the same vertex - a cycle

31
New cards

Circuitless Graph

A graph is ___ exactly when there are no loops and there is at most 1 (one) path between any 2 given vertices.

32
New cards

Connected Graph

Every pair of vertices is connected by a path

33
New cards

Disconnected Graph

At least one pain of vertices has no connecting path

34
New cards

Cut Vertex

A vertex whose removal increases the number of connected components

35
New cards

Kn (complete graph) is not bipartite if

n ≥ 3 because it contains triangles (odd cycles)

36
New cards

Cn (cycle graph) is bipartite only if

n is even

37
New cards

A graph is bipartite iff

it has no odd-length cycles

38
New cards

Length of the Walk

The ____ is equal to the total number of edges that you go over

39
New cards

Euler Walk

An ___ is a walk that uses each EDGE exactly once.

40
New cards

Euler Circuit

An ____ is a closed walk that uses each EDGE exactly once.

41
New cards

Euler Graph

A ____ is a connected graph that contains an Euler Circuit

42
New cards

Euler Trail (or Path)

A ___ that visits every EDGE exactly once, but does not need to return to the start

43
New cards

A connected graph has an Euler CIRCUIT iff

all VERTICES have EVEN degree

44
New cards

A connected graph has an Euler TRAIL (but not circuit) iff

exactly 2 VERTICES have ODD degree

45
New cards

Hamiltonian Path

A ___ that visits every VERTEX exactly once (edges may be reused)

46
New cards

Hamiltonian Circuit

A cycle that visits every VERTEX exactly once and returns to the start

47
New cards

Hamiltonian Graph

A graph that contains a hamiltonian circuit

48
New cards

Dirac’s Theorem

If G is a simple graph with n>= 3 vertices, and the degree of every vertex is at least n/2, then G has a Hamiltonian circuit.

49
New cards

Ore’s Theorem

If G is a simple graph with n >= 3 vertices, and for every pair of non-adjacent vertices u and v

deg(u) + deg(v) >= 8

then G has a Hamiltonian circuit

50
New cards

A graph with a pendant vertex (degree 1)

cannot have a Hamiltonian cycle - Because you can only enter and exit a vertex once in a Hamiltonian cycle — and a degree 1 vertex can't support both an entry and an exit.

51
New cards

Tree

A ___ is a connected undirected graph with no simple circuits.

52
New cards

An undirected graph is a tree if and only if

there is unique simple path between any two of its vertices.

53
New cards

Trivial Tree

A ____ is a tree consisting of a single vertex.

54
New cards

Forest

A graph that is circuit-free and not connected. A ____ is a disconnected graph with no cycles.

55
New cards

Rooted Trees

A ____ is a tree in which one vertex has been designed as the root and every edge is away from the root.

56
New cards

Level of a Vertex

The ___ is the number of edges alond the unique path between it and the root.

57
New cards

Height

The ___ of a rooted tree is the maximum level of any vertex of the tree

58
New cards

Children

The ____ of V are all those vertices that are adjacent to V and are one level farther away from the root than V.

59
New cards

Parent

If we is a child of v, then v is called the ____ of w.

60
New cards

Internal Vertices

Vertices that have children are called ____.

61
New cards

Terminal Vertex or Leaf

A vertex without any children is called a _____.

62
New cards

Siblings

Two distinct vertices that are both children of the same parent are called ____.

63
New cards

Ancestor

Given two distinct vertices v and w;

If v lies on a unique path between w and the root, then v is ______ of w and w is a descendant of v.

64
New cards

Descendant

Given two distinct vertices v and w;

If v lies on a unique path between w and the root, then v is ancestor of w and w is a _____ of v.

65
New cards

M-ary Tree

A rooted tree where every internal vertex (i.e., a non-leaf) has at most 𝑚 children.

Example: A binary tree is a 2-ary tree where internal vertices have ≤ 2 children.

66
New cards

Full M-ary Tree

A rooted tree where every internal vertex has exactly m children.

In a full binary tree, each internal node has exactly 2 children.

67
New cards

Decision Tree

A _________ is a rooted tree used to represent a sequence of decisions or tests that lead to different outcomes.

  • Each internal vertex represents a decision or test

  • Each edge represents the result of that decision

  • Each leaf represents a final outcome or classification

68
New cards

Bernoulli Distribution X ~ Bernoulli(p)

a __ has exactly 2 outcomes: success (1) and failure (0)

P(X = 1) = p

P(X = 0) = 1-p = q

mean = u = p

variance = o² = p(1-p)

69
New cards

Binomial Distribution X ~ Bin(n,p)

n independent trials

  • each trial has 2 outcomes (success/failure)

  • each trial has the same probability of success p

  • You’re counting the # of successes

  • X = # of successes

  • p = probability of success in one trial

  • mean = u = np

  • variance = o² = np(1-p)

  • std dev = \sqrt {np(1-p)}

70
New cards

PMF: Binomial Distribution X ~ Bin(n,p)

Probability Mass Function (PMF)

Probability Mass Function (PMF)

<p>Probability Mass Function (PMF) </p><img src="https://knowt-user-attachments.s3.amazonaws.com/3e4e3db9-a2c6-4b31-9645-4bc3fbdaf5bd.png" data-width="100%" data-align="center" alt="Probability Mass Function (PMF) "><p></p>
71
New cards

Poisson Distribution X ~ Poisson(k)

when you’re counting the # of events that occur:

  • in a fixed interval of time, space, or volume

  • where events happen independently

  • at a constant average rate

  • X = # of events in the interval

  • k = mean # of events in the interval

  • mean : u = k

  • variance : o² = k

  • std dev : sqrt k

  • k = np

72
New cards

PMF: Poisson Distribution X ~ Poisson(k)

Probability Mass Function (PMF)

Probability Mass Function (PMF)

<img src="https://knowt-user-attachments.s3.amazonaws.com/f966a7a4-5c22-40d5-b53c-d222e13433c6.png" data-width="100%" data-align="center" alt="Probability Mass Function (PMF)"><p>Probability Mass Function (PMF)</p>
73
New cards

Geometric Distribution X ~ Geom(p)

  • You’re performing independent trials

  • meaning you fail the first k-1 times, then succeed on the kth trial

  • each trials has 2 outcomes (success/failure)

  • the probability of success is constant (denoted p)

  • You’re measuring the # of trials until the first success

  • X = 3 of trials until 1st success

    • p = probablity of success on each trial

  • mean: u = 1/p

  • variance: o² = (1-p)/p²

  • std dev: o = sqrt (1-p)/p²

74
New cards

PMF: Geometric Distribution X ~ Geom(p)

Probability Mass Function (PMF)

Probability Mass Function (PMF)

<img src="https://knowt-user-attachments.s3.amazonaws.com/2db183f0-c115-49d3-8abe-75c7136aaee1.png" data-width="100%" data-align="center" alt="Probability Mass Function (PMF)"><p>Probability Mass Function (PMF)</p>
75
New cards

Hypergeometric Distribution X ~ HG(N,r,n)

  • sampling without replacement from a finite population

  • population has 2 types (successes in population

  • n = # of draws (sample size)

  • X = # of successes in sample

  • mean and variance is given on the formula sheet

76
New cards

PMF: Hypergeometric Distribution X ~ HG(N,r,n)

Probability Mass Function (PMF)

Probability Mass Function (PMF)

<img src="https://knowt-user-attachments.s3.amazonaws.com/30332bdd-8a00-4132-b6d2-5e884ebdf913.png" data-width="100%" data-align="center" alt="Probability Mass Function (PMF)"><p>Probability Mass Function (PMF)</p>
77
New cards

Negative Binomial Distribution X ~ NB(r,p)

  • # of trials until the rth success occurs

  • like geometric, but not stopping at the first success - stopping at the rth one.

  • p = probability of success

  • r = target # of success

  • X = # of trials until the rth success.

  • mean: u = r/p

  • variance: o² = r(1-p)/p²

78
New cards

PMF: Negative Binomial Distribution X ~ NB(r,p)

Probability Mass Function (PMF)

Probability Mass Function (PMF)

<img src="https://knowt-user-attachments.s3.amazonaws.com/c636375e-c3a7-4a4f-a007-59ddacf35eb3.png" data-width="100%" data-align="center" alt="Probability Mass Function (PMF)"><p>Probability Mass Function (PMF)</p>