CPSC 121 Sample Midterm Examination October 2007

Similar documents
The University of British Columbia Final Examination - April, 2007 Mathematics 257/316

December 2010 Mathematics 302 Name Page 2 of 11 pages

THE UNIVERSITY OF BRITISH COLUMBIA Sample Questions for Midterm 1 - January 26, 2012 MATH 105 All Sections

December 2010 Mathematics 302 Name Page 2 of 11 pages

MATH 322, Midterm Exam Page 1 of 10 Student-No.: Midterm Exam Duration: 80 minutes This test has 6 questions on 10 pages, for a total of 70 points.

Special Instructions:

The University of British Columbia. Mathematics 300 Final Examination. Thursday, April 13, Instructor: Reichstein

Math 321 Final Exam 8:30am, Tuesday, April 20, 2010 Duration: 150 minutes

The University of British Columbia. Mathematics 322 Final Examination - Monday, December 10, 2012, 3:30-6pm. Instructor: Reichstein

The University of British Columbia Final Examination - April 20, 2009 Mathematics 152 All Sections. Closed book examination. No calculators.

Mathematics 253/101,102,103,105 Page 1 of 17 Student-No.:

The University of British Columbia Final Examination - April 11, 2012 Mathematics 105, 2011W T2 All Sections. Special Instructions:

The University of British Columbia Final Examination - December 11, 2013 Mathematics 104/184 Time: 2.5 hours. LAST Name.

This examination consists of 10 pages. Please check that you have a complete copy. Time: 2.5 hrs INSTRUCTIONS

Be sure this exam has 9 pages including the cover. The University of British Columbia

Math 152 Second Midterm March 20, 2012

Mathematics Page 1 of 9 Student-No.:

Mathematics Midterm Exam 2. Midterm Exam 2 Practice Duration: 1 hour This test has 7 questions on 9 pages, for a total of 50 points.

MATH 100, Section 110 Midterm 2 November 4, 2014 Page 1 of 7

THE UNIVERSITY OF BRITISH COLUMBIA Midterm Examination 14 March 2001

This examination consists of 11 pages. Please check that you have a complete copy. Time: 2.5 hrs INSTRUCTIONS

Math 152 First Midterm Feb 7, 2012

Final Exam Math 317 April 18th, 2015

Problem Out of Score Problem Out of Score Total 45

December 2014 MATH 340 Name Page 2 of 10 pages

The University of British Columbia November 9th, 2017 Midterm for MATH 104, Section 101 : Solutions

The University of British Columbia Final Examination - December 6, 2014 Mathematics 104/184 All Sections

April 2003 Mathematics 340 Name Page 2 of 12 pages

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

This exam is closed book with the exception of a single 8.5 x11 formula sheet. Calculators or other electronic aids are not allowed.

The University of British Columbia Final Examination - December 5, 2012 Mathematics 104/184. Time: 2.5 hours. LAST Name.

The University of British Columbia

Section (circle one) Coombs (215:201) / Herrera (215:202) / Rahmani (255:201)

The University of British Columbia Final Examination - December 16, Mathematics 317 Instructor: Katherine Stange

Math 215/255 Final Exam, December 2013

The University of British Columbia Final Examination - December 17, 2015 Mathematics 200 All Sections

Question Points Score Total: 70

Final Examination December 14 Duration: 2.5 hours This test has 13 questions on 18 pages, for a total of 100 points.

Math 102- Final examination University of British Columbia December 14, 2012, 3:30 pm to 6:00 pm

The level curve has equation 2 = (1 + cos(4θ))/r. Solving for r gives the polar form:

ENEL Digital Circuits Final Examination

The University of British Columbia Final Examination - December 13, 2012 Mathematics 307/101

Math 221 Midterm Fall 2017 Section 104 Dijana Kreso

EOSC : Petrology MID TERM minutes

University of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

Preparing for the CS 173 (A) Fall 2018 Midterm 1

SFU - UBC - UNBC - UVic Calculus Challenge Exam. June 3, 2004, 12 noon to 3 p.m.

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS

Two hours. Note that the last two pages contain inference rules for natural deduction UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

Do not start until you are given the green signal

CPSC 121 Midterm 1 Tuesday, October 11th, 2011

CPSC 121 Sample Final Examination December 2013

Section 2.1: Introduction to the Logic of Quantified Statements

SAMPLE ANSWERS MARKER COPY

Sample Marking Scheme

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Two hours. Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

CPSC 121 Midterm 1 Friday February 5th, 2016

ENGG Fundamentals of Electrical Circuits and Machines Final Examination

Problem Points Score Total 100

Chapter 1 Elementary Logic

ENGG Fundamentals of Electrical Circuits and Machines Final Examination

ENGG Fundamentals of Electrical Circuits and Machines Final Examination

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

ENGG Fundamentals of Electrical Circuits and Machines Winter 2017 Final Examination

MAT2345 Discrete Math

*EXAM 1 Answer key* EECS 203 Spring 2016

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

Department of Mathematics and Statistics Math B: Discrete Mathematics and Its Applications Test 1: October 19, 2006

NORTHERN INDIA ENGINEERING COLLEGE, LKO D E P A R T M E N T O F M A T H E M A T I C S. B.TECH IIIrd SEMESTER QUESTION BANK ACADEMIC SESSION

Section 2.3: Statements Containing Multiple Quantifiers

Name: Math 1120, Final. December 12, Net id: PLACE AN X IN THE BOX TO INDICATE YOUR SECTION

Name: Student ID: Instructions:

HKUST. MATH1013 Calculus IB. Directions:

Math 230 Final Exam, Spring 2008

University of Toronto Faculty of Applied Science and Engineering Final Examination

UBC-SFU-UVic-UNBC Calculus Examination 4 June 2009, 12:00-15:00 PDT

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

