Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Similar documents
A. Propositional Logic

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Propositional Logic. Spring Propositional Logic Spring / 32

Packet #1: Logic & Proofs. Applied Discrete Mathematics

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Math 3336: Discrete Mathematics Practice Problems for Exam I

2.2: Logical Equivalence: The Laws of Logic

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

DISCRETE MATH: FINAL REVIEW

The Logic of Compound Statements cont.

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

PROPOSITIONAL CALCULUS

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

Logic and Proofs. (A brief summary)

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Rules Build Arguments Rules Building Arguments

MAT 243 Test 1 SOLUTIONS, FORM A

software design & management Gachon University Chulyun Kim

Logic Overview, I. and T T T T F F F T F F F F

EECS 1028 M: Discrete Mathematics for Engineers

1 The Foundation: Logic and Proofs

Chapter 1 Elementary Logic

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

1.1 Statements and Compound Statements

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

1 The Foundation: Logic and Proofs

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

CPSC 121 Midterm 1 Friday February 5th, 2016

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Language of Propositional Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Logic and Proofs. (A brief summary)

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Propositional logic (revision) & semantic entailment. p. 1/34

Intro to Logic and Proofs

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

CSC 125 :: Final Exam May 3 & 5, 2010

Logic and Proof. Aiichiro Nakano

Section 1.2: Propositional Logic

1.3 Propositional Equivalences

3 The Semantics of the Propositional Calculus

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Chapter 1: The Logic of Compound Statements. January 7, 2008

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

CSC Discrete Math I, Spring Propositional Logic

Tribhuvan University Institute of Science and Technology Micro Syllabus

Logic, Sets, and Proofs

Mat 243 Exam 1 Review

CSE 20 DISCRETE MATH. Fall

Logical Form 5 Famous Valid Forms. Today s Lecture 1/26/10

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

CSE 20 DISCRETE MATH. Winter

CPSC 121 Midterm 1 Tuesday, October 11th, 2011

Discrete Mathematical Structures: Theory and Applications

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

CSE 1400 Applied Discrete Mathematics Proofs

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Introduction to Sets and Logic (MATH 1190)

CSE 20: Discrete Mathematics

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Manual of Logical Style

PHI Propositional Logic Lecture 2. Truth Tables

COMP 2600: Formal Methods for Software Engineeing

Proofs. Chapter 2 P P Q Q

Supplementary Logic Notes CSE 321 Winter 2009

CSE 20 DISCRETE MATH. Fall

Propositional Logic and Semantics

Chapter 4, Logic using Propositional Calculus Handout

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Propositional Calculus

Proof Tactics, Strategies and Derived Rules. CS 270 Math Foundations of CS Jeremy Johnson

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

It rains now. (true) The followings are not propositions.

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Do not start until you are given the green signal

STUDY PROBLEMS FOR EXAM I CMSC 203 DISCRETE STRUCTURES. n (n +1)(2n +1), 6. j 2 = 1(1+1)(2 1+1) 6. k (k +1)(2k +1) 6

Compound Propositions

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

CSE 20. Final Review. CSE 20: Final Review

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Transcription:

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical grouping and set notations, as needed. Under each translation that you provide, you will then write its negation as a formal statement (using the logical operators, domains and predicates). (a) English statement: There exists exactly one integer e, such that e + n = n for all integers n. Assume the domain Z = {all of the integers},. Symbolic restatement: Its negation: (b) English statement: No integer is both even and odd. Domain: Z; Predicates: Even(x) and Oddx, for x being even or odd, respectively. Symbolic restatement: Its negation: 1

2. (a) Complete the truth table for the following function: on input b 2 b 1 b 0, a 3 bit number, output 1 if the number is a prime, and output 0 if the number is not a prime. (Note that 0 and 1 are NOT primes). b 2 b 1 b 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 (b) Use the method given in class to obtain a Boolean Formula from this truth table. (Which is to say: construct a boolean expression in disjunctive normal form, which also is how it was done in the text.) DO NOT SIMPLIFY. Page 2

(c) Draw a circuit for the formula you gave in part 2b. DO NOT SIMPLIFY. You may use AND, OR, and NOT gates only. The gates may have any number of inputs and any number of outputs. Page 3

3. Using 8-bit binary arithmetic. perform the following operation 25 91. To simplify matters, you will perform your calculations in parts: (a) Write 25 (base-10) in base-2: (a) (b) Write 91 (base-10) in base-2: (b) (c) Convert the base-2 number from part(b) into its twos-complement form: (c) (d) Perform the operation by summing the last two numbers, i.e., the numbers from part(b) and part(c); leave your answer in twos-complement form: (d) (e) Using the twos-complement, rewrite the number you computed in part(d) as a positive base-2 integer: (e) Page 4

4. Consider the following logical argument. (Note, P stands for proposition, and C stands for conclusion.) P1 m s P2 r s P3 r C m (a) Show, using a truth-table, that the argument is valid. (b) Show, using the rules of inference that the argument is valid. Page 5

5. Prove or provide a counter example that (a) The sum of two consecutive integers is odd. (b) The product of three consecutive integers is even. 6. Give an irrational number x such that 10 x 11. Page 6

COMMONLY USED LAWS, PROPERTIES & DEFINITIONS: LOGIC CMSC 250 Logic Given any statement variables p, q, and r, a tautology t and a contradiction c, the following logical equivalences hold: 1. Commutative laws: p q q p p q q p 2. Associative laws: (p q) r p (q r) (p q) r p (q r) 3. Distributive laws: p (q r) (p q) (p r) p (q r) (p q) (p r) 4. Identity laws: p t p p c p 5. Negation laws: p p t p p c 6. Double Negative law: ( p) p 7. Idempotent laws: p p p p p p 8. DeMorgan s laws: (p q) p q (p q) p q 9. Universal bounds laws: p t t p c c 10. Absorption laws: p (p q) p p (p q) p 11. Negations of t and c: t c c t Modus Ponens Modus Tollens Disjunctive p q p q p q p q Syllogism q p p q Therefore p Therefore q Therefore q Therefore p Conjunctive p Hypothetical p q Addition q Syllogism q r Therefore p q Therefore p r Disjunctive p q Dilemma: p q Addition Therefore p q Therefore p q Proof by p r Division q r into Cases Therefore r Conjunctive p q p q Rule of p c Simplification Therefore p Therefore q Contradiction Therefore p Closing C.W. p Assumed Closing C.W. p Assumed without q derived with x x derived contradiction Therefore p q contradiction Therefore p 1