Evaluate the summation:
SUMMATION i=1 to n=7 of (i)
28
State the contrapositive of the following:
"If you forget your breakfast, you will be tired and hangry"
If you are not tired and not hangry, then you did not forget your breakfast
This object allows you to connect data like chains or trees, but is rarely accessible from outside of its class.
Node
We are given the array:
[4, -2, 9, 12, -2, 5, 4, 77, -1, 12, 18, 4]
We decide to put the elements in a set.
How many elements are in the set?
8 elements
{4, -2, 9, 12, 5, 77, -1, 18}
Sets don't contain duplicates
In Java, what is the default value of an object reference declared as an instance variable?
Null
What is the closed form formula for
SUMMATION i=1 to n of (i2)
[(n)(n+1)(2n+1)]/6
Express this quantifier in English with an example of your choice
∃x∀yF(x, y)
There is a student in your class who has sent a message to every student in your class.
What is the smallest "number-holding" variable in Java that is not a boolean?
Byte
How many elements are in the power set of S if S has 7 elements?
27 = 128
What class pulls arbitrary integers from a range, when prompted?
Random
Given the following summation, state three things you can try to do to simplify the problem
SUMMATION i=6 to n=16 of (2*2i)
1) Change the bounds to start at i=1 or i=0
2) Use the closed form formula
3) Bring the constant 2 out front
State the truth value and give an example for x which supports your claim
∃x(x3 = -64), domain all real numbers
True
-4
What is the 7th prime number? (Do not count 1 as a prime number)
2, 3, 5, 7, 11, 13, 17
17
Consider the sets A={1, 2, 3, 6} and B={4, 7, 8}
Are these disjoint? Explain
Yes because they have no element in common.
What distinguishes weak induction from strong induction?
Strong induction has multiple base cases and weak induction has 1
1, 2, 6, 24, 120, _
What's the next term in the sequence?
Give a formula for the sequence
720
n!
State the truth value and give an example for x and y which supports your claim
∃x∃y(x + 2y = 2 ∧ 2x + 4y = 4)
True
x=-2
y=2
Rank the following functions by slowest growing to fastest growing:
1) g(x) = x*sqrt(x)
2) h(x) = (1/3)*x2
3) f(x) = 9x*log(x)*(x/2)
Slowest to fastest growing
1) g(x) = x*sqrt(x)
2) h(x) = (1/3)*x2
3) f(x) = 9x*log(x)*(x/2)
If C is a set such that C∪A=C and C∩B={}, what can you infer about sets A and B with respect to C?
1) A is a subset of C
2) B is disjoint from C
You can store a numeric value in a variable of this type, but whether you get one out is questionable.
char
Evaluate the summation:
SUMMATION i=2 to n=52 of (2)
102
Consider boolean variables A, B, C, D, and E.
Design a boolean expression that is true only when an odd number of the variables are true. You can use the logical operators AND, OR, and NOT to construct the expression.
((((A⊕B)⊕C)⊕D)⊕E)
The simplest way of computing matrix multiplication requires n3 operations where n is the rows and columns of the matrix. Computer scientist, Volker Strassen, discovered an algorithm to do it in only n2.807 operations. What year did he make this discovery? (do not google this, closest answer gets the points)
1969
Find the sets A and B if:
A – B = {1, 5, 7, 8}
B – A = {2, 10}
A ∩ B = {3, 6, 9}
A={1,5,7,8,3,6,9}
B={2,10,3,6,9}
According to many sources, which programming language is generally listed as the #1 most used? This includes across freelancing, industry, education, etc.
Javascript