cse 260 all quizzez/exams

Ace your homework & exams now with Quizwiz!

Justify each step in the following (partial) proof of that (p→q) ∨ (p→r) And P→q∨r are equivalent by using a series of logical equivalences. Choose the most important reason for each step by filling in the blanks with A, B, C, D, E, or F. They stand for the the following equivalence rules: A. Implication, B. Commutative laws, C. Associative laws, D. Distributive laws, E. de Morgan's laws, F. Double negation. (p→q) ∨ (p→r) ≡ (-p∨q)∨(-q∨r) _____ ≡-p∨q∨-p∨r _____ ≡-p∨-p∨q∨r _____ ≡(-p∨-p)∨q∨r _____ ≡-p ∨(q∨r) _____ ≡p→q∨r _____

(p→q) ∨ (p→r) ≡ (-p∨q)∨(-q∨r) (Distributive law according to CG) (Implication correct answer) ≡-p∨q∨-p∨r (Associative law) ≡-p∨-p∨q∨r (Commutative law) ≡(-p∨-p)∨q∨r (Associative law) ≡-p ∨(q∨r) (Idempotent law) ≡p→q∨r (Implication law) The most important reason for each step is: Distributive law (D) (A correct answer) Associative law (C) Commutative law (B) Associative law (C) Idempotent law (E) Implication law (A)

\sum _{i=1}^3\:\left(\sum _{j=-1}^1\:\left(i\:\cdot \:j\:-\:2\right)\right)

-18 CG was wrong, use symbolab

What is ⌊-2.5⌋

-3

If p→q is true, what must also be true?

-p→-q

Which of these propositions are true if the universe is ℕ (natural numbers)? 1. ∀x∃y(x³=y) 2. ∃y∀x(x³=y)

1 is true

Assume the function f: ℤ→ℤ is defined on the set of integers ℤ by f(n) = (1-n)². Which of the following is true? 1. f is not monotone 2. f is monotonically decreasing 3. f is monotonically increasing 4. f is injective

1. f is not monotone

In the following, we consider the statement false if it contains composition of functions that cannot be done in general, according to the definition of composition. Hint: pay attention to the domain and codomain of each function. Assuming that we have two functions f: B→A and g: B→B which of the following is true in general? 1. g∘(f∘f) is always well-defined 2. f∘(g∘g) is always well-defined 3. g∘(f∘g) is always well-defined 4. f∘(g∘f) is always well-defined

1. g∘(f∘f) is always well-defined

Which of these is the smallest for n=10000? 1000 20n n^2 2^n n!

1000

Which of these is the smallest for n=100? 1000 20n n^2 2^n n!

1000

original sum: \sum _{i=n}^{n+1}\:\left(\sum _{j=-2}^2\:\left(i\:+\:j\:+1\right)\right) sum when n = 1 \sum _{i=1}^2\:\left(\sum _{j=-2}^2\:\left(i\:+\:j\:+1\right)\right)

10n+15 CG was wrong, use symbolab, replace all n with 1 = 25 10(1)+15 = 25

How many rows are needed for a truth table with 4 variables?

14

What is the least common multiple of 48 and 36? 36 48 72 96 144

144

Let |S|=100, |T|=100, and |S∩T|=10. What is |S∪T|?

190

What is (-4 mod 3)?

2 -4/3 = -1 R -1 to get non-negative remainder add divisor (3) to remainder (-1) -1 + 3 = 2

What is |{{a,b}, {a,b,c}}|

2 (number of elements in main set)

If we know p→q is true, which of the following are also true? If p is false then q is also false If q is false then p is also false If q is true then p is also true All of the above None of the above

2. If p is false then q is also false

Find the specific solution to a(n) = 3a(n-1) +2n where a(1)=3. 1. a(n) = (3/2)3^n - n - (3/2) 2. a(n) = (11/6)3^n - n - (3/2) 3. a(n) = -n-(3/2) 4. a(n) = (5/6)3^n - n - (3/2) 5. a(n) = (1/3)3^n - n - (3/2)

2. a(n) = (11/6)3^n - n - (3/2) CG was wrong

What is the general solution to the recurrence relation a(n) = 3a(n-1) - 2a(n-2)? 1. a(n) = a(1)3^n + a(2)2^n 2. a(n) = a(1)2^n + a(2) 3. a(n) = a(1)(-2)^n + a(2) 4. a(n) = a(1)3^n + a(2)(-2)^n 5. a(n) = a(1)(-2)^n + a(2)(-1)^n

2. a(n) = a(1)2^n + a(2) CG was wrong

What is the GCD of 480 and 504? 4 6 16 24 48

24

At least how many basis cases do we need to have only one inductive case?

3

What is the least n (among those listed below) such that x²logx is O(x^n)

3

What is the basis for the odd pie fight described in the lecture notes (Slide 28)? 0 students 1 students 2 students 3 students This problem isn't solvable with induction

3 students

