Exam 2

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

If f is a function from A to B, and f(a) = b, what is the image?

b is the image of a

What is the other name for a one-to-one and onto function?

bijective or one-to-one correspondence

What is the sum formula for the sum of terms of an arithmetic progression?

the sum (from k = 1 to n) of k

What is the power set of {0,1,2}?

𝒫({0,1,2}) = {∅,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}}

What is the power set of {∅}?

𝒫{∅} = {∅,{∅}}

What is the closed formula for the sum of terms of an arithmetic progression?

(n(n + 1)) / 2

What is ∣∅∣?

0

What are the growth functions commonly used in Big-O estimates from slowest growing to fastest growing?

1, log n, n, n log n, n^2, 2^n, n!

If f is a function from A to B, what is the codomain?

B is the codomain of f. The codomain is the set of all possible values of such a function (that is, all elements of B)

If a set has n elements, how many elements does its power set have?

2^n

What does the halting problem take as input?

A computer program, and the input to that computer program

What is a set with one element called?

A singleton set

What is the cartesian product A x B where A = {1,2} and B = {a,b,c}?

A x B = {(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}

What is the cartesian product A x B x C where A = {0,1}, B = {1,2}, and C = {0,1,2}?

A x B x C = {(0,1,0),(0,1,1),(0,1,2),(0,2,0),(0,2,1),(0,2,2),etc.}

What is a recurrence relation?

An equation that expresses a sub_n in terms of one or more of the previous terms of the sequence, namely, a sub_0, a sub_1, ..., a sub_n−1, for all integers n with n ≥ n0, where n0 is a nonnegative integer

What is the formula for Big-O in word form?

Beyond some point k, function f is at most a constant c times g

Suppose f is a function from A to B, how do you show f is surjective?

Consider an arbitrary element y ∈ B and find and element x ∈ A such that f(x) = y

If the Universal set U has been specified, what does the compliment of set A with respect to U mean? Also, how it is denoted?

Everything that is in U, and not in A. A with bar over it

True or False: an ordered n-tuple is an unordered collection of distinct objects, called elements

False

True or False: for all constants c > 0, O(cf) = O(f + c) != O(f - c) != O(f)

False

True or False: if g is an element of O(f) and h is an element of O(f), then g + h is an not an element of O(f)

False

True or False: if g is an element of O(f_1) and h is an element of O(f_2), then g * h is not an element of O(f_1 * f_2)

False

True or False: if g is an element of O(f_1) and h is an element of O(f_2), then g + h is not an element of O(f_1 + f_2) = O(max(f_1 , f_2))

False

True or False: a set is an ordered collection of distinct objects, called elements

False...unordered...ordered is an ordered n-tuple

Suppose f is a function from A to B, how do you show f is not surjective?

Find a particular y ∈ B such that f(x) != y for all x ∈ A

Suppose f is a function from A to B, how do you show f is not injective?

Find particular elements x, y ∈ A such that x != y and f(x) = f(y)

What is the power set?

Given a set S, the power set of S is the set of all subsets of the set S. The power of set S is denoted by 𝒫(S)

If f is a function from A to B, what is the range?

It depends. The range is the set of all values of f(a) for a ∈ A, and is always a subset of the codomain

What does the halting problem output?

It outputs whether or not the given program will eventually stop given the program input

Are these two sets equal: {1,2,3,5} and {3,3,3,1,5,5,5,5,5,5}?

No

Suppose f is a function from A to B, how do you show f is injective?

Show that if f(x) = f(y) for arbitrary x, y ∈ A, then x = y

What is the difference between the codomain and the range, and how do they relate?

The codomain is the set of possible values of the function, and the range is the set of all elements of the codomain that are achieved as the value of f for at least one element of the domain. The number of elements in the codomain is always larger than or equal to the number of elements in the range.

If A and B are sets. What is A - B?

The compliment of B with respect to A. The set containing those elements that are in A, but not in B

What are the two sets that every non-empty set is guaranteed to have?

The empty set and the set itself

What is the range of f also called?

The image

Why don't we use number of statements to measure an algorithm's efficiency?

The number of statements vary with programming languages as well as style of the individual programmer

If A and B are sets. What is the compliment of B with respect to A?

The set containing those elements that are in A, but not in B

What is the ceiling function, and what is its symbol?

The symbol is brackets with no bottom part (⌈x⌉). The ceiling function assigns to the real number x the largest integer that is greater than or equal to x.

What is the floor function, and what is its symbol?

The symbol is brackets with no top part (⌊x⌋). The floor function assigns to the real number x the largest integer that is less than or equal to x.

What is the formula for Big-O in formula form?

There exists two constants c and k such that f(x) <= g(x) for all x larger than k

Why don't we use time to measure an algorithm's efficiency?

Time is dependent on machine specifics

True or False: a set is an unordered collection of distinct objects, called elements

True

True or False: an ordered n-tuple is an ordered collection of distinct objects, called elements

True

True or False: for all constants c > 0, O(cf) = O(f + c) = O(f - c) = O(f)

True

True or False: if g is an element of O(f) and h is an element of O(f), then g + h is an element of O(f)

True

True or False: if g is an element of O(f_1) and h is an element of O(f_2), then g * h is an element of O(f_1 * f_2)

True

True or False: if g is an element of O(f_1) and h is an element of O(f_2), then g + h is an element of O(f_1 + f_2) = O(max(f_1 , f_2))

True

What is the principle of inclusion-exclusion?

When finding the union of two sets, count the elements that are in A OR B once each, and the elements that are in both A AND B once total. Will be important when finding cardinality

Are these two sets equal: {1,3,5} and {3,1,5}?

Yes

Are these two sets equal: {1,3,5} and {3,3,3,1,5,5,5,5,5,5}?

Yes

If f is a function from A to B, and f(a) = b, what is the pre-image?

a is the pre-image of b

What is the form of an arithmetic progression?

a, a + d, a + 2d, ... , a + nd

What is the form of a geometric progression?

a, ar, ar^2, ... , ar^n

What is the term when the intersection of two sets is empty?

disjointed

Is the range of fog the image of the range of ∈ with respect to the function f or g?

f

Let g be a function from the set A to the set B and let f be a function from the set B to the set C. With an equation, what is the composition of functions f and g?

fog = f(g(a))

Let g be a function from the set A to the set B and let f be a function from the set B to the set C. In words, what is the composition of functions f and g?

fog is the function that assigns to the element a of A the element assigned by f to g(a)

Is the domain of fog the domain of f or g?

g

What is the closed form for the sum of terms of a geometric progression?

https://imgur.com/0SCsIgW

What is summation grouping?

https://imgur.com/CNfbMJE

What is the sum formula for the sum of terms of a geometric progression (such sums are called a geometric series)?

https://imgur.com/FOZaqcF

What is summation index shifting?

https://imgur.com/bgybXcI

What is summation order reversal?

https://imgur.com/q5RuMPz

What is summation series splitting?

https://imgur.com/qHrXRW8

What are the summation manipulations?

index shifting, series splitting, order reversal, grouping

What is the other name for a one-to-one function?

injective

What are the growth functions commonly used in Big-O estimates from fastest growing to slowest growing?

n!, 2^n, n^2, n log n, n, log n, 1

What is the other name for an onto function?

surjective

What is the difference between ∅ and {∅}?

∅ is the empty set (null set), and {∅} is a singleton set whose one element is the empty set itself


Ensembles d'études connexes

Basic Formulas and Functions Lessons 1-4

View Set

Understanding Agile Fundamentals

View Set

Social Studies: The Second Industrial Revolution Quiz

View Set

How the Earth Was Made: Deepest Place on Earth Video Questions

View Set