Mathematics Masters Examination

Similar documents
Solutions to the Mathematics Masters Examination

MATH 363: Discrete Mathematics

Name: Mathematics 1C03


Regular Languages and Finite Automata

(a) How many pairs (A, B) are there with A, B [n] and A B? (The inclusion is required to be strict.)

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Discrete Mathematics for CS Fall 2003 Wagner MT2 Soln

CS/MATH 111 Winter 2013 Final Test

Error Correcting Codes Questions Pool

Part II. Number Theory. Year

Algorithms, Probability, and Computing Final Exam HS14

Part IA Numbers and Sets

MASTERS EXAMINATION IN MATHEMATICS

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Name: Student ID: Instructions:

CHINO VALLEY UNIFIED SCHOOL DISTRICT INSTRUCTIONAL GUIDE ALGEBRA II

MASTERS EXAMINATION IN MATHEMATICS

SOLUTION: SOLUTION: SOLUTION:

Algorithms Exam TIN093 /DIT602

Elliptic Curves Spring 2015 Problem Set #2 Due: 02/20/2015

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

Solutions to Practice Final 3

1 Acceptance, Rejection, and I/O for Turing Machines

Discrete Math Notes. Contents. William Farmer. April 8, Overview 3

CSE 355 Test 2, Fall 2016

Algebra III Chapter 2 Note Packet. Section 2.1: Polynomial Functions

Basic elements of number theory

Basic elements of number theory

Lecture 3: Miscellaneous Techniques

Subject Area Algebra I Grade Level 9_

Exam in Discrete Mathematics

Johns Hopkins Math Tournament 2018 Proof Round: Sequences

Lecture Notes 20: Zero-Knowledge Proofs

1 Basic Combinatorics

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts)

CS5371 Theory of Computation. Lecture 18: Complexity III (Two Classes: P and NP)

1 Reductions and Expressiveness

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

Problem Set 2. Assigned: Mon. November. 23, 2015

Chapter 7 Matchings and r-factors

ALGEBRA I CCR MATH STANDARDS

Math.3336: Discrete Mathematics. Mathematical Induction

Bridge to Algebra II Standards for Mathematical Practice

Student#: CISC-462 Exam, December XY, 2017 Page 1 of 12

are the q-versions of n, n! and . The falling factorial is (x) k = x(x 1)(x 2)... (x k + 1).

Discrete Mathematics (CS503)

Mathematics for Cryptography

1 ** The performance objectives highlighted in italics have been identified as core to an Algebra II course.

Mathematics Exam Category A Practice Paper

MATH 2200 Final LC Review

Solution to Problem Set 3

MATH c UNIVERSITY OF LEEDS Examination for the Module MATH2210 (May/June 2004) INTRODUCTION TO DISCRETE MATHEMATICS. Time allowed : 2 hours

Fibonacci numbers. Chapter The Fibonacci sequence. The Fibonacci numbers F n are defined recursively by

452 FINAL- VERSION E Do not open this exam until you are told. Read these instructions:

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

CPSC 467b: Cryptography and Computer Security

Organization Team Team ID#

PLEASE DO ANY 6 of the following 8 problems. Work carefully

M-saturated M={ } M-unsaturated. Perfect Matching. Matchings

Updated Jan SESSION 4 Permutations Combinations Polynomials

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

Lecture 2: Divide and conquer and Dynamic programming

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

MA Discrete Mathematics

CPSC 467b: Cryptography and Computer Security

Practice Final Exam Winter 2017, CS 485/585 Crypto March 14, 2017

CS383, Algorithms Spring 2009 HW1 Solutions

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS. 1. Combinatorics

University of Washington March 21, 2013 Department of Computer Science and Engineering CSEP 521, Winter Exam Solution, Monday, March 18, 2013

Prob. 1 Prob. 2 Prob. 3 Total

MASTERS EXAMINATION IN MATHEMATICS

1. The sides of a triangle are in the ratio 3 : 5 : 9. Which of the following words best describes the triangle?

