CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID:

Similar documents
It is important that you show your work. The total value of this test is 220 points.

Class 8: Factors and Multiples (Lecture Notes)

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

Activity 1: Play comparison games involving fractions, decimals and/or integers.

Final Exam, Math 6105

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

Topics to be covered

Solution: This is sampling without repetition and order matters. Therefore

Grade 7 Data Handling - Probability, Statistics

Sec 5.1 The Basics of Counting

Unit Nine Precalculus Practice Test Probability & Statistics. Name: Period: Date: NON-CALCULATOR SECTION

MAT104: Fundamentals of Mathematics II Counting Techniques Class Exercises Solutions

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

CS 202, section 2 Final Exam 13 December Pledge: Signature:

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

CMPSCI 240: Reasoning Under Uncertainty First Midterm Exam

EE 126 Fall 2006 Midterm #1 Thursday October 6, 7 8:30pm DO NOT TURN THIS PAGE OVER UNTIL YOU ARE TOLD TO DO SO

Today s Topics. Sometimes when counting a set, we count the same item more than once

Math 1111 Math Exam Study Guide

MA 180/418 Midterm Test 1, Version B Fall 2011

CSC/MTH 231 Discrete Structures II Spring, Homework 5

Discrete Mathematics. Spring 2017

RANDOM EXPERIMENTS AND EVENTS

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Probability and Counting Techniques

Quantitative Aptitude Preparation Numbers. Prepared by: MS. RUPAL PATEL Assistant Professor CMPICA, CHARUSAT

Section 5.4. Greatest Common Factor and Least Common Multiple. Solution. Greatest Common Factor and Least Common Multiple

Name: Exam 1. September 14, 2017

Fundamentals of Probability

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall


Discrete Structures Lecture Permutations and Combinations

Teaching the TERNARY BASE

Multiples and Divisibility

STAT Statistics I Midterm Exam One. Good Luck!

Outline. Content The basics of counting The pigeonhole principle Reading Chapter 5 IRIS H.-R. JIANG

Math is Cool Championships Sponsored by: EKA Chemicals 6 th Grade - February 26, 1999 Individual Contest

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

Math 1111 Math Exam Study Guide

Jong C. Park Computer Science Division, KAIST

Elementary Combinatorics CE 311S

ECON 214 Elements of Statistics for Economists

Grade 6 Math Circles March 1-2, Introduction to Number Theory

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Class 8: Square Roots & Cube Roots (Lecture Notes)

Week 1: Probability models and counting

Olympiad Combinatorics. Pranav A. Sriram

6.1 Basics of counting

Chapter 1. Probability

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Elementary Combinatorics

7.1 Experiments, Sample Spaces, and Events

Counting Principles Review

Permutations and Combinations

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

CSE 21 Mathematics for Algorithm and System Analysis

PROBABILITY. 1. Introduction. Candidates should able to:

Counting. Chapter 6. With Question/Answer Animations

Solutions to Exercises on Page 86

CPCS 222 Discrete Structures I Counting

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

CALCULATING SQUARE ROOTS BY HAND By James D. Nickel

Removing the Fear of Fractions from Your Students Thursday, April 16, 2015: 9:30 AM-10:30 AM 157 A (BCEC) Lead Speaker: Joseph C.

Review. Natural Numbers: Whole Numbers: Integers: Rational Numbers: Outline Sec Comparing Rational Numbers

Fundamental. If one event can occur m ways and another event can occur n ways, then the number of ways both events can occur is:.

THE PROBLEM OF TWO ACES. Carl E. Mungan Physics Department, U.S. Naval Academy

Summer Work th Grade Skills that are necessary for success in 7 th grade and beyond:

Counting in Algorithms

Number Sense and Decimal Unit Notes

CMPSCI 240: Reasoning Under Uncertainty First Midterm Exam

Pan (7:30am) Juan (8:30am) Juan (9:30am) Allison (10:30am) Allison (11:30am) Mike L. (12:30pm) Mike C. (1:30pm) Grant (2:30pm)

MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES

With Question/Answer Animations. Chapter 6

CSE 21: Midterm 1 Solution

MATHEMATICS 152, FALL 2004 METHODS OF DISCRETE MATHEMATICS Outline #10 (Sets and Probability)

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017

CSE 1400 Applied Discrete Mathematics Permutations

ECE313 Summer Problem Set 4. Reading: RVs, mean, variance, and coniditional probability

The point value of each problem is in the left-hand margin. You must show your work to receive any credit, except on problems 1 & 2. Work neatly.

4.1 Sample Spaces and Events

Section Summary. Permutations Combinations Combinatorial Proofs

November 8, Chapter 8: Probability: The Mathematics of Chance

Midterm Examination. CSCI 561: Artificial Intelligence

QUANTITATIVE APTITUDE

Implementation / Programming: Random Number Generation

n r for the number. (n r)!r!

Dealing with some maths

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Reading 14 : Counting

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

Class 6 Natural and Whole Numbers

MGF 1106: Exam 2 Solutions

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

Moore, IPS 6e Chapter 05

More with Combinations

2.5 Sample Spaces Having Equally Likely Outcomes

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

3 The multiplication rule/miscellaneous counting problems

Transcription:

CS Discrete Mathematical Structure Midterm Exam Solution Tuesday, April 17, 007 1:0 1:4 pm Last Name: First Name: Student ID: Problem No. Points Score 1 10 10 10 4 1 10 6 10 7 1 Total 80 1

