CPE111 Mod 1
CPE111 Mod 1
Match a set on the left with an alternate way of describing it on the right.
Match each interval on the left with its set builder description on the right.
Match the set on the left with the set on the right that it equals.
Match the statement on the left with the task on the right needed to prove the statement.
Match the set on the left with its size on the right
Which of the following are correct ways to describe the set of nonnegative integers less than or
equal to 100 that are perfect cubes?
Which sets equal the set of positive integers not exceeding 100?
Drag and drop the power set against the corresponding set.
Match the sets on the left with a true statement about the Cartesian product of those sets on the
right.
Let A be the set of words containing at least one "j" and B be the set of words containing at least one
"k." Select all of the words that are members of A ∪ B.
Drag and drop the Venn diagram in the image against the corresponding set operation.
Let A be the set of words containing at least two "o"s, and B be the set of words containing at least
one letter "z". Select all of the following that are members of A ∩ B.
Which of the following are true statements about the Cartesian product of {a, b} and {1, 2, 3}?
Let A = {a,e,i,o,u}�,�,�,�,� and B = {c,d,e,i,r,s,t}�,�,�,�,�,�,�. Select all of the following
that are members of A – B.
Let E be the set of students at your school majoring in engineering and let B be the set of students at
your school majoring in business. Select all of the students from the list below who would be
members of E ∪ B.
Match the set identity in the left-hand column with its name in the right-hand column.
Let U be the set of all students at your school, E be the set of engineering students at your school,
and B be the set of business students at your school. Match each of the sets in the left-hand column
with the description in the right-hand column.
Rank the two sets by the size of their intersection, from smallest at the top to largest at the bottom.
Let E be the set of students at your school majoring in engineering and let B be the set of students at
your school majoring in business. Select all of the students from the list below who would be
members of E – B.
Match the two sets on the left with their union on the right.
Let U = {1,2,3,4,5,6,7,8,9}1,2,3,4,5,6,7,8,9 be the universal set, and let A = {2,3,4,7,8}2,3,4,7,8.
Select all of the following that are members of A�.
Let the universal set U be the set of all students at your school. Let E be the set of students at your
school majoring in engineering. Select all of the students from the list below who are members
of E�.
Let E be the set of students at your school majoring in engineering, and let B be the set of students
at your school majoring in business. Select all of the students from the list below who are members
of E ∩ B.
Match are set identities.
Match each set identity in the left-hand column with the corresponding logical equivalence in the
right-hand column.
Order the statements below, from top to bottom, to form one half of a proof
that A∪B�∪� = A� ∩ B�.
Which of the following begins the two main parts of a direct proof
of A∪(B∩C)�∪�∩� = (A∪B)�∪� ∩ (A∪C)�∪�?
Assume that U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Let A= {2, 4, 6, 8, 10} and B = {7, 8, 9, 10}.
Match the right side with the set that results from taking the complement of the set on the
left
Order the following expressions, from top to bottom, to confirm the
identity A∪(A∪B)�∪�∪� = A∪B�∪�.
Match the logic based set builder notation on the left with the set notation on the right.
Match each method of proving a set identity on the left with its description on the right.
Order the following expressions, from top to bottom, to confirm the
identity A∩(B∪C)�∩�∪� = (C∩B)�∩� ∪ A�.
For i = 2, 3, 4, let Ai = {i, i+1, i+2, ..., i2}�� = {�, �+1, �+2, ..., �2} be the set of integers
from i to i2�2. Select the element below that is a member of ∪4i=2Ai∪�=24��.
Let V be the set of all restaurants in your town that serve vegan food, G the set of all restaurants that
serve gluten-free food, and K the set of all restaurants in your town that serves food certified as
kosher. Select all of the following that accurately describe the set V ∩ G ∩ K.
Let R be the set of all students in your class who are right handed, S the set of all students in your
class who are sophomores, and T the set of all students in your class who take a train to campus.
Select all of the following that accurately describe the set R ∩ S ∩ T.
Consider two multisets of tools, BikeBag = {3 ⋅ screw driver, 4 ⋅ wrench, 2 ⋅ patch, 1 ⋅ pump}
and GarageShop = {7 ⋅ screw driver, 22 ⋅ wrench, 1 ⋅ pump}. Match each set described on the
left with its value on the right.
For i = 1, 2, 3, .., define Ai = {0, 1, 2, 3, .., (10i − 1)}�i = {0, 1, 2, 3, .., (10i - 1)}. Select all of
the following statements that are true.
Suppose P and Q are the multisets {3 ⋅ a, 4 ⋅ b} and {1 ⋅ a, 3 ⋅ b}, respectively. Match each set
described on the left with its value on the right.
Which of the following are functions
from Z to Z?
Suppose f is a function from A to B. Match each property of the function on the left with its definition
on the right.
Match the function from Z� to Z� on the left with the description on the right.
Which of the following functions from R to R are invertible?
Let f, g, and h be functions from the set of integers to the set of integers defined
by f(x) = 2x, g(x) = x – 3, and h(x) = 4x + 5. Match each expression on the left with its equivalent on
the right.
Suppose that f: A → B. Match the property on the left with the corresponding method for showing
that the property holds on the right.
Match the function from R to R with its inverse.
Which of the following functions from Z → R are partial functions, rather than total functions?
The formulas on the left each define a function with domain and codomain equal to Z. Match each
function with its range from the right.
Which of the following statements are correct for all integers n and real
numbers x?
Consider a function G that maps students in a class to grades. The domain is the set of students in
the class: {Yu, Kirstein, Alshahrani, Yarra, Mitchell, Feldman}.The codomain is the set of grades:
{A, B, C, D, E, F}. Select all of the functions below that are bijections.
Compute the floor or ceiling, as indicated by the notation, of each of the following:
Match the function from Z to Z on the left with the description on the right.
Match the functions f(x), g(x) on the left with composition (f∘g)(x) on the right.
Match the sequence {an} on the left with the value of a4 on the right.
Suppose a person deposits $100,000 in a savings account yielding 2% a year with interest
compounded annually.
Determine how much will be in the account after 10 years by calculating the value of P10,
where Pn is the amount in the account after n years.
Given the sequence {an} with initial terms –2, –1, 1, 5, 13, 29, 61, which approach can help
you find a simple formula for {an}?
Which of the following is the correct first four terms of the geometric progression with
initial term 3 and common ratio 1/2?
Match the summation on the left with its value on the right.
Hilbert's Grand Hotel has a countably infinite number of rooms numbered 1, 2, 3, .... Their
policy is to accommodate all new guests whenever possible while still accommodating
existing guests. If the hotel is completely full and two new guests arrive, what does the
clerk do?
Order the following statements, from top to bottom, that outline the proof that the set of
real numbers is uncountable.
Match the properties of an algorithm in the left column with their corresponding
descriptions on the right.
Drag and drop the description of what it does against the corresponding algorithms
described in pseudocode.
Order the following steps of a trace of the linear search algorithm used to search for 13 in
the list 14, 13, 12. Place the first step at top.
Given as input an integer x and the integers 1, 8, 17, 47, 2, 3, 41, match the input x on the
left with the output of the linear search algorithm on the right.
What steps need to be done to show that the algorithm for finding the maximum element in
a finite sequence is correct?
Order the following steps of a trace of the binary search algorithm used to search for 13 in
the list 10, 11, 12, 13, 14.
Which of these statements about the binary search algorithm are true?
Arrange these steps of the linear search for finding location of an element x in a
list a1,a2, ..., an.
Order the following statements, from top to bottom, that outline the proof that the set of
real numbers is uncountable.
Match the list on the left with the possible number of times the binary search algorithm
splits the list when searching for a term in the list.
Which of these statements are true about the bubble sort algorithm as specified in the text.
Order the following steps of a trace of the max algorithm with input 12, 13, 14, 11.
Order the steps to sort a list with n elements, using insertion sort.
Match each sequence with the position of its first term that is out of increasing order.
What is the list at the end of the first pass of the bubble sort algorithm when given the list
4, 2, 6, 7, 5 as input.
Which of the following shifts s are found by the naive string matcher in searching for the
pattern is in the text Mississippi?
Which of the following is the sequence at the end of the second pass when the insertion
sort algorithm is used to sort the list 4, 2, 6, 7, 5?
Consider the letters k, m, h, g, e, a, b, and d. "kmhgeabd" is a character string made from the
given letters whose characters are in the given order. The string made from the given
letters whose characters are in increasing alphabetical order is
The number of character comparisons used by the naive string matcher to look for the
pattern is in the text Mississippi is
Which of these statements are true about the insertion sort algorithm as specified in the
book.
Using the greedy change-making algorithm, determine the minimum number of coins
required to make change for 36 cents, using quarters, dimes, nickels, and pennies.
What change is made by the cashier's algorithm for 40 cents using quarters, dimes, and
pennies (but no nickels)?
The number of character comparisons used by the naive string matcher to look for the
pattern of in the text love is
Using the greedy change-making algorithm, determine the coins required in making change
for 46 cents, using quarters, dimes, nickels, and pennies.
What change is made by the cashier's algorithm for 66 cents using quarters, dimes, nickels,
and pennies?
Using the greedy algorithm for scheduling talks, find the greatest number of talks that can
be scheduled if the starting and ending times of the possible talks are 8:00–8:50, 8:30–9:00,
8:55–9:45, 9:15–9:55, 10:00–10:30, 10:15–10:25, 10:30–10:55, 11:00–11:35, 10:55–11:25,
10:45–11:30.
Which of the statements below are true about the halting problem? Recall that the halting
problem asks whether there can be a procedure that takes as input any computer program
and any input to this program and determines whether when given this input the program
will stop
Let f and g be functions from the set of real numbers to the set of real numbers,
then f(x) is O(g(x)) if there are constants C and k such that
Which of these rules for selecting a talk from those compatible with talks already scheduled
defines a greedy algorithm that always yields the most talks from a given list of possible
talks?
Which of these statements are true regarding big-O estimates of some important functions?
Rank the following functions so that each function is big-O of the one above it, that is rank
them in descending order.
List these functions so that each function in the list is big-O of the function below it.
Match the functions in the left column with the smallest big-O estimate in the right column.
Identify the true functions from the following.
Define f(x) = x2 + 2x. Select all of the functions g(x) below for which f(x) is Ω(g(x))?
Suppose that f1(x) is O(g1(x)) and that f2(x) is O(g2(x)). Order the steps of the proof showing
that (f1 + f2)(x) is O(max(|g1(x)|,|g2(x)|)).
Put the following steps in order for determining the time complexity of the algorithm for
finding the maximum element in a sequence of integers. Use the number of comparisons as
a measure of time complexity.
Which of these considerations are important reasons for studying the computational
complexity of algorithms?
Order the steps to produce an analysis of the time complexity of binary search in terms of
the number of comparisons used. You can assume that there are n = 2k elements in the list.
Which of statements are true about worst-case and average-case complexity?
Which of these statements is true about the time complexity of a linear search?
Order the following steps to produce an average-case analysis of the linear search
algorithm in terms of the average number of comparisons used. You can assume the
integer x is in the list.
Find the highest number of multiplications of integers that may be needed to multiply the
matrices A, B, and C, where A is 20×10, B is 10×30, and C is 30×40, all with integer entries.
This results from the least efficient ordering of operations.
Find the number of additions and multiplications of integers, required to multiply two 3 × 3
matrices with integer entries.
Which of the following are algorithmic paradigms?
Which is the most efficient method to find the multiplication of the matrices A of order 3 ×
2, B of order 2 × 1, and C of order 1 × 5.
Give a big-Θ estimate for the number of arithmetic operations and comparisons used by the
brute-force algorithm for finding the closest pair of n points in the plane.
Put the following steps in order to perform a worst-case analysis of bubble sort.
Match the terminology on the left with the definition on the right.
Which of the these are steps for a proof by mathematical induction that P(n) is true for all
positive integers n?
Why is mathematical induction a valid proof technique? Put the following steps of a proof
of such in the correct order.
Match the complexity on the left with the corresponding terminology on the right.
Let P(n) be the statement that every set of n lines in the plane, no two of which are parallel,
meet in a common point. We will attempt to prove that P(n) is true for all positive
integers n ≥ 2.
The inductive hypothesis is the statement that P(k) is true for the positive integer k. To
complete the inductive step, we must show that if P(k) is true, then P(k + 1) must also be
true. So, consider a set of k + 1 distinct lines in the plane. By the inductive hypothesis, the
first k of these lines meet in a common point p1�1. Moreover, by the inductive hypothesis,
the last k of these lines meet in a common point p2�2. We will show
that p1�1 and p2�2 must be the same point. If p1�1 and p2�2 were different points, all
lines containing both of them must be the same line because two points determine a line.
This contradicts our assumption that all these lines are distinct. Thus, p1�1 and p2�2 are
the same point. We conclude that the point p1�1 = p2�2 lies on all k + 1 lines. We have
shown that P(k + 1) is true assuming that P(k) is true. This completes the inductive step.
Which of these steps are part of a template for proofs by mathematical induction?
Let P(n) be the statement that the sum of the first n positive odd integers is n2. Put the
following steps in order for the proof by mathematical induction that P(n) is true for all
positive integers n.
Match these terms with their definitions.
The rule of inference behind mathematical induction can be expressed in predicate logic as:
Which of these statements can be proved using mathematical induction?
Which of these are steps of a proof by strong induction that P(n) is true for all positive
integers n?
Which of these statements are true regarding strong and mathematical induction?
In a proof by strong induction that every postage of 12 cents or more can be formed using
4-cent and 5-cent stamps, we show in the basis step that postage of 12, 13, 14, and 15 cents
can be formed using a combination of these stamps. Put the following steps for the
inductive step in the correct order.
What is the inductive hypothesis in a proof by strong induction that every simple polygon
with at least three sides can be triangulated?
Put these steps in order to construct a proof of the existence part of the division algorithm,
which states that if a is an integer and d is a positive integer, there are integers q and r with
0 ≤ r < d such that a = dq + r.
What is the inductive hypothesis in the proof by strong induction that every integer greater
than 1 can be written as the product of primes?
Let M be the set of months in the year; D the set of integers between 1 and 31 (inclusive);
and R the relation from M to D consisting of the ordered pairs (m, d), where m is a month
and d is an integer between 1 and the number of days in the month m during a leap year.
Which of the following ordered pairs belongs to R?
Which of these ordered pairs belongs to the "does not divide" relation on the set of positive
integers, where (a, b) belongs to this relation if a and b are positive integers such
that a does not divide b?
On the set of integers, let R1 be the "greater than or equal to" relation and R2 be the "less
than or equal to" relation; that is R1 = { (x, y) | x ≥ y } and R2 = { (x, y) | x ≤ y }. Match the
combinations of R1 and R2 on the left with their sets on the right.
Suppose R is the relation from the set { 1, 2, 3 } to the set { 1, 2, 3, 4 }, with R = { (1, 1), (1, 3),
(2, 1), (2, 4), (3, 2) }, and S is the relation from the set { 1, 2, 3, 4 } to the set { 2, 3, 4, 5 },
with S = { (1, 2), (1, 4), (1, 5), (2, 3), (2, 4), (3, 2), (4, 5) }. Which of the following ordered
pairs belongs to
S∘R?
Match the relations on the positive integers on the left with their properties on the right.
Suppose that A = { 1, 2, 3, 4, 5 } and B = { 1, 3, 5 }. Let R1 = { (1, 1), (2, 1), (2, 3), (2, 5), (3, 1),
(3, 5), (4, 1), (5, 3), (5, 5) } and R2 = { (1, 1), (1, 3), (1, 5), (2, 3), (3, 1), (3, 3), (4, 1) }. List the
relations R1 ∪ R2, R1 ∩ R2, R1 -- R2, R2 -- R1, and R1 ⊕ R2 in order of decreasing cardinality
(largest on top).
Computing the composite of two relations requires that we find elements that are
the element of ordered pairs in the first relation and the, Incorrect Unavailable element of
ordered pairs in the second relation.
Match the adjective in the left-hand column to the definition on the right to complete the
sentence: A relation R on a set A is ______.
Put the steps in order, from top to bottom, to prove that if R is a transitive relation on a
set A, then Rn ⊆ R for n = 1, 2, 3, ....
Which of these triples belongs to the ternary relation R = { (a, b, c) | a > 2b > 3c } on ℕ × ℕ ×
ℕ?
Given the relations R = { (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1) } and S = { (1, 3), (2, 2), (2,
3), (3, 2), (3, 3) }, match the combinations of R and S on the left with their sets on the right.
Let R = { (1, 1), (1, 3), (2, 1), (3, 2), (4, 2) }. Match the powers of R on the left with the
correct sets on the right.
Match the terms on the left with their definitions on the right.
An operator that produces a new relation from two relations by combining all the m-tuples
from the first relation and n-tuples from the second relation that agree in the last p fields of
the m-tuples and the first p fields of the n-tuples is called a operator.
Consider the following transactions at an outdoor equipment store: {backpack, tent, bag,
pad}, {backpack, bag, pad, stove}, {bag, pad}, and {stove, teapot}. Find the count of the
itemset {bag}.
Consider the following transactions at an outdoor equipment store: {backpack, tent, bag,
pad}, {backpack, bag, pad, stove}, {bag, pad}, and {stove, teapot}. Find the confidence of the
association {bag} → {pad}.
An operator that maps an n-ary relation to the set of all elements of this relation that satisfy
a particular condition is called a
Suppose we have a relation R on the set { 1, 2, 3 } represented by the
matrix MR = [ ]
011111101 . Which of the following ordered pairs are in R?
Consider the following transactions at an outdoor equipment store: {backpack, tent, bag,
pad}, {backpack, bag, pad, stove}, {bag, pad}, and {stove, teapot}. Find the support of the
itemset {bag}.
Consider the following transactions at an outdoor equipment store: {backpack, tent, bag,
pad}, {backpack, bag, pad, stove}, {bag, pad}, and {stove, teapot}. Find the support of the
association {bag} → {pad}.
Which of the these properties does the relation on a set represented by the
matrix 101010101 101010101 have?
Which of the following matrices shows that (3, 2) belongs to the relation it
represents?
Which of the following properties does the relation represented by this directed graph
have?
Which of these statements are true for all relations R and S on the same finite
set?
For a directed graph G = (V, E), E is the set of ordered pairs from V × V that we call
Which of these ordered pairs are in the relation represented by the directed graph
shown?
Which of these statements are true about a relation and the directed graph that represents
it?
For a directed graph G = (V, E), an edge of the form (a, a) is called a
Based on the "greater than" relation on the integers, match the type of closure on the left
with the relation on the right that equals it.
If there are n edges for a path in a directed graph, we say that this path has n.
Suppose that R is a relation on a set of n elements. Which of these relations equals the
connectivity relation R∗�* (the relation that contains the pair (a,b) if and only if there is a
path of length at least one
from a to b in R)?
If the initial vertex of the first edge in the sequence is the same as the terminal vertex of the
last edge of the sequence, we call this sequence of edges a
Match the zero-one matrix representations of relations on the left with the matrices of their
transitive closures on the right.
Which of these statements about the directed graph that represents a relation must be
true?
Which of these properties must an equivalence relation have?
Match the pairs of strings of English letters on the left with the equivalence relation on the
right where the strings belong to the same equivalence class.
Put these steps in order, top to bottom, to prove that if Wk = [wi j[k]] is the n×n zero-one
matrix that has a 1 in its (i, j)th position if and only if there is a path from vi to vj with
interior vertices from the set {v1, v2, ..., vk}, then
wi j[k] = wi j[k – 1] ∨(wi k[k – 1] ∧wk j[k – 1])
whenever i, j, and k are positive integers less than or equal to n.
Which of these relations are equivalence relations on the set of nonzero integers?
Match each relation on the set of non-zero integers from the left with a reason it is not an
equivalence relation on the right
Which of these relations on the set of positive integers are partial orderings?
If a and b are elements of a poset (S, ≤), they are if either a ≤ b or b ≤ a.
Match the equivalence relations on the set of all nonempty bit strings below (left) with the
partitions of the set of all nonempty bit strings formed by their equivalence classes (right).
Put the steps in order, top to bottom, to prove that the principle of well-ordered induction,
as stated here, is valid.
Given a well-ordered set S, a statement P is true for all x ∊ S if: for all y ∊ S, if P(x) is true for
all x ∊ S with x < y, then P(y) is true.
Which statement describes the relation R on the set of all students in your school such that x R
y if x has a higher GPA than y?
Suppose that (A1, ≤1) and (A2, ≤2) are posets and ≤ is the lexicographic ordering on A1 × A2. Under
which of these hypotheses can we conclude that
(a1, a2) ≤ (b1, b2)?
Which of these statements are
correct?
Which of these statements about the poset ( { 3, 6, 8, 9, 10, 12, 16, 20}, | ) are
true?
Which of these statements are true about the poset with the Hasse diagram shown?
Using the lexicographic ordering on the set of strings, put these strings in increasing order (top to
bottom).
How many edges are in the Hasse diagram that represents the poset ( {1, 3, 4, 6, 8, 12, 16, 18}, | )?
Suppose that information in an organization can have an authority level of unclassified, confidential,
or secret (in increasing order of security) and compartments of New Jersey and Pennsylvania.
Information can flow from security class (A1, C1) into (A2, C2) if and only if A1 ≤ A2 and C1 ⊆ C2. Which
of these information flows are
allowed?
The set of tasks required to build a house form a partial ordering, where one task precedes a second
if the second task cannot be started until the first task has been completed. Which of the following
statements are
correct?
Which of the following are a compatible total ordering for the poset ( {1, 3, 5, 9, 10, 15, 20}, |
)?
Put the following steps in order (top to bottom) to construct an algorithm for topological sorting,
the process by which you create a compatible total ordering from a partial ordering.