MTH 167 Pre Calculus I (Spring 2015) 3 credits. Department of Mathematics at Cleveland State University

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

Attempt QUESTIONS 1 and 2, and THREE other questions. penalised if you attempt additional questions.

Trinity Christian School Curriculum Guide

HOMEWORK 8 SOLUTIONS MATH 4753

CMPSCI 311: Introduction to Algorithms Second Midterm Exam

12.1 Chromatic Number

Part IA Numbers and Sets

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Theory of RSA. Hiroshi Toyoizumi 1. December 8,

Counting. Spock's dilemma (Walls and mirrors) call it C(n,k) Rosen, Chapter 5.1, 5.2, 5.3 Walls and Mirrors, Chapter 3 10/11/12

Book announcements. Sukumar Das Adhikari ASPECTS OF COMBINATORICS AND COMBINATORIAL NUMBER THEORY CRC Press, Florida, 2002, 156pp.

CpSc 421 Final Exam December 15, 2006

Math Fall Final Exam. Friday, 14 December Show all work for full credit. The problems are worth 6 points each.

Math.3336: Discrete Mathematics. Chapter 9 Relations

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

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

Discrete Structures, Final Exam

High School Algebra I Scope and Sequence by Timothy D. Kanold

Primitive Digraphs with Smallest Large Exponent

DISCRETE STRUCTURES AMIN WITNO

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

Time and space classes

Transcription:

Mathematics Masters Examination OPTION 4 Fall 2015 MATHEMATICAL COMPUTER SCIENCE NOTE: Any student whose answers require clarification may be required to submit to an oral examination. Each of the twelve numbered questions is worth 20 points. All questions will be graded, but your score for the examination will be the sum of your scores on your eight best questions. Please observe the following: DO NOT answer two or more questions on the same sheet (not even on both sides of the same sheet). DO NOT write your name on any of your answer sheets. You will be given separate instructions on the use of these answer sheets. When you have completed a question, place it in the large envelope provided. Fall 15 MCS 1/7

Computer Algorithms 1. Consider a collection of n laptops on campus which each need to be connected to one of k possible Wi-Fi base stations. Each laptop and each base station is specified by an (x, y) coordinate in the plane. For each laptop, we wish to connect it to exactly one of the base stations. Our choice of connections is constrained in the following ways: There is a range parameter r: a laptop can only connect to a base station that is within distance r. There is a load parameter L: no more than L laptops can be connected to any single base station. Using network flows, design a polynomial time algorithm for the following problem: given the positions of the laptops and base stations and the parameters r and L as input, decide whether every laptop can be connected simultaneously to a base station, subject to the range and load conditions. You should both describe the algorithm and prove it is correct. The algorithm is as follows. Create a directed graph G, where the vertices of G are a source vertex s, vertices x 1,..., x n for the laptops, vertices y 1,..., y k for the stations, and a sink vertex t. For the edges, add sx i with capacity one for every i, add y j t with capacity L for every j, and for every 1 i n and 1 j k, add an edge x i y j with capacity one if the distance between laptop i and base station j is less than r. Now run Ford-Fulkerson to determine if there exists an integer flow of value n from the source to the sink. If such a flow exists, output assignment exists otherwise output no assignment exists. For the proof of correctness, it is obvious that if Ford-Fulkerson finds a flow of value n there is an assignment. Moreover, if there exists an assignment then such an assignment can be converted to an integer flow of value n in the digraph. An alternate proof could use a min-cut. 2. You are given an array A with n entries, each entry holding a distinct number. You are also told that the sequence of values A[1], A[2],..., A[n] is unimodal: for some index k between 1 and n, the values in the array increase up to position k and then decrease the remainder of the way until position n. Describe an algorithm to find the peak entry k, where the algorithm reads at most O(log n) entries of A. Prove your algorithm accesses only O(log n) entries of A by solving a recurrence. the algorithm is to look at A[ n 1], A[ n], A[ n + 1] to determine if n is on the 2 2 2 2 upslope (before k), downslope (after k), or is the peak. If on the upslope, recurse on indices n + 1... n, and if on the downslope, recurse on indices 1... n 1. 2 2 Fall 15 MCS 2/7

