cpe-assign-2-cpe-answer-key (1)

pdf

School

Dallas County Community College *

*We aren’t endorsed by this school

Course

PHYS1404

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

28

Uploaded by MateBookWaterBuffalo153

Report
CPE Assign 2 - CPE ANSWER KEY BS computer engineering (Mapúa University) Studocu is not sponsored or endorsed by any college or university CPE Assign 2 - CPE ANSWER KEY BS computer engineering (Mapúa University) Studocu is not sponsored or endorsed by any college or university Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
1. Which of the following sentences are propositions? 2. Select all statements that represent the negation of the proposition "Juan went to Florida." 3. Which of the following English sentences represents p q where p is "Bill has an Android phone" and q is "Sruti does not have an Android phone"? Select all that are correct. 4. Which of the following English sentences represents p q where p is "The cat is on the mat" and q is "The dog is outside"? 5. Which of the following English sentences represents p q where p is "The cat is on the mat" and q is "The dog is outside"? 6. Which of the following English sentences use or with an inclusive meaning? (Select all that are correct.) Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
7. Match the sentence with the correct classification. 8. Match the English sentence with its negation. 9. Match each English sentence with the correct form on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10. Categorize each English sentence according to its correct logical representation, where p is "Karthik has my copy of the AI textbook" and q is "Sruti has my copy of the AI textbook." 11.Which of the following sentences use or with an exclusive meaning? (Select all that are correct.) 12.Which of these is a proposition? 13.The sentence "Zaid does not have a newborn baby" is the _____________ of the statement “Zaid has a newborn baby.” 14. Consider the propositions p and q , where p is "You can paddle one canoe down the river" and q is "You can paddle one kayak down the river." Which proposition expresses "You can paddle one canoe or kayak down the river?" 15.If p is "Joe went to France" and q is "Jessica went to England," then "Joe went to France or Jessica went to England" is the (1) ______________ of p and q. On the other hand "Joe went to France and Jessica went to England" is the (2)_____________ of p and q. (Fill each blank with disjunction or conjunction.) Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
16. Match the English sentence on the left with its equivalent representation in propositional logic on the right, given that p is "The student has read the book" and q is "The student has passed the exam." 17. Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book." Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
18. Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book.” 19. Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book." 20.Match the English sentence with the correct statement in propositional logic, where the proposition p is "The student passed the exam" and q is "The student has read the book." Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
21. Which of the following sentences are propositions? 22.Consider the English sentence "If the exam is open book, then it will be hard." Match the description on the left with the English sentence on the right. 23.Consider the propositions p and q, where p is "We will name our baby Mary" and q is "We will name our baby Philip." What is p q? Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
24. Consider the English sentence "If you do not read the book, you will be unable to pass the exam." Match the description on the left with the English sentence on the right. 25. Select all that apply. Which of the following sentences express the biconditional p ↔ q where p is "The toy is lightweight" and q is "The toy foats"? 26.Match the expression on the left with the number of truth table rows for which the expression has a T in the final column. 27.Consider the sentence "If you came before 4:00, we will get there in time for dinner." The sentence "If we get there in time for dinner, you came before Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
4:00" is the (1)______________ of the sentence. The sentence "If we did not get there in time for dinner, you did not come before 4:00" is the (2)______________ of the original sentence. The sentence "If you did not come before 4:00, we did not get there in time for dinner" is the (3)_____________ of the original sentence. 28.Select all that apply. In which of these rows of the truth table is the compound proposition (p r) → ¬(q p) true? 29.Taking into account rules of precedence, which of the following parenthesized expressions is equivalent to ¬p r → q s? 30.Match each bit string on the left with the operation on the right used to obtain it from the bit strings 1100 and 0110. 31.Match the expression on the left with the values of the propositional variables that make the expression true. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
32.Match the fully parenthesized expression on the left to that on the right. 33.Express in propositional logic "The strike will last less than 100 days only if either the negotiation succeeds and the president of the firm does not resign, or the governor calls out the national guard." The propositions used are s: "The strike lasts 100 days or more," n: "The negotiation succeeds," r: "The president of the firm resigns," and g: "The governor calls out the national guard." 34.Match the English specification on the left with the representation in propositional logic on the right. Let the propositions be s : "The transaction has a shared lock on the database element," e : "The transaction has an exclusive lock on the element," m : "The transaction can modify the element," and r : "The transaction can read the element." Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
35.Select all that apply Consider the following systems specification. If the transaction has an exclusive lock on the database element, then it can modify and read the element. If the transaction has a shared lock on the database element, then it can read the element, but can not modify it. The transaction either has an exclusive lock or a shared lock on the database element. Let s be the proposition: "The transaction has a shared lock on the database element," e: "The transaction has an exclusive lock on the database element," m: "The transaction can modify the database element," and r: "The transaction can read the database element." The translation of the specification into propositional logic is as follows: e → (r m) s → (r ¬m) (e s) ¬(e s) Which of the following additions to the specification make it inconsistent. 36.On a game show, you must pick one of two doors. You know that behind each door there is either a new car or a goat. There may be a car behind both doors, a goat behind both doors, or a car behind one door and a goat behind the other. The sign on door I says "IN THIS ROOM, THERE IS A CAR, AND IN THE OTHER ROOM THERE IS A GOAT." The sign on door II says "IN ONE ROOM THERE IS A CAR, AND IN THE OTHER THERE IS A Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
GOAT." One of the signs is true and the other is false. Which door should you pick, assuming that you would rather have the car than the goat? (Based on a puzzle by Raymond Smullyan) 37.Match the English sentences on the left with the corresponding compound proposition on the right. The propositions used are p : "The mushroom is poisonous," r : "The mushroom is red," w : "The mushroom has white spots," and y: "The mushroom is yellow." 38.Express these system specifications using the propositions a, c, and s, where a denotes "the browser is set to accept cookies," c denotes "the cookie is stored by the browser," and s denotes "the server sends the cookie." If the server sends the cookie and the browser is set to accept cookies, then the browser will store the cookie. But if the browser is not set to accept cookies, then the browser will not store the cookie. 39.Match the circuit on the left with the output on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
based on 40.There is an island in which certain inhabitants called "knights" always tell the truth, and others called "knaves" always lie. We assume that all of the inhabitants are either knights or knaves. Match the statements on the left with the types on the right. (Based on a series of puzzles by Raymond Smullyan) Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
41.Match each proposition on the left with the word describing it on the right. 42.Select all that apply. Determine whether the following are valid equivalences. 43.Determine the output of the combinatorial circuit shown. 44.Select all that apply. Which of the following sentences in propositional logic are contradictions? 45.Select all that apply. Which of the following are valid logical equivalences? 46.Match the compound proposition on the left with the equivalent compound proposition on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
47.Match the statements on the left with equivalent statements on the right. 48.Select all that apply. Which of the following sentences in propositional logic are tautologies? 49.Select all that apply. Which of the following are valid equivalences? Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
50.Match the sentence on the left with its negation on the right. 51. Click and drag on elements in order. Match the code on the left with the precondition P ( x, y) and postcondition Q ( x , y ) on the right that verifes its correctness. damental equivalence. 52.Match the logical equivalence on the left with its name on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
53. Select all that apply. Let p be "Ghada's cell phone has less than 16 GB memory" and q be "Ghada's laptop has more than 8 GB of memory." Then the sentence "Ghada's cell phone has less than 16 GB memory or her laptop has more than 8 GB memory" is represented as p ∨ q. Which of the following is the correct English translation using De Morgan's laws of ¬(p ∨ q)? Select all that apply. 54.Select all that apply. Which of the following compound propositions are satisfiable? 55.Select all that apply. Let P(x, y) denote the statement "x is taller than y." Suppose Bob is 5 feet 7 inches tall, Jill is 5 feet 3 inches tall, Azzam is 5 feet 11 inches tall, and Keya is 6 feet tall. Which of the following statements are true? 56.Match the statements on the left with equivalent statements on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
57. Select all that apply. Let p be "Alex worked for at least 10 hours on the assignment" and q be "Sruthi worked for less than 5 hours." Then the sentence "Alex worked for at least 10 hours on the assignment, but Sruthi worked for less than 5 hours" is represented as p ∧ q. Which of the following are correct ways of expressing the negation of this compound proposition. 58.Which of the following are correct ways of determining if two compound propositions p and q are equivalent. (Select all that are correct.) 59.Match the code on the left with the precondition P(x,y) and postcondition Q(x,y) on the right that verifies its correctness. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
60.Match the statement on the left with a definition for P on the right that makes the statement true. 61. Select all that apply. Assume that P(x) is the statement "x ≤ x3." For which of these domains is ∀x P(x) true? 62.Select all that apply. Which of the following sentences make use of universal quantification? (Select all that apply.) Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
63. Which of the following English sentences represents ∀ x Q (x), where Q ( x ) is the statement that x is a computer science major and the domain is all the students in the class? 64. Which of these existential quantifications are true, where the domain of x is the positive integers? 65. Select all that apply. For which of these universes is ∃x (x3 ≤ x2) true? 66. Select all that apply. Let P(x, y) denote "x > y," where the domain for both variables is the set of integers. For which values of x, y is P(x,y) true? 67. Match the universal quantification on the left with a domain for the variable x on the right that will make the statement true. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
68. Select all that apply. Which of the following English sentences represents ∀x P(x), where P(x) is the statement that "x has more than 1 GB RAM" and the domain is all of the computers at a university? (Select all that apply.) 69. Match the sentence on the left with the domain on the right that will make the sentence true. 70. Select all that apply. Which of these sentences represents ∃x P(x), where P(x) is the statement that x has more than 1 GB RAM and the domain is all the computers at a university? (Select all that apply.) 71. Match each quantified statement having the domain consisting of the integers from 3 to 5 on the left with its corresponding propositional logic expression on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
72. Select all that apply. In which of the following expressions is the variable x free? 73. Select all that apply. Which of these sentences represents ∃x Q(x), where Q(x) is the statement that x is a computer science student and the domain is all the students in the class? 74. Match the English sentence on the left with its negation on the right. 75. Select all that apply. Which of the following is the correct translation of the sentence "All the animals in the zoo are from South America"? You can assume that the domain of all variables is all physical objects in the world. Use A(x) for "x is an animal," Z(x) for "x is in the zoo," and S(x) for "x is from South America." Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
76. Categorize each English statement under the proposition to which it corresponds. 77. Which of the following is a correct representation of the specification "If every user in the department is logged-in, then there must be at least two servers running" in predicate logic. Let the domain of variable x be all users and the domain of variables y and z be all pieces of computing machinery at the university. Use D(x) for "x is a user in the department," L(x) for "x is logged-in," S(y) for "y is a server," and R(y) for "y is running." 78. Fill in each of these four blanks with either true or false to make all statements true. The statement ¬∃x P(x) is true when for every x, P(x) is _____. It is false when there is an x for which P(x) is ______. The statement ∀x ¬P(x) is true when for every x, P(x) is _____. It is false when there is an x for which P(x) is _____. 79. Consider the following Lewis Carroll argument: "Every eagle can fly.""Some pigs cannot fly.""Some pigs are not eagles."Which of the following is the correct representation in predicate logic? You can assume that the domain for the predicates consists of all creatures. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
80. Consider the following Prolog program using the predicates hasPet(a, b) to represent that person a owns a pet b and doesNotEat(a, b) to represent that animal a does not eat animal b. hasPet(joe, fish). hasPet(pierre, pig). hasPet(joe, chameleon). hasPet(selvi, cat). hasPet(rich, dog). hasPet(kumar, turkey). hasPet(rich, turkey). doesNotEat(X, Y) :- hasPet(Z, X), hasPet(Z, Y). Match the query on the left with the result on the right. 81. Consider the following vocabulary: L(x) denoting "x is in the library," D(x) "x is written in Danish," T(x) "x is written in Tamil," and N(x) is "x is a novel." Assume the domain of all variables is all books. Match the English sentence on the left with the correct logical expression on the right. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
82. Select all that apply. Which of the following are true statements? The domain of all variables is the integers. 83. Assume that the domain of x is {0, 1} and the domain of y is {2, 4, 7}. Which of the following is the correct representation of ∀x∃y Q(x, y) as a formula without quantifcation? 84. Match the expression on the left with the conditions on the right that cause the expression to be false. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
85. Match the English on the left with the predicate calculus translation on the right. Use C(x) for "x is in this class," and P(x) for "x has a perfect score." The domain for the variables is the collection of all students. 86. Match the statement on the left with the domain for all variables that will make the statement true. 87. For which of these statements Q(x, y) is the truth value of ∀x∃y Q(x,y) diferent from ∃x∀y Q(x, y)? Assume the domain of the variables is the real numbers. 88. Match the English expression on the left with the corresponding logical expression on the right. The domain of all variables is the integers. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
89. Select all that apply. Which of the following are true statements? The domain of all variables is the integers. 90. Which of the following predicate logic expressions is the correct translation of the definition of the limit of a real-valued function f(x) of a real variable x at a point a in its domain? The limit of f(x) as the variable x approaches a is L if for every real number ε > 0 there exists a real number δ > 0 such that |f(x) – L| < ε whenever 0 < |x – a| < δ. The domain for δ and ε is all positive real numbers and the domain of x is all real numbers. 91. Match the expression on the left with the explanation on the right of the nested quantifications. 92. Which of the following is the correct translation of ∀x∀y((x < 0) ∧ (y < 0) → (xy > 0)) into English? You can assume the domain is all real numbers. 93. Select all that apply. Which of the following English sentences is a correct translation of ∀x ∃y(A(y) ∧ (S(x,y) ∨ ∃z(F(x, z)∧ S(z,y)))) where S(x,y) is "x speaks y," A(x) is "x is an Asian language," and F(x,y) is " x is a friend of y." The domain of x and z is all the students in a class and the domain of y is all languages. Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Downloaded by B?o Lê (baobachuthegioi@gmail.com) lOMoARcPSD|29093045
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help