Summations
Propositional Logic
Who Knows What's In Here
(Double Points)
Set Theory
Mostly Java
100

Evaluate the summation:

SUMMATION i=1 to n=7 of (i)

28

100

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

100

According to many sources, which programming language is generally listed as the #1 most used? This includes across freelancing, industry, education, etc.

Python

100

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 and what are they?

8 elements

{4, -2, 9, 12, 5, 77, -1, 18}

Sets don't contain duplicates

100

In Java, what is the default value of an object reference declared as an instance variable?

Null

200

What is the closed form formula for

SUMMATION i=1 to n of (i2)

[(n)(n+1)(2n+1)]/6

200

Express this English statement using logical propositions.

If berries are ripe along the trail, hiking is safe if and only if grizzly bears have not been seen in the
area.

p: Berries are ripe along the trail

q: Hiking is safe.

r: Grizzly bears have not been seen in the area.

Answer: p -> (q <=> r)

200

What distinguishes weak induction from strong induction?

Strong induction has multiple base cases and weak induction has 1

200

How many elements are in the power set of if S has 7 elements?

27 = 128

200

What Java class pulls arbitrary integers from a range, when prompted?

Random

300

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

300

Draw a truth table for the following propositional statement:

!(p -> q) XOR (q -> r)

Be sure to have all necessary columns.

p | q | r | p->q | !(p->q) | (q->r) | !(p->q)XOR (q->r)

T   T   T      T           F           T                     T               

T   T   F      T           F           F                     F             

T   F   T      F           T           T                     F             

T   F   F      F           T           T                     F             

F   T   T      T           F           T                     T               

F   T   F      T           F           F                     F               

F   F   T      T           F           T                     T               

F   F   F      T           F           T                     T              

300

What is the 7th prime number? (Do not count 1 as a prime number)

2, 3, 5, 7, 11, 13, 17

17

300

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.

300

What is the smallest "number-holding" variable in Java that is not a boolean?

Byte

400

1, 2, 6, 24, 120, _

What's the next term in the sequence?

Give a formula for the sequence

720

n!

400

Provide an example in English of the following propositional statement:

!r -> (p XOR q)

Example: Unless I am trying to type something, my cat is either eating or sleeping.

p: My cat is eating.

q: My cat is sleeping.

r: I'm trying to type.

400

Who was the first computer programmer?

Ada Lovelace

400

If is a set such that CA=C and CB={}, what can you infer about sets A and B with respect to C?

1) A is a subset of

2) is disjoint from C

400

This object allows you to connect data like chains or trees, but is rarely accessible from outside of its class.

Node

500

Evaluate the summation:

SUMMATION i=2 to n=52 of (2)

102

500

Translate the following statement into a logical expression with quantifiers: "There is no greatest natural number."

¬∃x∈N, ∀y∈N (y≤x) 

500

The simplest way of computing matrix multiplication requires noperations 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

500

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}

500

You can store a numeric value in a variable of this type, but whether you get one out is questionable.

char