Lecture 1 Flashcards

1
Q

What is the difference between a set and a list?

A

A set is an unordered collection of unique objects, while a list is an ordered collection that can have duplicates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you define a set using propositions?

A

A set can be defined using P(x), where P(x) is a statement true for all elements in the set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What makes two sets equal?

A

Two sets are equal if and only if they contain exactly the same elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the cardinality of a set?

A

The number of elements in the set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the power set of a set S?

A

The set of all subsets of S, including the empty set and S itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the cardinality of the power set P(S)?

A

For a set S with n elements, |P(S)| = 2^n.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Venn diagram used for?

A

To visually represent sets and their relationships, such as unions and intersections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a disjoint set?

A

Two sets that have no elements in common.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the union of two sets?

A

The set containing all elements that are in either set or both.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the intersection of two sets?

A

The set containing all elements common to both sets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the complement of a set A with respect to a universe U?

A

The set of all elements in U that are not in A.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a tuple?

A

An ordered sequence of elements, where the order and repetition of elements matter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a binary relation?

A

A set of ordered pairs, showing relationships between elements of two sets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the components of a graph?

A

A graph is composed of vertices (nodes) and edges (connections between nodes).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between a directed and an undirected graph?

A

In a directed graph, edges have a direction, while in an undirected graph, edges have no direction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an adjacency matrix?

A

A matrix representing a graph, where rows and columns correspond to vertices and cell values indicate edge presence.

17
Q

What is a tree in graph theory?

A

A connected, undirected graph with no simple circuits.

18
Q

What is a root node in a tree?

A

The designated starting node from which all other nodes can be reached.

19
Q

What is the height of a tree?

A

The length of the longest path from the root to any node.

20
Q

What is a leaf node?

A

A node in a tree that has no children.

21
Q

What is an internal node?

A

A node in a tree that has both a parent and at least one child.

22
Q

What are sibling nodes?

A

Nodes that share the same parent in a tree.

23
Q

What is a full binary tree?

A

A binary tree where every internal node has exactly two children.

24
Q

What is the depth of a node in a tree?

A

The length of the path from the node to the root.

25
Q

What is a complete binary tree?

A

A binary tree in which all levels are fully filled except possibly the last, which is filled from left to right.

26
Q

What is the significance of Euler’s work in graph theory?

A

Euler introduced the concept of traversability, solving problems like the Seven Bridges of Königsberg using graphs.

27
Q

What is a simple circuit in a graph?

A

A path that starts and ends at the same vertex, with no repeated edges or vertices except the start and end.

28
Q

What is the difference between a graph and a tree?

A

A tree is a special type of graph that is connected and has no simple circuits.

29
Q

What is the purpose of adjacency matrices in computer science?

A

They represent graphs and are useful in algorithms, including those in machine learning and linear algebra.

30
Q

What are ancestors in a tree?

A

All the nodes on the path from a given node to the root.