- web.groovymark@gmail.com
- November 12, 2024
Question 01
Which of the following best describes a relation from set A to set B?
a) A subset of the Cartesian product A×B
b) A subset of the union A∪B
c) A subset of the intersection A∩B
d) A subset of the complement Ac
Correct Answer: a) A subset of the Cartesian product A×B
Explanation: A relation from set A to set B is a subset of the Cartesian product A×B, which consists of ordered pairs where the first element is from A and the second element is from B.
Question 02
Which of the following describes the codomain of a function?
a) The set of possible output values
b) The set of input values
c) The set of ordered pairs in the function
d) The set of preimages in the function
Correct Answer: a) The set of possible output values
Explanation: The codomain of a function is the set of possible output values that the function can map to, though not every element in the codomain must have a corresponding element in the domain.
Question 03
What is the range of a function?
a) The set of all images of elements in the domain
b) The set of all elements in the domain
c) The set of all possible output values in the codomain
d) The set of all preimages of elements in the codomain
Correct Answer: a) The set of all images of elements in the domain
Explanation: The range of a function is the set of actual output values (or images) that are mapped from the elements of the domain.
Question 04
Which of the following is an example of an injective function?
a) Every element of the domain maps to a unique element of the codomain
b) Every element of the codomain maps to a unique element of the domain
c) Multiple elements in the domain map to the same element in the codomain
d) Every element of the domain maps to the same element in the codomain
Correct Answer: a) Every element of the domain maps to a unique element of the codomain
Explanation: An injective function is one in which distinct elements in the domain map to distinct elements in the codomain.
Question 05
Which of the following best describes a surjective function?
a) Every element of the codomain has at least one preimage
b) Every element of the domain maps to a unique element of the codomain
c) Every element of the codomain has exactly one preimage
d) Every element of the domain maps to the same element of the codomain
Correct Answer: a) Every element of the codomain has at least one preimage
Explanation: A surjective function (or onto function) ensures that every element of the codomain is the image of at least one element in the domain.
Question 06
What is a bijection?
a) A function that is both injective and surjective
b) A function that is neither injective nor surjective
c) A function that is injective but not surjective
d) A function that is surjective but not injective
Correct Answer: a) A function that is both injective and surjective
Explanation: A bijection is a function that is both injective (one-to-one) and surjective (onto), meaning it establishes a one-to-one correspondence between elements of the domain and the codomain.
Question 07
Which of the following describes a function composition?
a) The result of applying one function to the result of another function
b) The result of adding two functions together
c) The result of multiplying two functions together
d) The result of subtracting one function from another
Correct Answer: a) The result of applying one function to the result of another function
Explanation: Function composition is the process of applying one function to the result of another function, often written as f(g(x)).
Question 08
Which of the following describes a binary relation?
a) A subset of the Cartesian product of two sets
b) A subset of the union of two sets
c) A subset of the intersection of two sets
d) A subset of the complement of two sets
Correct Answer: a) A subset of the Cartesian product of two sets
Explanation: A binary relation is a subset of the Cartesian product of two sets, representing relationships between pairs of elements from those sets.
Question 09
Which of the following describes an equivalence class?
a) The set of all elements related to a given element under an equivalence relation
b) The set of all unrelated elements under an equivalence relation
c) The set of all elements in a universal set
d) The set of elements in the codomain of a function
Correct Answer: a) The set of all elements related to a given element under an equivalence relation
Explanation: An equivalence class consists of all elements that are related to a specific element under an equivalence relation.
Question 10
What is the purpose of the identity function?
a) To return the same input as the output
b) To double the input
c) To negate the input
d) To add one to the input
Correct Answer: a) To return the same input as the output
Explanation: The identity function is a function that returns the same value as its input, often written as I(x)=x.
Question 11
What is the inverse of a function?
a) A function that reverses the effect of the original function
b) A function that doubles the output of the original function
c) A function that negates the output of the original function
d) A function that subtracts one from the output of the original function
Correct Answer: a) A function that reverses the effect of the original function
Explanation: The inverse of a function undoes the effect of the original function, meaning that applying the function and its inverse successively returns the original input.
Question 12
Which of the following describes a reflexive relation?
a) Every element in the set is related to itself
b) No elements in the set are related to themselves
c) Some elements in the set are related to themselves
d) Every element in the set is related to every other element
Correct Answer: a) Every element in the set is related to itself
Explanation: A reflexive relation is one in which every element is related to itself, meaning for all elements a, (a,a) is in the relation.
Question 13
Which of the following describes a symmetric relation?
a) If a is related to b, then b is related to a
b) If a is related to b, then b is not related to a
c) If a is related to b, then a is also related to c
d) If a is related to b, then a=ba = ba=b
Correct Answer: a) If a is related to b, then b is related to a
Explanation: A symmetric relation is one in which if one element is related to another, the reverse relation also holds.
Question 14
Which of the following describes an antisymmetric relation?
a) If a is related to b and b is related to a, then a=ba = ba=b
b) If a is related to b and b is related to a, then a≠b
c) If a is related to b, then b is also related to a
d) If a is related to b, then a is not related to c
Correct Answer: a) If a is related to b and b is related to a, then a=b
Explanation: An antisymmetric relation is one where if A is related to B and B is related to A, then A must equal B.
Question 15
Which of the following describes a transitive relation?
a) If A is related to B and B is related to C, then A is related to C
b) If A is related to B, then B is related to A
c) If A is related to B, then A=B
d) If A is related to B, then A is not related to C
Correct Answer: a) If A is related to B and B is related to C, then A is related to C
Explanation: A transitive relation is one where if A is related to B and B is related to C, then A must also be related to C.
Question 16
Which of the following describes a strict partial order?
a) A binary relation that is transitive and antisymmetric but not reflexive
b) A binary relation that is reflexive and symmetric
c) A binary relation that is transitive and symmetric
d) A binary relation that is reflexive and antisymmetric
Correct Answer: a) A binary relation that is transitive and antisymmetric but not reflexive
Explanation: A strict partial order is a binary relation that is transitive and antisymmetric, meaning it does not contain self-loops.
Question 17
What is the characteristic property of a total order?
a) Every pair of elements is comparable
b) No pair of elements is comparable
c) Some pairs of elements are comparable
d) The relation is symmetric but not transitive
Correct Answer: a) Every pair of elements is comparable
Explanation: In a total order, every pair of elements is comparable, meaning one is always either less than or greater than the other.
Question 18
Which of the following best describes a directed acyclic graph (DAG)?
a) A graph with directed edges and no cycles
b) A graph with undirected edges and no cycles
c) A graph with directed edges and exactly one cycle
d) A graph with directed edges and multiple cycles
Correct Answer: a) A graph with directed edges and no cycles
Explanation: A directed acyclic graph (DAG) is a graph with directed edges that contains no cycles.
Question 19
Which of the following best describes a rooted tree?
a) A tree with one designated vertex as the root
b) A tree with no designated root
c) A tree where all nodes have equal height
d) A tree with cycles
Correct Answer: a) A tree with one designated vertex as the root
Explanation: A rooted tree is a tree with a designated root vertex, from which all other vertices are connected in a hierarchical manner.
Question 20
What is a spanning tree in a graph?
a) A subgraph that includes all vertices of the original graph and is a tree
b) A subgraph that includes some vertices of the original graph and is a tree
c) A subgraph that contains cycles and all vertices of the original graph
d) A subgraph that contains all edges but not all vertices of the original graph
Correct Answer: a) A subgraph that includes all vertices of the original graph and is a tree
Explanation: A spanning tree is a subgraph that includes all vertices of the original graph but contains no cycles, forming a tree.