CSCE 222 Midterm 1 (Quiz 1-5 questions)
Consider the congruence modulo 4 relation x ≡ y (mod4) on the set of integers. Which one of the following is not contained in the equivalence class [−1] ? A) −5 B) −1 C) All are contained D) 9 E) 3
D) 9
Match the boolean formula to its logically equivalent pair. (1) not (A implies B) (2) A implies (not B) (3) A implies B (4) (not A) implies B A) (not A) or (not B) B) (not A) or B C) A and (not B) D) A or B
(1) → C (2) → A (3) → B (4) → D
For all boolean formulas A and B, we have {A, A → B} ⊨ B. Which one of the following is not a correct statement regarding the above statement? A) (A ∧ (A → B)) → B can be false B) It expresses the validity of Modus Ponens C) All four statements are correct D) Given the valuations v(A) and v(A → B) are both true, the valuation v(B) is true. E) B is a logical consequence of {A, A → B}
A) (A ∧ (A → B)) → B can be false
You want to negate the range check of a variable x (x < 12) or (x ≥ 21) What is the proper formulation? A) (x ≥ 12) and (x < 21) B) (x > 12) and (x ≤ 21) C) None of the given choices is the proper formulation D) (x > 12) and (x < 21) D) (x > 12) or (x < 21) E) (x > 12) or (x ≤ 21) F) (x ≥ 12) or (x < 21)
A) (x ≥ 12) and (x < 21) Remember De Morgan's Law, -(A ∨ B) ≡ -A ∧ -B
Consider the graph G = (V, E) where V = {a, b, c, d} and E = {{a, b}, {a, d}, {b, c}, {b, d}}. Choose all that apply. The sequence of visits a → d → b → c is a ________. A) A walk B) None of the four choices C) A Path D) A Hamiltonian Cycle E) A Hamiltonian Path
A) A walk C) A Path E) A Hamiltonian Path Definitions: - A walk is a sequence of edges e1,...,ek in E such that ei = {vi, vi+1} - A path is a walk with pairwise distinct vertices. - A Hamiltonian path is a path that visits every vertex of the graph exactly once. - A Hamiltonian cycle must visit every vertex of the graph exactly once.
The statement "Given the premises A ∨ B and ¬A ∨ C, we can conclude __________" can be written as {A ∨ B,¬A ∨ C} ⊨ __________. Which one of the following can go in to the underlined space? A) B ∨ C B) B → C C) B D) C E) B ∧ C F) A
A) B ∨ C
Which of the following are logically equivalent to A → B? Choose all that apply. A) B ∨ ¬A B) A ∨ ¬B C) B → A D) ¬B → ¬A
A) B ∨ ¬A B) A ∨ ¬B D) ¬B → ¬A
Theorem: If n is an odd integer, then it is the difference between two perfect squares. To prove the theorem, we start with the definition of n being an odd integer. Then, deduce that it is expressed as the difference between two perfect squares. What proof method are we using? A) Direct proof B) Proof by contraposition C) Proof by counterexample D) Proof by contradiction
A) Direct proof
Which one of the following is not a correct statement? Incorrect answer: A) Let A be a set and P(A) its power set. Then ∣A∣ < ∣P(A)∣. B) A set A satisfying ∣A∣ ≤ ∣N0∣ is a countable set. C) Suppose that A and B are countable sets. Then A × B is a countable set. D) Let A be a set and P(A) its power set. There exists a surjection from A onto P(A)
A) Let A be a set and P(A) its power set. Then ∣A∣ < ∣P(A)∣.
What rule of inference is used in the formal system H? A) modus ponens B) none of the given choices C) hypothetical syllogism D) resolution rule E) contradiction rule F) disjunction syllogism G) modus tollens
A) Modus Ponens
How many closed knight's tours are there on an 8x8 chessboard? A) More than 26 trillion B) Only one C) 64 D) More than 10 but not more than 1000 E) None
A) More than 26 trillion
Theorem: If n² is an even integer, then n is an even integer. To prove the theorem, we start with supposing that n is not an even integer, that is, n is an odd integer. Then, deduce that n² is an odd integer. What proof method are we using? A) Proof by contraposition B) Proof by counterexample C) Direct proof D) Proof by contradiction
A) Proof by contraposition
Which of the following is a true statement? A) The equivalence "A ↔ B" is true if and only if A and B have the same truth value. B) In the implication "A implies B", if the hypothesis A is false, then we say that the implication "A implies B" is vacuously false. C) If x is a real number, then "0 ≤ x and 0 ≥ x" is always true. D) In the implication "A implies B", if the hypothesis A is false and the conclusion B is false, then "A implies B" ought to be false. E) In the implication "A implies B", if the hypothesis A is true, then "A implies B" ought to be true (regardless of the truth value of B). F) All of the given statements are false
A) The equivalence "A ↔ B" is true if and only if A and B have the same truth value.
f: Z→N0 g: N0→R. The function type of the composition g∘f is: Correct answer: A) Z → R B) R → Z C) Z → N0 D) R → N0 E) N0 → Z F) N0 → R
A) Z → R
Let Z be the set of integers. The proper subset (⊂) relation on the power set of integers P(Z)) is __________. A) asymmetric and antisymmetric B) neither asymmetric nor antisymmetric C) asymmetric but not antisymmetric D) not asymmetric but antisymmetric
A) asymmetric and antisymmetric Definitions: -Asymmetric: for all x, y ∈ Z, (x,y) ∈ Z implies (y,x) ∈ R -Antisymmetric: for all x, y ∈ Z, xRy and yRx implies x = y
Let Z be the set of integers and N0 be the set of nonnegative integers. The function f: Z → N0 given by f(x) = ∣x∣ is __________. A) bijective B) surjective but not injective C) not a function D) injective but not surjective E) surjective but not injective F) neither injective nor surjective
A) bijective
Let N1 be the set of positive integers. f: N1 → N1 given by f(x) = x + 1 is __________. A) injective but not surjective B) not a function C) bijective D) surjective but not injective E) neither injective nor surjective
A) injective but not surjective
Let a relation R = {(1,2), (2,3), (3,4)} on {1, 2, 3, 4}. What properties does R satisfy? Choose all that apply. A) irreflexivity B) asymmetry C) transitivity D) symmetry E) antisymmetry F) reflexivity
A) irreflexivity B) asymmetry E) antisymmetry
Choose all that apply. Which of the following is (are) contained in P( { {∅} , {a} } ) ? A) { {a} } B) {a} C) {∅} D) a E) ∅ F) { {∅} } G) { {∅} , {a} }
A) { {a} } E) ∅ F) { {∅} } G) { {∅} , {a} }
Let A = {x ∈ Z ∣ x ≥ 100} and B = {x ∈ Z ∣ x < 1000}. Which one of the following numbers is not in the set A △ B ? A) 99 B) 100 C) 1001 D) All are in the set E) 1000 F) 0
B) 100
Which of the following is not a correct statement? A) Let S be a set. Then, ∅ ⊆ S. B) ∅ ∈ {∅} C) ∅ ∈ ∅ D) ∅ ⊆ ∅
C) ∅ ∈ ∅
Theorem: For all positive real numbers x and y, if x > y, then x² > y². To prove the theorem, we start with assuming that there exists positive real numbers x and y such that (x > y) ∧ (x² ≤ y²). After some algebraic manipulation however, we reach the state that there does not exist such positive real numbers x and y that satisfy both (x > y)∧(x ≤ y) at the same time. What proof method are we using? A) Proof by counterexample B) Proof by contradiction C) Direct proof D) Proof by contraposition
B) Proof by contradiction
This problem concerns the Knights and Knaves problem. Suppose you meet on the island two people A and B. Person A says "I am a knave but B is not." To find out the true identity of A and B (whether knight or knave), as a first step, let TA be the statement "A is a knight" and TB be the statement "B is a knight". Now, you are to create a truth table to find out the true identity of A and B, and so you need to find out which rows of the truth table gives the following statement true: ( ? ) ( A's statement ) What must go in the ( ? ) part? A) TA ∨ TB B) TA C) A D) TA ∧ TB E) TB F) B
B) TA If TA is true, then A is a knight, thus whatever A says must be true. If TA is false, then it means that A is a knave, so whatever A says must be false.
Which of the following is a true statement? A) The equivalence A ↔ B is a tautology. B) The equivalence of A ↔ B is satisfiable. C) The equivalence A ↔ B is true if and only if A and B are both true. D) None of the four statements are true E) The negation of A ↔ B is always false.
B) The equivalence of A ↔ B is satisfiable. Definition: A boolean formula is satisfiable if and only if v[A] = T holds for some valuations v.
Which of the following is a true statement? A) There exists a closed Knight's tour on a 4x4 chessboard. B) There exists an open Knight's tour on a 3x4 chessboard. C) None of the given statements are true. D) There exists an open Knight's tour on a 4x4 chessboard. E) There exists a closed Knight's tour on a 3x4 chessboard.
B) There exists an open Knight's tour on a 3x4 chessboard. A knight's tour is closed if the end square of the knight's tour is within a knight's move of the beginning square.
Let N0 be the set of nonnegative integers and N1 the set of positive integers. The function f: N0 → N1 given by f(x) = x + 1 is __________. A) not a function B) injective but not surjective C) surjective but not injective D) neither injective nor surjective E) bijective
B) injective but not surjective
Let Z be the set of integers. The proper subset (⊂) relation on the power set of integers P(Z)) is __________. A) neither reflexive nor irreflexive B) not reflexive but irreflexive C) reflexive and irreflexive D) reflexive but not irreflexive
B) not reflexive but irreflexive
Which of the following is logically equivalent to ¬∃x∀y(P(x,y) → Q(x,y)) A) ∀x∀y(P(x,y) → Q(x,y)) B) ∀x∃y(P(x,y) ∧ ¬Q(x,y)) C) ∃x∃y(¬Q(x,y) → ¬P(x,y)) D) ∀x∃y(¬P(x,y) ∨ Q(x,y)) E) None of the given choices F) ∃x∀y(P(x,y) ∧ ¬Q(x,y)) G) ∃x∀y(¬Q(x,y) → ¬P(x,y)
B) ∀x∃y(P(x,y) ∧ ¬Q(x,y))
Below is a formal proof in the formal system H of the following claim: { A → ( B → C ), B } |-H A → C The formal system H uses the three axioms A1, A2, and A3, and the inference rule R1. A1. A → ( B → A ), A2. ( A → (B → C)) → ((A → B) → (A → C)), A3. (¬B → ¬A) → (A → B). Proof: (comments are in [ ]) (1) B [ premise ] (2) A → (B → C) [ premise ] (3) (A → (B → C)) → ((A → B) → (A → C)) [ by A2 ] (4) [Blank 1] [ by R1 (2), (3) ] (5) [Blank 2] [ by A1 ] (6) A → B [ by R1 (1), (5) ] (7) A → C [ by R1 (6), (4) ] What can go into [Blank 1] and [Blank 2] in the proof?
Blank 1: (A → B) → (A → C) Blank 2: B → (A → B)
Let A and B be nonempty subsets of the universe U such that A and B are not disjoint. Which one of the following sets is not the same as the others? A) A ∩ B^C B) U − (A^C ∪ B) C) A ∩ (A ∪ B) D) A − B E) All are the same F) A ∩ (U − B) G) A − (A ∩ B)
C) A ∩ (A ∪ B)
Theorem: For all positive real numbers x and y, if x > y, then x² > y². To prove the theorem, we assume that x² ≤ y², and deduce x ≤ y. What proof method are we using? A) Proof by counterexample B) Proof by contradiction C) Proof by contraposition D) Direct proof
C) Proof by contraposition
Which one of the following is not a total order? A) The identity relation = on a set S, where ∣S∣=1. B) The natural order ≤ on the set R of real numbers. C) The divisibility relation on the set of positive integers. D) The natural order ≤ on the set {1,2,...,n} of the first n natural numbers.
C) The divisibility relation on the set of positive integers.
Choose all that apply. Let N0 be the set of nonnegative integers. Which of the following has the same cardinality as N0? A) The subset of real numbers R − {0} B) The set of real numbers R C) The set of positive integers N1 D) The set of odd integers E) The power set of N0 F) The set of integers Z
C) The set of positive integers N1 D) The set of odd integers F) The set of integers Z
Two sets A and B are said to have the "same cardinality" or are "equipotent" if and only if there exists __________ from A onto B. A) a surjective function B) an injective function C) a bijective function D) an inverse function
C) a bijective function
Given a function f: A → B, the inverse relation f^{-1} is a function from ran(f) to A if and only if f is __________ . A) an identity function B) a constant function C) an injective function D) a surjective function
C) an injective function
Fill in the underlined space: A (An) __________ or propositional function is a function that has propositions as its return values. A) definition B) property C) predicate D) function E) axiom
C) predicate
Let A and B be subsets of positive integers, where A contains multiples of 3 and B contains multiples of 5. Which of the following describes A △ B ? A) set of positive integers that are multiples of 15 but not multiples of 3 nor 5 B) set of positive integers that are multiples of 5 or 15 but not multiples of 3 C) set of positive integers that are multiples of 3 or 5 but not multiples of 15 D) set of positive integers that are multiples of 3 or 15 but not multiples of 5
C) set of positive integers that are multiples of 3 or 5 but not multiples of 15
Fill in the underlined space: ¬(A ∨ B) ≡ __________ A) ¬A ∨ B B) ¬A ∨ ¬B C) ¬A ∧ ¬B D) None of the given choices E) ¬A ∧ B
C) ¬A ∧ ¬B
Theorem: If n² is an even integer, then n is an even integer. To prove the theorem, we start with supposing that for some integers, n² is an even integer, but n is not an even integer, that is, n is an odd integer. However, n being odd yields that n^² is an odd integer, thus reaching the state that (n² is even) ∧ (n² is odd). What proof method are we using? A) Proof by contraposition B) Direct proof C) Proof by counterexample D) Proof by contradiction
D) Proof by contradiction
Which one of the following is not an equivalence relation? A) The identity relation = on a set S B) The relation "has the same birthday as" on the set of people C) The "congruence modulo 7" relation on the set of integers D) The relation "have a common prime factor" on the set of positive integers ≥ 1 E) The relation "has the same string length as" on the set S, where S is the set of strings over an alphabet A
D) The relation "have a common prime factor" on the set of positive integers ≥ 1
Let H(s, c) denote the predicate that the student s owns the computer c. Which one of the following expresses the statement that every student owns at least one computer? A) none of the given choices B) ∀c∃sH(s,c) C) ∃c∀sH(s,c) D) ∀s∃cH(s,c) E) ∃s∀cH(s,c)
D) ∀s∃cH(s,c)
Let S be the family of sets {A, B, C} where A = {1, 2}, B = {2, 3}, and C = {1, 3}. Determine S⋂S. A) {1, 3} B) {3} C) {1} D) ∅ E) {2} F) {2, 3} G) None of the given choices H) {1, 2, 3} I) {1, 2}
D) ∅
Which of the following is a correct statement regarding the three boolean formulas below? (1) A ∨ ¬A (2) A ∧ ¬A (3) A ∨ B A) All three are neither tautologies nor satisfiable B) All three are tautologies C) (2) is satisfiable D) Both (1) and (3) are tautologies E) (1) is a tautology F) All three are satisfiable
E) (1) is a tautology Definition: A boolean formula A is called a tautology if and only if v[A] = T ∀ valuations v.
Let Z be the set of integers and Ak = {x ∈ Z ∣ x ≤ 2k}. Also, let S={Ak ∣ k ∈ Z, 1 ≤ k ≤ 2021}. Determine S ⋃ S. A) Set of even integers ≤ 2021 B) Set of positive integers ≤ 2021 C) Z D) Set of positive integers ≤ 4042 E) Set of integers ≤ 4042 F) None of the given choices
E) Set of integers ≤ 4042
Let Z be the set of integers. The function f: Z → Z given by f(x) = ∣x∣ is __________. A) surjective but not injective B) not a function C) injective but not surjective D) neither injective nor surjective E) bijective
E) bijective
In the knight graph of a chessboard, which one of the following is not an edge? If all of the given sets are edges, then choose "All are edges in the knight graph". A) All are edges in the knight graph B) {b2, d3} C) {c3, d1} D) {c1, a2} E) {b1, c2}
E) {b1, c2}
Let P = {1, 2, 3, 4} be a set partially ordered by the relation ≼ = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (4,4)}. Which one of the following is not part of the cover relation (that is, there is no edge between the two numbers in the Hasse diagram)? A) (1,2) C) All of the four pairs are contained in the cover relation. D) (2,4) E) (2,3) F) (1,3)
F) (1,3) Cover relation and Hasse diagram omit edges representing reflexivity and transitivity. (1,2) is inferred by the transitivity using (1,2) and (2,3).
True or false: There is an injective mapping from S = {0,1,...,n-1} onto a proper subset of S.
False
Knights and Knaves: Suppose you meet on the island two people A and B. Person A says "I am a knave but B is not." To find out the true identity of A and B (whether knight or knave), as a first step, let TA be the statement "A is a knight" and TB be the statement "B is a knight". Which one of the following is a correct formulation of A's statement ("I am a knave but B is not")? A) ¬TA ∨ ¬TB B) A ∧ B C) TA ∧ ¬TB D) ¬A ∨ B E) A ∨ ¬B F) ¬TA ∧ ¬TB G) ¬TA ∧ TB H) TA ∧ TB I) ¬A ∧ B
G) ¬TA ∧ TB
Is the following boolean formula true or false? (A ∧ F) → (A ∨ T)
True
True or false: One can express any logical operations involving disjunction, conjunction, and negation using only the set of operators {¬,→}.
True