Docsity

Binary Strings - Discrete Mathematics and Probability Theory - Exams, Exams of Discrete Mathematics

Toggle sidebar
bg1
CS 70 Discrete Mathematics for CS
Fall 2003 Wagner Midterm 1
PRINT your name: ,
(last) (first)
SIGN your name:
PRINT your username on cory.eecs:
WRITE your section number (101 or 102):
This exam is open-book, open-notes. No calculators are permitted. Do all your work on the pages of this
examination. If you need more space, you may use the reverse side of the page, but try to use the reverse of
the same page where the problem is stated.
You have 80 minutes. There are 4 questions, worth 25 points each (100 points total). The questions are of
varying difficulty, so avoid spending too long on any one question.
Do not turn this page until the instructor tells you to do so.
Problem 1
Problem 2
Problem 3
Problem 4
Total
CS 70, Fall 2003, Midterm 1 1
pf3
pf4
pf5

Partial preview of the text

Download Binary Strings - Discrete Mathematics and Probability Theory - Exams and more Exams Discrete Mathematics in PDF only on Docsity!

CS 70 Discrete Mathematics for CS

Fall 2003 Wagner Midterm 1

PRINT your name: , (last) (first)

SIGN your name:

PRINT your username on cory.eecs:

WRITE your section number (101 or 102):

This exam is open-book, open-notes. No calculators are permitted. Do all your work on the pages of this examination. If you need more space, you may use the reverse side of the page, but try to use the reverse of the same page where the problem is stated.

You have 80 minutes. There are 4 questions, worth 25 points each (100 points total). The questions are of varying difficulty, so avoid spending too long on any one question.

Do not turn this page until the instructor tells you to do so.

Problem 1

Problem 2

Problem 3

Problem 4

Total

Problem 1. [True or false] (25 points)

Circle TRUE or FALSE. You do not need to justify your answers on this problem.

N denotes the set of natural numbers, { 0 , 1 , 2 ,.. .}. Z denotes the integers, {... , โˆ’ 2 , โˆ’ 1 , 0 , 1 , 2 ,.. .}.

(a) TRUE or FALSE: If the implication P =โ‡’ Q is true, then its converse is guaranteed to be true, too.

(b) TRUE or FALSE: โˆ€ w โˆˆ Z. โˆƒ x โˆˆ Z. โˆ€ y โˆˆ Z. โˆƒ z โˆˆ Z. w + x = y + z.

(c) TRUE or FALSE: โˆƒ x โˆˆ N. โˆ€ p โˆˆ Z. p > 5 =โ‡’ x^2 โ‰ก 1 (mod p ).

(d) TRUE or FALSE: โˆ€ p โˆˆ Z. p > 5 =โ‡’ โˆƒ x โˆˆ N. x^2 โ‰ก 1 (mod p ).

(e) TRUE or FALSE: If m is any natural number satisfying m โ‰ก 1 (mod 2), then the equation 2048 x โ‰ก 1 (mod m ) is guaranteed to have a solution for x.

Problem 3. [Proofs] (25 points)

Definition: A 2-party cake-cutting protocol is called equalizing if it satisfies the following property: If a denotes the worth (by Aliceโ€™s measure) of the piece Alice receives, and b denotes the worth (by Bobโ€™s measure) of the piece Bob receives, then a = b.

(a) TRUE or FALSE: Every envy-free 2-party cake-cutting protocol is equalizing.

(b) Prove your answer to part (a).

(c) Prove the following: If x is positive and irrational, then

x is irrational, too.

Problem 4. [Strings] (25 points)

Let { 0 , 1 }โˆ—^ denote the set of all binary strings. Write y ยท z for the concatenation of the strings y and z.

Prove that every string x โˆˆ { 0 , 1 }โˆ—^ can be written in the form x = y ยท z where the number of 0โ€™s in y is the same as the number of 1โ€™s in z. Empty strings are allowed.

(For instance, 01001 can be split as 01 ยท 001; 111011 = 11101 ยท 1; and 00000 = ยท00000.)

Hint: It is possible to prove this using strong induction over N.