Lecture 1 Flashcards
What is the difference between a set and a list?
A set is an unordered collection of unique objects, while a list is an ordered collection that can have duplicates.
How do you define a set using propositions?
A set can be defined using P(x), where P(x) is a statement true for all elements in the set.
What makes two sets equal?
Two sets are equal if and only if they contain exactly the same elements.
What is the cardinality of a set?
The number of elements in the set.
What is the power set of a set S?
The set of all subsets of S, including the empty set and S itself.
What is the cardinality of the power set P(S)?
For a set S with n elements, |P(S)| = 2^n.
What is a Venn diagram used for?
To visually represent sets and their relationships, such as unions and intersections.
What is a disjoint set?
Two sets that have no elements in common.
What is the union of two sets?
The set containing all elements that are in either set or both.
What is the intersection of two sets?
The set containing all elements common to both sets.
What is the complement of a set A with respect to a universe U?
The set of all elements in U that are not in A.
What is a tuple?
An ordered sequence of elements, where the order and repetition of elements matter.
What is a binary relation?
A set of ordered pairs, showing relationships between elements of two sets.
What are the components of a graph?
A graph is composed of vertices (nodes) and edges (connections between nodes).
What is the difference between a directed and an undirected graph?
In a directed graph, edges have a direction, while in an undirected graph, edges have no direction.
What is an adjacency matrix?
A matrix representing a graph, where rows and columns correspond to vertices and cell values indicate edge presence.
What is a tree in graph theory?
A connected, undirected graph with no simple circuits.
What is a root node in a tree?
The designated starting node from which all other nodes can be reached.
What is the height of a tree?
The length of the longest path from the root to any node.
What is a leaf node?
A node in a tree that has no children.
What is an internal node?
A node in a tree that has both a parent and at least one child.
What are sibling nodes?
Nodes that share the same parent in a tree.
What is a full binary tree?
A binary tree where every internal node has exactly two children.
What is the depth of a node in a tree?
The length of the path from the node to the root.
What is a complete binary tree?
A binary tree in which all levels are fully filled except possibly the last, which is filled from left to right.
What is the significance of Euler’s work in graph theory?
Euler introduced the concept of traversability, solving problems like the Seven Bridges of Königsberg using graphs.
What is a simple circuit in a graph?
A path that starts and ends at the same vertex, with no repeated edges or vertices except the start and end.
What is the difference between a graph and a tree?
A tree is a special type of graph that is connected and has no simple circuits.
What is the purpose of adjacency matrices in computer science?
They represent graphs and are useful in algorithms, including those in machine learning and linear algebra.
What are ancestors in a tree?
All the nodes on the path from a given node to the root.