In the following, we consider the statement false if it contains composition of functions that cannot be done in general, according to the definition of composition. Hint: pay attention to the domain and codomain of each function. Assuming that we have two functions f: B→A and g: A→B which of the following is true in general? 1. f∘g is surjective if f is injective and g is surjective 2. f∘g is bijective if f is injective and g is surjective 3. g∘f is bijective if f is injective and g is surjective 4. g∘f is bijective if f and g are both bijective

4. g∘f is bijective if f and g are both bijective

What are the dimensions of multiplying a 4×5 matrix by a 5×4 matrix?

4x4

\sum _{n=1}^{100}n (symbolab) sum from i = 1 to 11 of i ∑_{n=1}^100 (n)

5050

\sum _{n=1}^3\:\left(\sum _{j=0}^2\:\left(n\:+\:j\:-\:2\right)\right) (symbolab) sum from i = 1 to 3 of (sum from j = 0 to 2 of ( i + j - 2)) ∑_{i=1}^3 (∑_{j=0}^2 (i+j-2))

9 (CG got it wrong before being corrected)

Which of the following numbers is composite? 11 -11 93 1 2

93

Inclusive or Exclusive Or? A: You must take Chemistry or Physics to graduate B: You can have a complimentary coffee or tea

A is inclusive, B is Exclusive

What can't you use to prove that two propositions are equivalent?

Examples

Assume the universe of discourse is {1,2}. T or F: ∀x((x=2) → (x≠2))

False

Assume the universe of discourse is {1,2}. T or F: ∃x(x=2) → (1=2)

False

If 2^n is prime then n is prime

False

True or False For integers n and m, if n ∤ m, gcd(n, m) = 1.

False

True or False: Considering integers, if p∤n and p∤m, then p∤nm

False

True or False: ∃m ∈ Z+ such that √n = O((log n)^m).

False (CG was wrong before being corrected)

⌊-3.14⌋ = -3

False (CG was wrong before being corrected)

True or False ∀x(x≥0 → x² > 0)

False (Chat GPT got this wrong the first time)

Consider the statements "If you pass Capstone then you can get an Engineering degree," and "If you get an Engineering degree, you can get a job." You conclude "If you pass Capstone then you can get a job." Which rule of inference did you use? Modus ponens Modus tollens Simplification Hypothetical syllogism None: the reasoning is fallacious

Hypothetical syllogism

Consider the statements "If you are in CSE 260, then you know propositional logic," and "You are in CSE 260." You conclude "You know propositional logic." Which rule of inference did you use? Modus ponens Modus tollens Simplification Hypothetical syllogism None: the reasoning is fallacious

Modus ponens

If you have 7n+1 appointments next week, how many must fall on the same day? (choose the largest that is valid for any positive n)

N+1 (CG said 7n-5 before being corrected)

Is P=NP a proposition?

Proposition of unknown truth

State rules for the steps in the (partial) proof for that if ∃x(P(x) → (Q(x) → -R(x))) and ∀x(P(x) ∧ Q(x)) are true, then -∀xR(x) is also true. Fill in the blanks with A, B, C, D, E, F, G, H, I, or J, which stand for A: Modus Ponens, B: Modus Tollens, C: Disjunctive Syllogism, D: Simplification, E: Resolution, F: Universal Instantiation, G: Universal Generalization, H: Existential Instantiation, I: Existential Generalization, and J: de Morgan. ∃x(P(x) → (Q(x) → -R(x))) (premise) P(c) → (Q(c) → -R(c)) ________ ∀x(P(x) ∧ Q(x)) (premise) P(c) ∧ Q(c) _______ P(c) (simplification) Q(c)→-R(c) _______ Q(c) (simplification) -R(c) _______ ∃x-R(x) (existential generalization) -∀xR(x) _______

