Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343

Similar documents
ELEC-270 Solutions to Assignment 5

5 Graphs

Basic Counting Principles: The Product Rule

Discrete Structures Lecture The Basics of Counting

Counting. Andreas Klappenecker

Counting: Basics. Rosen, Chapter 6.1

Discrete Structures. Fall Homework3

CS228 - Basic Counting and the Pigeonhole Principle

Counting Product Rule

Discrete Mathematics Exam File Fall Exam #1

Solutions to In Class Problems Week 9, Fri.

Indicate the option which most accurately completes the sentence.

Introduction. CS243: Discrete Structures. Combinatorics. Product Rule. Basic Counting Rules. Example 2. Example 1

Do not turn this page until you have received the signal to start. In the meantime, please read the instructions below carefully.

1 Algorithm and Proof for Minimum Vertex Coloring

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Math Circles: Pigeons and Rams(ey)

Counting: Basics. A simple counting problem. Counting: the product rule. Relation to Cartesian products. Relation to Cartesian products

7th Bay Area Mathematical Olympiad

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

Computer Science 280 Fall 2002 Homework 10 Solutions

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

Counting. Rosen, Chapter 6 Walls and Mirrors, Chapter 3

Chapter 3. Set Theory. 3.1 What is a Set?

Math 4410 Fall 2010 Exam 3. Show your work. A correct answer without any scratch work or justification may not receive much credit.

Line Graphs and Circulants

My Favorite Problems, 4 Harold B. Reiter University of North Carolina Charlotte

9.5 Equivalence Relations

Review of Operations on the Set of Real Numbers

Math 3336 Section 6.1 The Basics of Counting The Product Rule The Sum Rule The Subtraction Rule The Division Rule

Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

Solutions to Homework 10

International Mathematics TOURNAMENT OF THE TOWNS

Notes for Recitation 13

HOMEWORK 4 SOLUTIONS. Solution: The Petersen graph contains a cycle of odd length as a subgraph. Hence,

Dr. Amotz Bar-Noy s Compendium of Algorithms Problems. Problems, Hints, and Solutions

W4231: Analysis of Algorithms

2017 SOLUTIONS (PRELIMINARY VERSION)

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

COT 3100 Spring 2010 Midterm 2

Math 187 Sample Test II Questions

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

Graph Theory Part Two

On Rainbow Cycles in Edge Colored Complete Graphs. S. Akbari, O. Etesami, H. Mahini, M. Mahmoody. Abstract

Math Summer 2012

The Probabilistic Method

Properties of a Function s Graph

Definition 1 (Hand-shake model). A hand shake model is an incidence geometry for which every line has exactly two points.

Combinatorics: The Fine Art of Counting

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Star Decompositions of the Complete Split Graph

Pebble Sets in Convex Polygons

To illustrate what is intended the following are three write ups by students. Diagonalization

MATH 54 - LECTURE 4 DAN CRYTSER

Math 55 - Spring Lecture notes # 14 - March 9 (Tuesday)

Elementary Number Theory. Kenneth H. Rosen Sixth Edition

Ma/CS 6b Class 10: Ramsey Theory

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Discrete mathematics , Fall Instructor: prof. János Pach

UNM - PNM STATEWIDE MATHEMATICS CONTEST XLI. February 7, 2009 Second Round Three Hours

Homework 8: Question 1: N and Parity Parity Parity zero one Even Odd Even Odd Even Even Odd Odd Parity ker ker ker ker

Ma/CS 6b Class 12: Ramsey Theory

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

Exercise 1.1. Page 1 of 22. Website: Mobile:

A Reduction of Conway s Thrackle Conjecture

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

A graph is a mathematical structure for representing relationships.

Solutions to Exercises 9

Discrete Mathematics and Probability Theory Fall 2013 Midterm #2

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

CS 341 Homework 1 Basic Techniques

Matching Theory. Figure 1: Is this graph bipartite?

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Lecture 6: Graph Properties

Solve the matrix equation AX B for X by using A.(1-3) Use the Inverse Matrix Calculator Link to check your work

The Graphs of Triangulations of Polygons

Lemma (x, y, z) is a Pythagorean triple iff (y, x, z) is a Pythagorean triple.

CS525 Winter 2012 \ Class Assignment #2 Preparation

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

Situation 34: Mean Median Prepared at Penn State Mid-Atlantic Center for Mathematics Teaching and Learning June 29, 2005 Sue, Evan, Donna

Discrete Applied Mathematics. A revision and extension of results on 4-regular, 4-connected, claw-free graphs

