CS1800 Discrete Structures Final Version A

Similar documents
CS1800 Discrete Structures Final Version B

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague December 16, CS1800 Discrete Structures Final

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

CS1800 Discrete Structures Fall 2017 October 25, CS1800 Discrete Structures Midterm Version B

CS1800 Discrete Structures Summer 2017 Prof. Schnyder May 26, CS1800 Discrete Structures Midterm Practice Exam

CS1800 Discrete Structures Spring 2017 Profs. Gold & Schnyder April 28, CS1800 Discrete Structures Final

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

CSE 20 DISCRETE MATH. Fall

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

UNCA CSCI 255 Exam 1 Spring February, This is a closed book and closed notes exam. It is to be turned in by 1:45 PM.

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1

CSE 20 DISCRETE MATH. Winter

CE161-4-AU UNIVERSITY OF ESSEX. Undergraduate Examinations 2014 DIGITAL SYSTEMS ARCHITECTURE. Time allowed: TWO hours

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

STUDENT NUMBER: MATH Final Exam. Lakehead University. April 13, Dr. Adam Van Tuyl

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

CS 373: Combinatorial Algorithms, Spring 1999

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Lecture 2: Number Systems

Indicate the option which most accurately completes the sentence.

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order.

CS220/MATH320 Applied Discrete Mathematics Instructor: Marc Pomplun Practice Exam. Sample Solutions

NAME: 1a. (10 pts.) Describe the characteristics of numbers for which this floating-point data type is well-suited. Give an example.

CS 173 [A]: Discrete Structures, Fall 2012 Homework 8 Solutions

Midterm CSE 21 Fall 2012

DISCRETE MATHEMATICS

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Read this before starting!

It is important that you show your work. There are 134 points available on this test.

EE292: Fundamentals of ECE

Discrete structures - CS Fall 2017 Questions for chapter 2.1 and 2.2

Digital Systems and Binary Numbers

Midterm Exam 2A Principles of Computing Fall November 10, 2014

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

Discrete Mathematics and Probability Theory Spring 2017 Rao Midterm 2

W4231: Analysis of Algorithms

EEM 232 Digital System I

Midterm CSE 21 Spring 2012

Binary. Hexadecimal BINARY CODED DECIMAL

A Survey of Mathematics with Applications 8 th Edition, 2009

Read this before starting!

Final Exam May 6, 2015

CS 202: Introduction to Computation Fall 2010: Exam #1

CPSC 121 Some Sample Questions for the Final Exam Tuesday, April 15, 2014, 8:30AM

Summary of Course Coverage

CDS130 Mid-term exam: Sample

Read this before starting!

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Packet #6: Counting & Graph Theory. Applied Discrete Mathematics

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Microcomputers. Outline. Number Systems and Digital Logic Review

Computer Science Foundation Exam

Induction and Recursion. CMPS/MATH 2170: Discrete Mathematics

Department of Computer Science Purdue University, West Lafayette

SE311: Design of Digital Systems

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Midterm 1

CS/COE 0447 Example Problems for Exam 2 Spring 2011

Decimal & Binary Representation Systems. Decimal & Binary Representation Systems

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

Question Total Possible Test Score Total 100

CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

Binary Values. CSE 410 Lecture 02

Computer Organization EE 3755 Midterm Examination

Exam Datastrukturer. DIT960 / DIT961, VT-18 Göteborgs Universitet, CSE

U.C. Berkeley CS170 : Algorithms, Fall 2013 Midterm 1 Professor: Satish Rao October 10, Midterm 1 Solutions

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

CS/COE 0447 Example Problems for Exam 2 Fall 2010

THE LOGIC OF COMPOUND STATEMENTS

Read this before starting!

T02 Tutorial Slides for Week 2

Read this before starting!

Midterm Exam 2B Answer key

UNIT 7A Data Representation: Numbers and Text. Digital Data

CS 373: Combinatorial Algorithms, Fall Name: Net ID: Alias: U 3 / 4 1

Math 574 Review Exam #1

Discrete Mathematics and Probability Theory Fall 2015 Rao Midterm 1

Instructions. Definitions. Name: CMSC 341 Fall Question Points I. /12 II. /30 III. /10 IV. /12 V. /12 VI. /12 VII.

Discrete Mathematics Exam File Fall Exam #1

About the Author. Dependency Chart. Chapter 1: Logic and Sets 1. Chapter 2: Relations and Functions, Boolean Algebra, and Circuit Design

CS150 Sample Final. Name: Section: A / B

ANS:

College Algebra Exam File - Fall Test #1

CSE 20. Lecture 4: Number System and Boolean Function. CSE 20: Lecture2

Discrete Structures. Fall Homework3

DIGITAL SYSTEM DESIGN

1. (15 points) Solve the decanting problem for containers of sizes 199 and 179; that is find integers x and y satisfying.

Advanced Computer Architecture-CS501

Lecture (03) Binary Codes Registers and Logic Gates

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

ASSIGNMENT 4 SOLUTIONS

Digital Systems and Binary Numbers

Lecture 3: Binary Subtraction, Switching Algebra, Gates, and Algebraic Expressions

BUT SEE THE CORRECTION BELOW!