The number of accesses of A is bounded by the recurrence T (n) T (n/2) + 3 for n 4 and T (3) 3. Substituting T (n) = 3 log 2 n 3 log 2 ( 3 ) solves the recurrence. 2 Combinatorics 3. Let T n be the set of strings of length n made up of 1s, 2s, and 3s that do not contain consecutive 1s. Let t n be the number of strings in T n. a. Find a recurrence for t n, along with initial conditions t 0 and t 1. (Define t 0 so that the recurrence holds for n 2.) b. Find a formula for t n as a function of n. a. There are three types of strings in T n : Type 1: those that end in 1. This type can be made from adding either 21 or 31 at the end of a string in T n 2, so there are 2 t n 2 of this type. Type 2: those that end in 2. This type can be built by adding 2 at the end of a string in T n 1, so there are t n 1 of this type. Type 3: those that end in 3. Similarly, this type can be built by adding 3 at the end of a string in T n 1, so there are t n 1 of this type. Thus t n = 2t n 1 + 2t n 2, n 2 Initial conditions: t 0 = 1, t 1 = 3. (Could check that this is the correct definition of t 0 by noting that t 2 = 3 3 1 = 8. Thus 8 = t 2 = 2 3 + 2 1 = 2t 1 + 2t 0.) b. The characteristic equation of this recurrence is x 2 2x 2, with solutions x = 1± 3. So t n = c 1 (1 + 3) n + c 2 (1 3) n. Use the initial conditions to solve for c 1 and c 2 : t 0 = 1 = c 1 + c 2, thus c 1 = 1 c 2. And t 1 = 3 = c 1 (1 + 3) + c 2 (1 3). Substituting gives c 2 = 1(1 2 2 3 ) and c 1 = 1(1 + 2 2 3 ). 4. In a small town, n married couples attend a town hall meeting. Each of these 2n people wants to speak exactly once. In how many ways can we schedule the 2n people to speak if no married couple takes two consecutive slots? Let S n be the set of permutations of 2n people. Let A i be the subset of permutations in which married couple i takes consecutive slots. We are looking for A 1 A 2 A n.to compute A i, think of the couple i as being one unit, giving a set of Fall 15 MCS 3/7

2n 1 units (the couple, and the 2n 2 other people) to arrange in (2n 1)! ways. There are two ways to arrange the people within the couple, so A i = 2(2n 1)!. Similarly, A i1 A i2 A ij = 2 j (2n j)!. Using the principle of Inclusion-Exclusion, the final answer is, n ( ) n A 1 A 2 A n = (2n)! ( 1) j 2 j (2n j)! j j=1 Graph Theory 5. For which values of r is K r,r a Hamiltonian? b Eulerian? c properly r-edge-colorable? a. It is Hamiltonian for every r 2, indeed, we can construct a Hamiltonian cycle by alternating between the parts. b. It is Eulerian iff r is even by Euler s theorem. c. By Konig s Theorem, χ (G) = (G) for every bipartite graph G. Since K r,r is bipartite and r-regular, it is properly r-edge-colorable for every r 1. 6. Prove Peterson s theorem, that every cubic bridgeless graph has a 1-factor We Apply Tutte s theorem. Take any vertex subset S V (G). An odd component of G S must have an odd number of edges to S since G is cubic, and it cannot have one edge to S as G is bridgeless. Hence every odd component of G S has at least 3 edges to S and we conclude, by counting edges between S and the odd components of G S, that 3o(G S) 3 S. Tutte s theorem now applies. Error-Correcting Codes and Cryptography 7. Given that α is a primitive root mod p, Fall 15 MCS 4/7