Number Theory Open, Round 1 Test #101

Basic Definitions and Concepts Complement to the Prologue and to Chapter 1, Respecting the Rules

Math 110 FOUNDATIONS OF THE REAL NUMBER SYSTEM FOR ELEMENTARY AND MIDDLE SCHOOL TEACHERS

Modular Representations of Graphs

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Algebra of Sets (Mathematics & Logic A)

Chapter 3: Paths and Cycles

CISC 1400 Discrete Structures

2 Review of Set Theory

Math 443/543 Graph Theory Notes 11: Graph minors and Kuratowski s Theorem

Combinatorial Gems. Po-Shen Loh. June 2009

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs.

11 Sets II Operations

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected

CHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science

Extremal Graph Theory: Turán s Theorem

An Introduction to Graph Theory

Transcription:

DISCRETE MATHEMATICS HOMEWORK 5 SOL Undergraduate Course College of Computer Science Zhejiang University Fall-Winter 2014 HOMEWORK 5 P344 1. There are 18 mathematics majors and 325 computer science majors at a college. a) How many ways are there to pick two representatives, so that one is a mathematics majors and the other is a computer science major? b) How many ways are there to pick one representative who is either a mathematics majors or a computer science major? Solution : a) C(18, 1)C(325, 1) = 5850 b) C(18, 1) + C(325, 1) = 343 3. A multiple-choice test contains 10 questions. There are four possible answers for each question. a) How many ways can a student answer the questions on the test if every question is answered? b) How many ways can a student answer the questions on the test if the student can leave answers blank? Solution : a) 4 10 b) 5 10 4. A particular brand of shirt comes in 12 colors, has a male version and a female version, and comes in three sizes for each sex. How many different types of this shirt are made? Solution : By product rules there are 12 2 3 = 72 different types of shirt. 8. How many different three-letter initials which none of the letters repeated can people have? Solution : 26 25 24 = 15, 600. 12. How many bit strings are there of length six less? Solution : 2 0 + 2 1 + 2 2 + 2 3 + 2 4 + 2 5 + 2 6 = 2 7 1 = 127. 14. How many bit strings are there of length n, where n is a positive integer, 1

start and end with 1s? Solution : 2 n 2. 20. How many positive integers less than 1000 are a) divisible by 7? b) divisible by 7 but not by 11? c) divisible by both 7 and 11? d) divisible by either 7 or 11? e) divisible by exactly one of 7 and 11? f) divisible by neither 7 or 11? g) have distinct digits? h) have distinct digits and are even? Solution : a) There are 999/7 = 142 numbers in our range divisible by 7. b) There are 999/11 = 90 in our range divisible by 11, and there are 999/77 = 12 in our range divisible by both 7 and 11. Hence, we see that there are 142 12 = 130 numbers divisible 7 but not by 11. c) 999/77 = 12 d) By the principle of inclusion-exclusion, there are 999/7 + 999/11 999/77 = 142 + 90 12 = 220 numbers divisible by either 7 or 11. e) 220 12 = 208 f) 999 220 = 779 g) one-digit numbers: 9; two-digit numbers: 9 9 = 81; three-digit numbers: 9 9 8 = 648. The final answer is 9 + 81 + 648 = 738. h) one-digit numbers and odd: 5; two-digit numbers and odd: 8 5 = 40; three-digit numbers and odd: 8 8 5 = 320. So there are 5 + 40 + 320 = 365 odd numbers with distinct digits. Thus the final answer is 738 365 = 373. 28. How many license plates can be made using either three letters followed by three digits or four letters followed by two digits? Solution : 26 3 10 3 + 26 4 10 2 = 63, 273, 600. 36. How many partial functions are there from a set with five elements to sets with the following number of elements? a) 1 b) 2 c) 5 d) 9 Definition: (P69) A partial function f from a set A to a set B is an assignment to each element a in a subset of A, called the domain of definition of f, of a unique element b 2

in B. Solution : The answer is (n + 1) 5 in each case, where n is the number of elements in the codomain. a) 2 5 b) 3 5 c) 6 5 d) 10 5 44. How many bit strings of length 10 contain either five consecutive 0s or five consecutive 1s? Solution : First we count the number of bit strings of length 10 that contain five consecutive 0 s. We will base the count on where the string of five or more consecutive 0s starts. i) If it starts in the first bit, then the first five bits are all 0s, but there is free choice for the last five bits; therefore there are 2 5 = 32 such strings. ii) If start in the second bit, then the first bit must be a 1, then the next five bits are all 0s; but there is free choice for the last four bits; therefore there are 2 4 = 16 such strings. Similarly, there are 2 4 such strings that have five consecutive 0 s starting in each position third, four, five, six. This gives us a total of 32+5 16 = 112 strings that have five consecutive 0 s. Symmetrically, there 112 strings that have five consecutive 1 s. Clearly there are exactly two strings that contain both (1111100000 and 0000011111). Therefore by the inclusionexclusion principle, the answer is 112 + 112 2 = 222. 3

