Discrete Structures: Graph Theory

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Listen to an AI-generated conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the difference between the 'order' and 'size' of a graph?

The order of a graph is the number of vertices, while the size is the number of edges.

Given sets A = {1, 2} and B = {a, b}, what is the Cartesian product A × B?

  • {1, a, 2, b}
  • {(1, a), (1, b), (2, a), (2, b)} (correct)
  • {(a, 1), (b, 2)}
  • {(1, a), (2, b)}

Given X = {1, 3, 5} and Y = {s, t, u, v}, and a function f: X -> Y defined by f(1) = s, f(3) = t, f(5) = u, what is the range of f?

{s, t, u}

If E = {x | x is an odd prime number, x ∈ N}, which of the following represents E' (the complement of E)?

<p>{x | x is not an odd prime number, x ∈ N} (B)</p>
Signup and view all the answers

A truth table can be constructed to formally prove De Morgan's Laws.

<p>True (A)</p>
Signup and view all the answers

The symbolic logic expression for 'Some professors are not strict' can be represented using a(n) ______ quantifier.

<p>existential</p>
Signup and view all the answers

For a graph with edges AB, AC, BD, and CD, what would be the dimensions of its incidence matrix?

<p>4x5 (B)</p>
Signup and view all the answers

What is the significance of finding the complement of a graph?

<p>Indicates edges that are not present in the original graph and helps reveal different properties and structures.</p>
Signup and view all the answers

In graph theory, the sum of the degrees of all vertices is equal to ______ the number of edges.

<p>twice</p>
Signup and view all the answers

A complete graph is one where every pair of distinct vertices is connected by exactly one edge.

<p>True (A)</p>
Signup and view all the answers

Match each property to its corresponding definition for a relation R on a set A.

<p>Reflexive = For all a in A, (a, a) is in R Symmetric = If (a, b) is in R, then (b, a) is in R Transitive = If (a, b) and (b, c) are in R, then (a, c) is in R Antisymmetric = If (a, b) and (b, a) are in R, then a = b</p>
Signup and view all the answers

Analyze the logical nature of the statement (~p) ∧ (p ∨ q) -> q. Is it a tautology, contradiction, or neither?

<p>Tautology (C)</p>
Signup and view all the answers

Given matrix [[1, 1, 1], [1, 1, 1], [1, 1, 1]], what can you conclude about a graph created using said matrix?

<p>Represents a simple graph (A)</p>
Signup and view all the answers

Which of the following matrices represents a graph with no edges?

<p><code>[[0, 0], [0, 0]]</code> (A)</p>
Signup and view all the answers

Given a graph, how is the adjacency list helpful in representing graph structure?

<p>The adjacency list represents each vertex in the graph with a list of its adjacent vertices, enabling efficient traversal and querying of connections.</p>
Signup and view all the answers

In the function f: X -> Y, the set 'Y' is known as the ______ of 'f'.

<p>codomain</p>
Signup and view all the answers

What is the domain of the function when given the following data? X = {1, 3, 5} and Y = {s, t, u, v}. function f: X -> Y defined by f(1) = s, f(3) = t, f(5) = u

<p>{1, 3, 5} (A)</p>
Signup and view all the answers

Determine the inverse image of T, given the following data: X = {1, 3, 5} and Y = {s, t, u, v}. Define the function f: X -> Y by the following relations: f(1) = s, f(3) = t, f(5) = u

<p>3</p>
Signup and view all the answers

Which of the following statements best describes the term incidence matrix?

<p>A matrix that describes the relationship between edges and vertices (A)</p>
Signup and view all the answers

True or false: In a simple graph, there cannot be an edge from a vertex back to itself.

<p>true</p>
Signup and view all the answers

Flashcards

Difference between order and size of a graph?

Order refers to the number of vertices, while size refers to the number of edges in a graph.

Cartesian product of sets

The Cartesian product of two sets A and B, denoted A × B, is the set of all ordered pairs (a, b), where a is in A and b is in B. A x B = {(1,a), (1,b), (2,a), (2,b)}

Inverse image, range, domain, and codomain

The inverse image of S is the set of all elements in X that map to S. Range is the set of all output values. Domain is all possible input values; Co-domain is the set that contains the range.