a. Prove that α x α y mod p if and only if x y mod p 1. b. Show that a = 3 is not a primitive root mod 13. a. One can clearly state definition of primitive root, then reduce to α k 0 mod p, and finally cite Fermat and definition to conclude that k 0 mod p b. One may compute powers of 3mod 13 to see that 3 3 = 1 1 mod 13 8. Let p be a prime number. a. Suppose you encrypt a message, m, by computing c m e mod p. What numbers, e make good encryptions (i.e. m m e is injective.)? How can you find a decrypting exponent, d, such that c d m mod p? b. If p = 101 and e = 23, find d. Show your calculation steps and explain. a. Expectations are that the student knows that d is the multiplicative inverse mod p 1 and that one can find it using the extended Euclidean Algorithm. Not necesarily to prove the final step. b. Note that d is multiplicative inverse of e mod 100; then solve Diophantine equation: 23 d + 100 N = 1 using extended Euclidean Algorithm. Then one can correctly deduce d = 87 mod 100 from the previous calculation. Theory of Computation 9. Consider the language A over Σ = {(, )} of properly balanced parentheses. For example, (()) and (()(()))() are in A but )( is not. a. Show that A L. Remember L = SPACE(log n). b. Is A regular? Why or why not? Fall 15 MCS 5/7

a. Keep a counter that begins at 0, incrementing at each ( and decrementing at each ). If the counter ever reaches -1, reject. If the counter ends at 0, accept, otherwise reject. Correctness is clear. Since the counter only needs space logarithmic in the length of the input, this completes the proof. b. No. The language fails the pumping lemma at ( n ) n. 10. Consider the language A = {0 n 1 3n n 1}. a. Design a context free grammar for A. b. Write your grammar in Chomsky normal form. a. A BAC 0111 B 0 C 111. b. S BD BC A BD BC D AC C XY Y XX X 1 B 0 Numerical Analysis 11. Consider the equation x 4 + 6x 3 + 12x 2 + 8x = 0. a. For the solution x = 0 which will converge faster, the Bisection Method or Newton s Method? Justify your answer with explicit estimates of e i, the error after step i. b. For the solution x = 2 which will converge faster, the Bisection Method or Newton s Method? Justify your answer with explicit estimates of e i, the error after step i. Setting f(x) = x 4 + 6x 3 + 12x 2 + 8x our problem is to find its roots by Newton s Method and Bisection. First, the Bisection Method has error which always decays linearly satisfying the estimate e i+1 Se i with S = 1/2. Fall 15 MCS 6/7

a. Root r = 0: Given a root r, Newton s method will converge quadratically provided that f (r) 0. In this case e i+1 Me 2 i, M = f (r)/(2f (r)). We have f (x) = 4x 3 + 18x 2 + 24x + 8, f (x) = 12x 2 + 36x + 24, so that f (0) = 8 and f (0) = 24. Thus, for this root we have e i+1 (24/16)e 2 i Newton s Method will converge faster. and b. Root r = 2: If f (r) = 0 then Newton s Method will converge linearly satisfying the estimate e i+1 [(m 1)/m]e i where m is the multiplicity of the root r. Since we have f ( 2) = f ( 2) = 0 while f ( 2) = 12 0, r = 2 is a root of multiplicity three. In this case we know that e i+1 (2/3)e i and the Bisection Method will converge faster. 12. Consider the following cubic spline: { 3 9x + 4x 2 0 < x < 1 S(x) = 2 (x 1) + c(x 1) 2 1 < x < 2. a. Find c in the spline. b. Is this spline natural? Why or why not? c. Is this spline parabolically terminated? Why or why not? d. Is this spline not a knot? Why or why not? We note that S (x) = { 8 0 < x < 1 2c 1 < x < 2. a. To match the second derivative at x = 1 we choose c = 4. b. Since S (0) = 8 0, this is not natural. c. Since d 1 = d n 1 = d 2 = 0, this is parabolically terminated. d. Since d 1 = d 2, this is not a knot. Fall 15 MCS 7/7