ENGG Fundamentals of Electrical Circuits and Machines Final Examination

(c) Give a proof of or a counterexample to the following statement: (3n 2)= n(3n 1) 2

CS103 Handout 21 Winter 2016 February 3, 2016 Practice Midterm Exam

University of Florida EEL 3701 Fall 1996 Dr. Eric M. Schwartz

CPE100: Digital Logic Design I

Dr. Nicola Nicolici COE/EE2DI4 Midterm Test #2 Nov 22, 2006

Mat 243 Exam 1 Review

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

Test Bank Questions. (a) Is there an integer n such that n has? (b) Does there exist such that if n is divided by 4 the remainder is 1 and if?

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

Boolean Algebra and Digital Logic

COMPUTER SCIENCE TRIPOS

CSE 20. Final Review. CSE 20: Final Review

3 The language of proof

Total Time = 90 Minutes, Total Marks = 100. Total /10 /25 /20 /10 /15 /20

Rules Build Arguments Rules Building Arguments

University of Florida EEL 3701 Fall 2014 Dr. Eric. M. Schwartz Department of Electrical & Computer Engineering Wednesday, 15 October 2014

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Transcription:

CPSC 121 Sample Midterm Examination October 2007 Name: Signature: Student ID: You have 65 minutes to write the 7 questions on this examination. A total of 60 marks are available. Justify all of your answers. You are allowed to bring in one hand-written, double-sided 8.5 x 11 sheet of notes, and nothing else. Keep your answers short. If you run out of space for a question, you have written too much. The number in square brackets to the left of the question number indicates the number of marks allocated for that question. Use these to help you determine how much time you should spend on each question. Use the back of the pages for your rough work. Good luck! Question 1 2 3 4 5 6 7 Total Marks UNIVERSITY REGULATIONS: Each candidate should be prepared to produce, upon request, his/her library card. No candidate shall be permitted to enter the examination room after the expiration of one half hour, or to leave during the first half hour of the examination. CAUTION: candidates guilty of any of the following, or similar, dishonest practices shall be immediately dismissed from the examination and shall be liable to disciplinary action. 1. Having at the place of writing, or making use of, any books, papers or memoranda, electronic equipment, or other memory aid or communication devices, other than those authorised by the examiners. 2. Speaking or communicating with other candidates. 3. Purposely exposing written papers to the view of other candidates. The plea of accident or forgetfulness shall not be received. Candidates must not destroy or mutilate any examination material; must hand in all examination papers; and must not take any examination material from the examination room without permission of the invigilator.

page 2 out of 7 [9] 1. Match each proposition in the left column with the logically equivalent proposition in the right column. Each proposition from the left column is equivalent to only one proposition in the right column. Since there are three propositions in the left column and five propositions in the right column, two of the propsitions in the right column will not be used when you make your matches. Justify your answers (i.e. show why the two propositions are logically equivalent). a. (p q) r b. (p q) (p q) r p c. q r 1. T 2. (p q) ( q r) 3. p (q r) 4. ( q p) r 5. p q r

page 3 out of 7 [10] 2. Rules of inference [3] a. Prove that the following rule (simplification) is a valid rule of inference: p q p [7] b. Prove or disprove that the following argument is valid. Please clearly state the rule of inference you are using for each step. 1. m n 2. k m 3. r q 4. g h 5. r m 6. h (k q) n

page 4 out of 7 [6] 3. Translate each of the following English propositions into predicate logic. Assume that C is the set of all countries, M is the set of all continents, B(x,y) means x shares a border with y, P(x, y) means country x is in continent y, and H(x) means country x is in the Northern Hemisphere. [3] a. No country in the Northern Hemisphere borders a country in the Southern Hemisphere. [3] b. There are some countries in the Northern Hemisphere that share a border but aren t in the same continent. [11] 4. Representing numbers. [2] (a.) Give the binary (bit-string) representation of the following base 10 numbers when represented as four-bit, signed numbers in two s complement notation. (i.) 5: (ii.) -5:

page 5 out of 7 [2] (b.) Here is a truth table (with numbers 1 and 0 instead of T and F) for a circuit that adds two two-bit, unsigned numbers (i.e., a 1 a 0 + b 1 b 0 = u 1 u 0 ). (It is split in two parts to fit on the paper better.) a 1 a 0 b 1 b 0 u 1 u 0 s 1 s 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 0 a 1 a 0 b 1 b 0 u 1 u 0 s 1 s 0 1 0 0 0 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 0 What changes are required to this circuit for it to add two signed, two s complement numbers (ie., s 1 s 0 )? To answer this question you can fill in the s 1 and s 0 columns in the table or provide a careful explanation of what values these column should have, whichever you find easier. In either case, explain your answer carefully. [7] (c.) Draw a circuit that takes two two-bit, signed, two s complement numbers a 1 a 0 and b 1 b 0 as input and computes an output of 1 if a < b and 0 otherwise.

page 6 out of 7 [5] 5. Answer the following questions about these four sets. A = {1,2,...,10} B = {x A x is odd} C = {x A x is divisible by 3} D = {1,2,1,3,3,3} (a.) A B = (b.) B C = (c.) B D = (d.) D B = (e.) {T T C} = [11] 6. Consider the following statement: An unsigned integer represented in binary is odd if and only if its rightmost (least-significant) bit is 1. [3] (a) Rewrite the statement using predicate logic (quantifiers and predicates).

page 7 out of 7 [8] (b) Prove the truth of the statement using a direct proof. Part of the marks will be given for the structure of the proof; the rest will be given for the details. [8] 7. There were 184 students registered in CPSC 121 in term 2 of last year. Using an indirect proof, prove that there were two CPSC 121 students who either had the same birthday, or birthdays that occur on 2 consecutive days.