Complement of a set (E')

E' represents the complement of set E, which includes all elements not in E. E' = {x | x is not an odd prime number, x∈N}

Signup and view all the flashcards

De Morgan's Laws

De Morgan's Laws: (A ∪ B)' = A' ∩ B' and (A ∩ B)' = A' ∪ B'. Truth tables verify these equivalencies.

Signup and view all the flashcards

Symbolic Logic

Translated to symbolic logic: ∃x (Professor(x) ∧ ¬Strict(x)).

Signup and view all the flashcards

Incidence matrix for a graph

An incidence matrix represents the edges and vertices of a graph. Rows represent vertices, columns represent edges; a 1 indicates the vertex is part of the edge.

Signup and view all the flashcards

Graph Complement

Complement means you switch vertices and non-verticies.

Signup and view all the flashcards

Connectedness in total degrees

Complete graph that is connected.

Signup and view all the flashcards

What's a graphend?

A graphend is a simple graph

Signup and view all the flashcards

Reflexive, symmetric, transitive, antisymmetric relations

A reflexive relation contains (a, a) for all a in set A. Symmetric means if (a, b) is in R, so is (b, a). Transitive means if (a, b) and (b, c) are in R, so is (a, c). Antisymmetric means if (a, b) and (b, a) are in R, then a = b.

Signup and view all the flashcards

Tautology, contradiction, or neither

A tautology is always true, a contradiction is always false, and neither depends on the truth values of its components.

Signup and view all the flashcards

List type

Adjacency Matrix and List.

Signup and view all the flashcards

What are components?

Connected components means the diagram is connected.

Signup and view all the flashcards

Eigenvectors

In linear algebra, the eigenvectors of a linear operator are nonzero vectors. The solution for each eigenvalue of a matrix.

Signup and view all the flashcards

Study Notes

  • The notes corresponds to a Discrete Structure for Computer Science course

Graph Theory Basics

  • The difference between the order of a graph and the size of a graph:
  • Order: The number of vertices in the graph
  • Size: The number of edges in the graph
  • Cartesian product of sets A={1,2} and B={a,b} is A x B = {(1,a), (1,b), (2,a), (2,b)}
  • Incidence matrix for a graph represents the relationship between vertices and edges
  • Rows represent vertices
  • Columns represent edges
  • Entries indicate if a vertex is incident to an edge (usually 1 for incident, 0 for not)
  • Relationship between total in-degree, out-degree, and total number of edges in a graph:
  • The sum of in-degrees equals the sum of out-degrees
  • Both are equal to the total number of edges in the graph
  • A complete graph is a graph where every pair of distinct vertices is connected by a unique edge
  • To identify if a graph is complete, check if every possible edge exists

Functions and Relations

  • Let X= {1,3,5} and Y= {s, t, u,v}, and a function f: X -> Y is defined by the diagram
  • The inverse image of S (assuming S = {s}): It's the set of elements in X that map to s
  • From the diagram, f(1) = s, so the inverse image of s is {1}
  • Range of f: The set of all output values of f
  • This is {s, t, u}
  • Domain of f: The set of all input values of f, which is X = {1, 3, 5}
  • Co-domain of f: The set Y = {s, t, u, v}
  • Values of f(1), f(3), f(5)
  • f(1) = s
  • f(3) = t
  • f(5) = u
  • If E= {x | x is an odd prime number, x∈N}, then E' (complement of E) consists of all natural numbers that are not odd prime numbers
  • E' includes even numbers, 1, composite odd numbers, and 0 if N includes 0
  • Given a set A={1,2,3}, consider the following relations: R= {(1,1),(1,2),(1,3),(3,3)}, S={(1,1),(1,2),(2,1),(2,2),(3,3)}, T= {(1,1),(1,2),(2,2),(2,3)}
  • Reflexive: A relation is reflexive if (a,a) ∈ R for all a ∈ A
  • R is not reflexive because (2,2) is missing
  • S is reflexive because (1,1), (2,2), and (3,3) are present
  • T is not reflexive because (3,3) is missing
  • Symmetric: A relation is symmetric if (a,b) ∈ R implies (b,a) ∈ R for all a, b ∈ A
  • R is not symmetric because (1,2) ∈ R but (2,1) ∉ R
  • S is symmetric because for every (a,b) ∈ S, (b,a) ∈ S as well
  • T is not symmetric because (1,2) ∈ T but (2,1) ∉ T
  • Transitive: A relation is transitive if (a,b) ∈ R and (b,c) ∈ R implies (a,c) ∈ R for all a, b, c ∈ A
  • R is not transitive because (1,2) ∈ R and (2,x) ∉ R for any x, but (1,x) exists
  • S is not transitive because (1,2) ∈ S and (2,1) ∈ S, but (1,1) ∈ S (should be in relation for it to be transitive)
  • T is not transitive because (1,2) ∈ T and (2,3) ∈ T, but (1,3) ∉ T
  • Antisymmetric: A relation is antisymmetric if (a,b) ∈ R and (b,a) ∈ R implies a = b for all a, b ∈ A
  • R is not antisymmetric because (1,2) ∈ R
  • S is not antisymmetric because (1,2) ∈ S and (2,1) ∈ S, but 1 ≠ 2
  • T is antisymmetric because the only pairs (a,b) and (b,a) are when a=b

Logic

  • De Morgan's Laws involve negating conjunctions and disjunctions
  • (¬(P ∧ Q) ≡ (¬P ∨ ¬Q)
  • ¬(P ∨ Q) ≡ (¬P ∧ ¬Q)
  • Truth table construction: List all possible combinations of truth values for P and Q (True/False), then evaluate both sides of the equivalence to confirm they yield the same truth values
  • Expressing "Some professors are not strict" in symbolic logic:
  • ∃x (Professor(x) ∧ ¬Strict(x))
  • This means "There exists an x, such that x is a professor and x is not strict."
  • Analyzing the logical nature of statements to determine if they are tautologies, contradictions, or neither:
  • Determine if a statement is always true (tautology) or always false (contradiction)
  • (~p) ∧ (p ∨ q) -> q : Neither
  • (~q) ∨ (p ∧ q) -> q : Neither
  • (p -> q) ∧ (q -> p) : Neither
  • (q -> p) ∨ ~(p -> q) : Tautology

Graph Representations and Properties

  • To find the complement of a graph:
  • Start with the complete graph having the same vertices
  • Remove the existing edges from the original graph - Add the edges that were missing from the original graph
  • Adjacency matrix and adjacency list for a graph:
  • Adjacency Matrix: A square matrix where the entry at row i, column j is 1 if there is an edge from vertex i to vertex j, and 0 otherwise
  • Adjacency List: A list of vertices, where each vertex is associated with a list of its adjacent vertices. Lists the neighbours of each vertex
  • Drawing a graph from an incidence matrix:
  • Rows represent vertices
  • Columns represent edges
  • Examine the 1s in each column to determine which vertices that edge connects
  • Making a graph from adjacency matrices and checking if it's a simple graph or multigraph:
  • Simple Graph: Has no loops (edges from a vertex to itself) and no multiple edges (more than one edge between two vertices). The adjacency matrix will have 0s on the diagonal and only 0s or 1s elsewhere
  • Multigraph: Allows multiple edges between the same pair of vertices. The adjacency matrix can have entries greater than 1

Linear Algebra and Graph Theory

  • Finding Eigenvalues and Eigenvectors for a matrix (example matrix A):
  • Eigenvalue: A scalar λ such that A * v = λ * v for some non-zero vector v
  • Eigenvector: A non-zero vector v that satisfies A * v = λ * v, where A is a matrix and λ is an eigenvalue
  • Finding Eigenvalues:
  • Solve the characteristic equation det(A - λI) = 0, where I is the identity matrix. The solutions λ are the eigenvalues
  • Finding Eigenvectors:
  • For each eigenvalue λ, solve the system of linear equations (A - λI) * v = 0 for the eigenvector v
  • This typically involves row-reduction to find the null space of (A - λI)
  • Each eigenvalue has a corresponding eigenvector (or a set of eigenvectors forming an eigenspace)

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Graph Theory Fundamentals Quiz
5 questions
Graph Theory Basics
19 questions

Graph Theory Basics

PrudentRainforest avatar
PrudentRainforest
Discrete Mathematics Quiz
9 questions

Discrete Mathematics Quiz

FortunatePlum7675 avatar
FortunatePlum7675
Use Quizgecko on...
Browser
Browser