The steps in the (partial) proof are: ∃x(P(x) → (Q(x) → -R(x))) (premise) P(c) → (Q(c) → -R(c)) (existential instantiation) ∀x(P(x) ∧ Q(x)) (premise) P(c) ∧ Q(c) (universal instantiation) P(c) (simplification) Q(c)→-R(c) (modus ponens using 2 and 5) Q(c) (simplification) -R(c) (modus ponens using 6 and 7) ∃x-R(x) (existential instantiation from 8) -∀xR(x) (de Morgan's law using 9) Existential instantiation (H) Universal instantiation (F) Simplification (D) Modus ponens (A) Simplification (D) Modus ponens (A) Existential instantiation (H) de Morgan's law (J)

Which of the following sets are uncountable? ∅ {ℝ, ℚ, ℤ} {ℚ} ℤ × ℤ

They are all countable

Assume the universe of discourse is {1,2}. T or F: ∀x(x=1) → (2=1)

True

Assume the universe of discourse is {1,2}. T or F: ∃x((x=1) ∧ (x≠2))

True

Consider functions g : A → B and f : B → C.If f ◦ g is onto (surjective), then f must also be onto (surjective).

True

If f (n) is Θ(g(n)) then g(n) is Ω(f (n))

True

True or False 14 ≡ 44 (mod 5).

True

True or False ∀x(x<0) → ∀x(x³ ≥ 0)

True

True or false: If A ⊂ B, then their cardinalities satisfy |A| ≤ |B|.

True

Truth value of "If 2+2=5 then unicorns are real"?

Truth

What can you use to prove that two propositions are equivalent?

Truth tables, equivalence rules

What can you use to prove that two propositions are not equivalent?

Truth tables, equivalence rules, counterexample to their equivalence

If A is the Boolean matrix representing whether direct flights between pairs of cities exists, what is A^[n]? The number of ways to get from each pair of cities The number of ways to get from each pair of cities in exactly jumps Whether there exists an itinerary between each pair of cities in exactly jumps Whether there exists an itinerary between each pair of cities in at most jumps

Whether there exists an itinerary between each pair of cities in exactly jumps

\begin{pmatrix}-b&a\\ \:0&b\end{pmatrix}\begin{pmatrix}a&0\\ \:b&-a\end{pmatrix}

\begin{pmatrix}0&-a^2\\ b^2&-ba\end{pmatrix} use symbolab

Assume all variables as positive integers. Given a≡2n-2 (mod 7) and b≡3n+1 (mod 7) which of the following is true in general? a+4b≡2 (mod 7) a+4b≡2n+2 (mod 7) a+4b≡6n-3 (mod 7) a+4b≡5n+1(mod 7)

a+4b≡5n+1(mod 7) used CG

Let g(s) be the function mapping current student s to their PID. g is ... (assuming the codomain is the set of PIDs of current students) Select the most restrictive type.

bijective

Assume the function f: ℤ→ℤ is defined on the set of integers ℤ by f(n) = n³. Then: 1. f is injective 2. f is surjective 3. f is bijective 4. f is neither injective nor surjective

f is injective CG was wrong

Assume the universe of discourse is {1,2}. T or F: ∀x∃y(x+y=1)

false

The universe of discourse is the set of all real numbers ℝ True or False? 3∈{0,1,{2,3}} True or False? 2∈{0,1,{2,3}}

false for both

Given f(n) = n²logn + 2^n√n which of the following functions would satisfy f(n) is O(g(n))? g(n) = 2^n g(n) = e^n g(n) = n²logn g(n) = n³

g(n) = e^n CG was wrong, found on chegg

What is the cardinality of ℕ?

infinite

What is the (smallest) basis for the triominoes problem?

k=0

For the traveling salesman problem, how many possible tours are there for n cities?

n!

Which of these is the smallest for n=5? 1000 20n n^2 2^n n!

n^2

Let f(s) be the function mapping student to their Quiz 1 score. f is in general ... (assuming the codomain is the set of all possible scores for Quiz 1)

not one-to-one, onto or bijective

Let S = {Mon, Tues, Wed, Thurs, Fri, Sat, Sun}. What is |P(S)|?

|P(S)| = 2^7 = 128

Recall that ℕ is the set of natural numbers, ℤ is the set of integers, ℚ is the set of rational numbers and ℝ is the set of real numbers. Which of the following order of cardinality is true? |ℤ×ℤ|=|ℚ|<|ℝ| |ℤ|<|ℚ×ℚ|=|ℝ| |ℕ|<|ℤ×ℤ|=|ℝ| |ℤ×ℤ|<|ℚ|=|ℝ|

|ℤ×ℤ|<|ℚ|=|ℝ| |ℤ| = |ℤ×ℤ| < |ℚ| = |ℝ|

What is the set ℤ+ if the universe is all integers?

ℤ+ = {1, 2, 3, 4, ...} All positive integers

State rules for the steps in the (partial) proof for that if ∃x(P(x)→Q(x)∨R(x)) , and ∀x(P(x) ∧ -Q(x)) are true, then ∃xR(x) is also true. Fill in the blanks with A, B, C, D, E, F, G, H, I, or J, which stand for A: Modus Ponens, B: Modus Tollens, C: Disjunctive Syllogism, D: Simplification, E: Resolution, F: Universal Instantiation, G: Universal Generalization, H: Existential Instantiation, I: Existential Generalization, and J: de Morgan. ∃x(P(x)→Q(x)∨R(x)) (premise) P(c) → Q(c) ∨ R(c) _______ ∀x(P(x) ∧ -Q(x)) (premise) P(c) ∧ -Q(c) _______ P(c) (simplification) Q(c) ∨ R(c) _______ -Q(c) (simplification) R(c) _______ ∃xR(x) _______

∃x(P(x)→Q(x)∨R(x)) (premise) P(c) → Q(c) ∨ R(c) (existential instantiation) H ∀x(P(x) ∧ -Q(x)) (premise) P(c) ∧ -Q(c) (universal instantiation) F P(c) (simplification) Q(c) ∨ R(c) (modus ponens) A -Q(c) (premise) R(c) (disjunctive syllogism) C ∃xR(x) (existential generalization)


Related study sets

Black Swans - The impact of the highly improbable

View Set

Artificial Intelligence CH. 1 Study Guide

View Set

Discrete Mathematics - Chapter 6: Set Theory

View Set

Revision file 4 : future perfect and future continuous; zero and first conditionals, future time clauses (with all present and future forms)

View Set

Medical Terminology - Final Review

View Set