P353-354 6. Let d be a positive integer. Show that in any set of d + 1 (not necessarily consecutive) integers there are two with exactly the same remainder when they are divided by d. Solution : There are only d possible remainders when an integer is divided by d, namely 0, 1,, d 1. By the pigeonhole principle, if we have d + 1 remainders, then at least two must be the same. 10. Let (x i, y i ), i = 1, 2, 3, 4, 5 be a set of five distinct points with integer coordinates in the xy plane. Show that the midpoint of the line joining at least one pair of these points has integer coordinates. Solution : The midpoint of the segment whose endpoints are (a, b) and (c, d) is ((a + c)/2, (b + d)/2). We are concerned only with integer values of the original coordinates. Clearly the coordinates of these fractions will be integers as well if and only if a and c have the same parity (both odd or both even). Thus what matters in the problem is the parity of the coordinates. There are four possible pairs of parities: (odd, odd), (odd, even), (even, odd), (even, even) Since we are given five points, the pigeonhole principle of guarantees that at least two of them will have the same parities. The midpoint of the segment joining these two points will therefore have integer coordinates. 36. Prove that at a party where there are at least two people, there are two people who know the same number of other people there. Solution : Let K(x) be the number of other people at the party that person x knows. The possible values of K(x) are 0, 1,, n 1 where n 2 is the number of people at the party. We can not apply the pigeonhole principle directly, since there are n pigeons and n pigeonholes. However, it is impossible for both 0 and n 1 in the range of K,since if one person knows everybody else, then no body can know no one else. (We assume that knowing is symmetric). Therefore the range of K has at most n 1 elements, whereas the domain has n elements, so K is not one-to-one, precisely what we wanted to prove. 37-38. An arm wrestler is the champion for a period of 75 hours. The arm wrestler had at least one match an hour, but no more than 125 total matches. Show that there is a period of consecutive hours during which the arm wrestler had exactly 24 matches. If 24 is replaced by a) 2? b) 23? c) 25? d) 30? Solution : a) Let a i be the number of matches played up through and including hour i. Then 1 a 1 < < a 75 125 and 3 a 1 + 2 < < a 75 + 2 127. By the pigeonhole principle, we get a i = a j +2 for some i and j. This means that exactly 2 matches were played from hour j + 1 to i. 4

b) The solution of a), with 2 replaced by 23 and 127 replaced by 148, tell us that the statement is true. c) Let a i be the number of matches played up through and including hour i. Then 1 a 1 < < a 75 125 and 26 a 1 + 25 < < a 75 + 25 150. Now either these 150 numbers are precisely all the number from 1 to 150, or else by the pigeonhole principle we get, a i = a j + 25, some i and j, and we are done. In the former case, however, since each numbers a i + 25 is greater than or equal to 26, the numbers 1, 2,, 25 must all appear among a i s. But the a i s are increasing the only way this can happen is if a 1 = 1, a 2 = 2,, a 25 = 25. Thus there were 25 matches in the first 25hours. d) Let a i be the number of matches played up through and including hour i and note that 1 a 1 < < a 75 125. By the pigeonhole principle two of the numbers among a 1, a 2,, a 31 are congruent modulo 30. If the differ by 30, then we have our solution. Otherwise, they differ by 60 or more, so a 31 61. Similarly, among a 31 through a 61, either we find the solution, or two numbers must differ by 60 or more; therefore we can assume that a 61 121. But this means that a 66 126, a contradiction. 42. Let n 1, n 2,, n t be positive integers. Show that if n 1 + n 2 + + n t t + 1 objects are placed into t boxes, then for some i, i = 1, 2,, t the ith box contains at least n i objects. Solution: Suppose this statement are not true. Then for each i, the i th box contains at most n i 1 objects. Adding, we have at most (n 1 1)+(n 2 1)+ +(n t 1) = n 1 +n 2 + +n t t objects in all, contradicting the fact that there were n 1 + n 2 + + n t t + 1 objects in all. Therefore the statement must be true. 5