CPSC 121 Midterm 1 Friday October 14th, Signature: Section (circle one): 11:00 15:30 17:00

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

CS 151 Midterm. (Last Name) (First Name)

Transcription:

CS1800 Discrete Structures Fall 2017 Profs. Aslam, Gold, & Pavlu December 11, 2017 CS1800 Discrete Structures Final Version A Instructions: 1. The exam is closed book and closed notes. You may not use a calculator or any other electronic device. 2. The exam is worth 100 total points. The points for each problem are given in the problem statement and in the table below. 3. You should write your answers in the space provided; use the back sides of these sheets, if necessary. 4. SHOW YOUR WORK FOR ALL PROBLEMS. 5. You have two hours to complete the exam. Section Title Points Section 1 [11 points] Binary and Other Bases Section 2 [12 points] Logic and Circuits Section 3 [12 points] Modular Arithmetic and Algorithms Section 4 [10 points] Sets and Set Operations Section 5 [10 points] Counting Section 6 [14 points] Probability Section 7 [15 points] Algorithms, Recurrences, Growth of Functions Section 8 [16 points] Proofs Total Name: CS1800 (Lecture) Instructor: 1

Section 1 [11 pts (3,4,4) ]: Binary and Other Bases 1. Convert the number -17 to 8-bit two s complement. 2. What is the result, in hexadecimal, of multiplying the hexadecimal number 0xABCD by the decimal number 256? Hint: You do not need to convert these numbers to a common base or actually perform the multiplication. 3. Suppose that a given hexadecimal number has d total hex digits, of which exactly k are non-zero hex digits. What are the minimum and maximum number of 1s in the binary representation of this number and why? 2

Section 2 [12 pts (2,3,3,4)]: Logic and Circuits A k-input parity gate is a logic gate whose output is 1 if and only if an odd number of its inputs is 1. 1. A 2-input parity gate is equivalent to what logic gate that we discussed in the course? 2. Give the truth table for a 3-input parity gate. 3. Give a Boolean formula in DNF form for a 3-input parity gate. 4. Consider the 4-input circuit shown below. What function of the inputs a 1, a 2, a 3, a 4 does this circuit compute and why? a1 a2 2-input parity 2-input parity out a3 a4 2-input parity 3

Section 3 [12 pts (4, 2, 3, 3)]: Modular Arithmetic and Algorithms 1. Calculate 7 10 mod 11 using repeated squaring. 2. The following are candidate RSA public/private key pairs. For each such pair, determine whether the pairs are valid RSA keys. If they are valid, state why; if they are not valid, state why not. (a) Public: (e, n) = (7, 32). Private: (d, n) = (5, 32) (b) Public: (e, n) = (7, 33). Private: (d, n) = (4, 33). (c) Public: (e, n) = (7, 33). Private: (d, n) = (3, 33). 4

Section 4 [10 pts (3,4,3)]: Sets and Set Operations For the following problems, let A = {a, b, c}, B = {b, c, d}, C = {d, e, f, g}, with universe U = {a, b, c, d, e, f, g}. 1. Write out the set that results from the operations (A B) C. 2. How many elements are in P(A B)? 3. If D = {x x Z, x 2 9}, what is D? 5

Section 5 10 pts (5,5): Counting For these problems, we expect your answers to be simplified into integers for full credit. 1. How many different undirected graphs are possible with the same set of 5 vertices V = {A, B, C, D, E}, but different sets of edges E? 2. A group of 9 people will be broken into 3 teams of 3, with each team assigned a letter A, B, or C. How many ways are there to do this? 6

Section 6 [14 pts (3,5,6)]: Probability Give your probabilities and expectations as simplified fractions or integers. 1. When rolling four six-sided dice, what is the probability of rolling the same number on all six dice? 2. A set of tiles A,B,C,D,E,F is randomly shuffled. What is the probability that the tiles A,B,C are adjacent and in order in the resulting ordering? 3. A graph has 10 vertices, and we are independently putting each possible edge in E with probability 0.5. What is the expected number of cycles of length 3? 7

Section 7 [15 pts (4,4,3,4)]: Algorithms, Recurrences, Growth of Functions 1. Given the beginning of a sequence a 1 = 2; a 2 = 9; a 3 = 22; a 4 = 41; a 5 = 66; a 6 = 97, find the general closed-form formula. 2. Is the choice of constants c = 2, n 0 = 100 sufficient to prove 100n = O(n) by the definition of big-o, assuming these constants mean what they usually do? Explain why or why not. 3. An algorithm for arrays works as follows: - it analyses each element of the input array (one pass) - then recurses (calls itself) on a chunk of at most three quarters of the array (a) Write the recursion for the running time. (b) Given that the work done by the algorithm is N +(3/4)N +(3/4) 2 N +... use an infinite geometric series to estimate the total number of operations as a function of N. 8

Section 8 [16 pts (7, 3, 6)]: Proofs 1. Prove that every undirected graph has an even number of vertices of odd degree. 9

2. A sequence is given by base a 0 = 0 and recurrence a n+1 = a n + 1 + ( 1) n for n 0 (a) Prove that a n+2 = a n + 2 ( 1) n+1 for n 0. (b) Prove by induction that all values in the sequence are even. 10