This is a closed book, closed notes exam with one exception: you may use a sheet (both sides) of your notes and summary, and the use of calculator is allowed. Answer question worth 70 points or more (total score is 80). The exam will be graded for a maximum score of 70 points. Show all the major steps in your work. 1. (10 points) How many strings of four decimal digits a) do not contain the same digit twice? (4 points) b) end with an even digit? ( points) c) have exactly three digits that are 9s? ( points) Sol: (a) There are 10 ways to choose the first digit, 9 ways to choose the second, and so on; therefore the answer is 10 9 8 7 040; (b) There are 10 ways to choose the first three digits and ways to choose the last; therefore the answer is 10 10 10 000 (c) There are 4 ways to choose the position that is to be different from 9, and 9 ways to choose the digit to go there. Therefore there are 4 9 6 such strings.. (10 points) (a) What are the quotient and remainder when (i) -109 is divided by 1 (ii) 41 is divided by 17 ( points) Sol: 109 9 1 + 8, q 9and r 8 41 6 + 9, q 6 and r 9 (b) Find the greatest common divisor and least common multiple of the pair integers: 7 11 and 11 ( points) Sol: gcd min(0,) min(1,) min(,0) 7 min(1,0) 11 min(1,) min(0,1) 11 lcm max( 0,) max( 1,) max(,0) 7 max( 1,0) 11 max( 1,) max( 0,1) 7 11 7774600

. (10 points) Find f(1), f(), f(), f(4), and f() if f(n) is defined recursively by f ( 0) and for n 0,1,, K a) f ( n + 1) f ( n) f ( n) ( points) b) f ( n f ( n) / + 1) ( points) Sol: (a) f (1) f () f () f (4) f () f (0) f (1) f () f () ( ) f () f (4) f (0) f (1) 1 f () 1 f (4) 141 1 ( ) 1 1 141 141 19,97 f (0) / (b) First note f (1) f (0). In the same manner, f ( n) for all n. 4. (1 points) Use mathematical induction to prove that 1 + + + L + (n + 1) ( n + 1)(n + 1)(n + ) / whenever n is a nonnegative integer. Sol: (i) Basis step. Prove P (0) true LHS 1; RHS ( 0 + 1)( 0 + 1)( 0 + ) / / 1 Therefore P (1) is true. (ii) Inductive Step. Assume P (n) true. Consider P ( n + 1) 1 + + L+ (n + 1) ( n + 1)(n + 1)(n + ) / + (n + ) (n+ )[n + 9n+ 10] + (( n + 1) + 1) (n+ )( n+ )( n+ ) Therefore P( n + 1) is ture. Hence, for all n, P (n) is true. ( n + 1)(n + 1)(n + ) / + (( n + 1) + 1) (n+ )[( n+ 1)( n+ 1) + (n+ )] ( n+ )(( n+ 1) + 1)(( n+ 1) + ) (n+ )[n + n+ 1+ 6n+ 9]

. (10 points) What is the probability of these events when we randomly select a permutation of { 1,, L, n} where n 4? a) 1 precedes. (. points) b) 1 immediately precedes. (. points) c) n precedes 1 and n-1 precedes. (. points) d) n precedes 1 and n precedes. (. points) Sol: We exploit symmetry in answering many of these. (a) Since 1 has either to precede or to follow it, and there is no reason that one of these should be any more likely than the other, we immediately see the answer is ½. (b) For 1 immediately to precede, we can think of these two numbers as glued together in forming the permutation. Then we are really permuting n 1 numbers the single numbers from through n and the one glued object. There are ( n 1)! ways to do this. Since there are n! permutations in all, the probability of randomly selecting one of these is ( n 1)!/ n! 1/ n. (c) Half of the permutations have n preceding 1. Of these permutations, half of them have n 1 preceding. Therefore one fourth of the permutations satisfy these conditions, so the probability is ¼. (d) Looking at the relative placements of 1,, and n, we see that one third of the time, n will come first. Therefore the answer is 1/. 6. (10 points) Assume the probability a child is a boy is 0.1 and that the sexes of children born into a family are independent. What is the probability that a family of five children has: a) exactly three boys? ( points) b) at least one boy ( points) c) at least one girl ( points) d) all children of the same sex? ( points) Sol: These questions are applications of binomial distributions. We call having a boy success. Then p 0. 1 and n for this problem. (a) The answer is: C (,) p (1 p) C(,) 0.1 0.49 0. (b) There will be at least one boy if there are not all girls. The probability of all girls is 0.49, so the answer is 1 0.49 0. 97. (c) This is just like part (b). The answer is 1 0.1 0. 96. (d) There are two ways this can happen. The answer is clearly 0.1 + 0.49 0. 06 4

7. (1 points) What is the probability of that a -card poker hand contains (the total number of cards is ) (a) all hearts ( points) (b) cards of the same suit? ( points) (c) three spades and two clubs? ( points) (d) two cards of one suit and three cards of a second suit. ( points) (e) one diamond, two hearts, one spade and one club? ( points) (f) two cards of one suit, one card of a second suit, one card of a third suit, and one card of the fourth suit? ( points) C(1,) Sol: (a) Prob C(,) C(1,) 4 (b) Prob C(,) C(1,) C(1,) (c) Prob C(,) C(41, ) C(1,) C(1, ) C(1,) (d) Prob C(,) C(1,1) C(1,) C(1,1) C(11, ) (e) Prob C(,) C(41, ) C(1,) C(1, ) C(11, ) C(1, ) C(11, ) C(11, ) (f) Prob C(,)