• Home
  • Textbooks
  • Discrete Mathematics and Its Applications
  • Counting

Discrete Mathematics and Its Applications

Kenneth H. Rosen

Chapter 5

Counting - all with Video Answers

Educators


Section 1

The Basics of Counting

01:24

Problem 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 major and the other is a computer science major?
b) How many ways are there to pick one representative who is either a mathematics major or a computer science major?

Khushbu Rani
Khushbu Rani
Numerade Educator
01:02

Problem 2

An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

Nick Johnson
Nick Johnson
Numerade Educator
01:05

Problem 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 the student answers every question?
b) How many ways can a student answer the questions on the test if the student can leave answers blank?

Clarissa Noh
Clarissa Noh
Numerade Educator
02:03

Problem 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?

Puneet Prajapati
Puneet Prajapati
Numerade Educator
00:53

Problem 5

Six different airlines fly from New York to Denver and seven fly from Denver to San Francisco. How many different pairs of airlines can you choose on which to book a trip from New York to San Francisco via Denver, when you pick an airline for the flight to Denver and an airline for the continuation flight to San Francisco? How many of these pairs involve more than one airline?

Anthony Ramos
Anthony Ramos
Numerade Educator
01:15

Problem 6

There are four major autoroutes from Boston to Detroit
and six from Detroit to Los Angeles. How many major auto routes are there from Boston to Los Angeles via Detroit?

Lucas Finney
Lucas Finney
Numerade Educator
00:48

Problem 7

How many different three-letter initials can people have?

Clarissa Noh
Clarissa Noh
Numerade Educator
02:37

Problem 8

How many different three-letter initials with none of the letters repeated can people have?

Nick Johnson
Nick Johnson
Numerade Educator
01:41

Problem 9

How many different three-letter initials are there that begin with an $A$ ?

Lucas Finney
Lucas Finney
Numerade Educator
View

Problem 10

How many bit strings are there of length eight?

Rachel Lopez
Rachel Lopez
Numerade Educator
View

Problem 11

How many bit strings of length ten both begin and end with a 1?

Victor Salazar
Victor Salazar
Numerade Educator
01:35

Problem 12

How many bit strings are there of length six or less?

Lucas Finney
Lucas Finney
Numerade Educator
02:59

Problem 13

How many bit strings with length not exceeding $n$, where $n$ is a positive integer, consist entirely of 1 s?

Anthony Ramos
Anthony Ramos
Numerade Educator
02:03

Problem 14

How many bit strings of length $n$, where $n$ is a positive integer, start and end with $1 \mathrm{~s}$ ?

Lucas Finney
Lucas Finney
Numerade Educator
02:58

Problem 15

How many strings are there of lowercase letters of length four or less?

Anthony Ramos
Anthony Ramos
Numerade Educator
02:58

Problem 16

How many strings are there of four lowercase letters that have the letter $x$ in them?

Anthony Ramos
Anthony Ramos
Numerade Educator
01:29

Problem 17

How many strings of five ASCII characters contain the character @ ("at" sign) at least once? (Note: There are 128 different ASCII characters.)

Clarissa Noh
Clarissa Noh
Numerade Educator
10:14

Problem 18

How many positive integers between 5 and 31
a) are divisible by 3 ? Which integers are these?
b) are divisible by 4 ? Which integers are these?
c) are divisible by 3 and by 4 ? Which integers are these?

Anthony Ramos
Anthony Ramos
Numerade Educator
15:09

Problem 19

How many positive integers between 50 and 100
a) are divisible by 7 ? Which integers are these?
b) are divisible by 11 ? Which integers are these?
c) are divisible by both 7 and 11? Which integers are these?

Lucas Finney
Lucas Finney
Numerade Educator
14:50

Problem 20

How many positive integers less than 1000
a) are divisible by 7 ?
b) are divisible by 7 but not by 11 ?
c) are divisible by both 7 and 11 ?
d) are divisible by either 7 or 11 ?
e) are divisible by exactly one of 7 and 11?
f) are divisible by neither 7 nor 11 ?
g) have distinct digits?
h) have distinct digits and are even?

Nick Johnson
Nick Johnson
Numerade Educator
05:18

Problem 21

How many positive integers between 100 and 999 inclusive
a) are divisible by 7 ?
b) are odd?
c) have the same three decimal digits?
d) are not divisible by 4 ?
e) are divisible by 3 or 4 ?
f) are not divisible by either 3 or 4 ?
g) are divisible by 3 but not by 4 ?
h) are divisible by 3 and 4 ?

Clarissa Noh
Clarissa Noh
Numerade Educator
15:15

Problem 22

How many positive integers between 1000 and 9999 inclusive
a) are divisible by 9 ?
b) are even?
c) have distinct digits?
d) are not divisible by 3 ?
e) are divisible by 5 or 7 ?
f) are not divisible by either 5 or 7 ?
g) are divisible by 5 but not by 7 ?
h) are divisible by 5 and 7 ?

Puneet Prajapati
Puneet Prajapati
Numerade Educator
05:03

Problem 23

How many strings of three decimal digits
a) do not contain the same digit three times?
b) begin with an odd digit?
c) have exactly two digits that are 4 s?

Anthony Ramos
Anthony Ramos
Numerade Educator
03:50

Problem 24

How many strings of four decimal digits
a) do not contain the same digit twice?
b) end with an even digit?
c) have exactly three digits that are 9 s?

Lucas Finney
Lucas Finney
Numerade Educator
00:38

Problem 25

A committee is formed consisting of one representative from each of the 50 states in the United States, where the representative from a state is either the governor or one of the two senators from that state. How many ways are there to form this committee?

Clarissa Noh
Clarissa Noh
Numerade Educator
01:29

Problem 26

How many license plates can be made using either three digits followed by three letters or three letters followed by three digits?

Lucas Finney
Lucas Finney
Numerade Educator
03:11

Problem 27

How many license plates can be made using either two letters followed by four digits or two digits followed by four letters?

Anthony Ramos
Anthony Ramos
Numerade Educator
01:57

Problem 28

How many license plates can be made using either three letters followed by three digits or four letters followed by two digits?

Lucas Finney
Lucas Finney
Numerade Educator
02:54

Problem 29

How many license plates can be made using either two or three letters followed by either two or three digits?

Anthony Ramos
Anthony Ramos
Numerade Educator
03:48

Problem 30

How many strings of eight English letters are there
a) if letters can be repeated?
b) if no letter can be repeated?
c) that start with $\mathrm{X}$, if letters can be repeated?
d) that start with $\mathrm{X}$, if no letter can be repeated?
e) that start and end with $\mathrm{X}$, if letters can be repeated?
f) that start with the letters BO (in that order), if letters can be repeated?
g) that start and end with the letters BO (in that order), if letters can be repeated?
h) that start or end with the letters BO (in that order), if letters can be repeated?

Carson Merrill
Carson Merrill
Numerade Educator
05:08

Problem 31

How many strings of eight English letters are there
a) that contain no vowels, if letters can be repeated?
b) that contain no vowels, if letters cannot be repeated?
c) that start with a vowel, if letters can be repeated?
d) that start with a vowel, if letters cannot be repeated?
e) that contain at least one vowel, if letters can be repeated?
f) that contain exactly one vowel, if letters can be repeated?
g) that start with $\mathrm{X}$ and contain at least one vowel, if letters can be repeated?
h) that start and end with $\mathrm{X}$ and contain at least one vowel, if letters can be repeated?

Clarissa Noh
Clarissa Noh
Numerade Educator
03:48

Problem 32

How many different functions are there from a set with 10 elements to sets with the following numbers of elements?
a) 2
b) 3
c) 4
d) 5

Lucas Finney
Lucas Finney
Numerade Educator
02:21

Problem 33

How many one-to-one functions are there from a set with five elements to sets with the following number of elements?
a) 4
b) 5
c) 6
d) 7

Clarissa Noh
Clarissa Noh
Numerade Educator
01:25

Problem 34

How many functions are there from the set $\{1,2, \ldots, n\}$, where $n$ is a positive integer, to the set $\{0,1\}$ ?

Manisha Sarker
Manisha Sarker
Numerade Educator
05:43

Problem 35

How many functions are there from the set $\{1,2$, $\ldots, n\}$, where $n$ is a positive integer, to the set $\{0,1\}$
a) that are one-to-one?
b) that assign 0 to both 1 and $n$ ?
c) that assign 1 to exactly one of the positive integers less than $n$ ?

Clayton Schubring
Clayton Schubring
Numerade Educator
03:48

Problem 36

How many partial functions (see the preamble to Exercise 73 in Section 2.3) are there from a set with five elements to sets with each of these number of elements?
a) 1
b) 2
c) 5
d) 9

Lucas Finney
Lucas Finney
Numerade Educator
02:56

Problem 37

How many partial functions (see the preamble to Exercise 73 in Section 2.3) are there from a set with $m$ elements to a set with $n$ elements, where $m$ and $n$ are positive integers?

Anthony Ramos
Anthony Ramos
Numerade Educator
03:34

Problem 38

How many subsets of a set with 100 elements have more than one element?

Nick Johnson
Nick Johnson
Numerade Educator
02:08

Problem 39

A palindrome is a string whose reversal is identical to the string. How many bit strings of length $n$ are palindromes?

Clarissa Noh
Clarissa Noh
Numerade Educator
08:09

Problem 40

In how many ways can a photographer at a wedding arrange 6 people in a row from a group of 10 people, where the bride and the groom are among these 10 people, if
a) the bride must be in the picture?
b) both the bride and groom must be in the picture?
c) exactly one of the bride and the groom is in the picture?

Nick Johnson
Nick Johnson
Numerade Educator
08:59

Problem 41

In how many ways can a photographer at a wedding arrange six people in a row, including the bride and groom, if
a) the bride must be next to the groom?
b) the bride is not next to the groom?
c) the bride is positioned somewhere to the left of the groom?

Lucas Finney
Lucas Finney
Numerade Educator
03:56

Problem 42

How many bit strings of length seven either begin with two 0 s or end with three $1 \mathrm{~s}$ ?

Lucas Finney
Lucas Finney
Numerade Educator
06:15

Problem 43

How many bit strings of length 10 either begin with three 0 or end with two 0 s?

Anthony Ramos
Anthony Ramos
Numerade Educator
06:36

Problem 44

How many bit strings of length 10 contain either five consecutive 0 s or five consecutive $1 \mathrm{~s}$ ?

Nick Johnson
Nick Johnson
Numerade Educator
View

Problem 45

How many bit strings of length eight contain either three consecutive 0 s or four consecutive $1 \mathrm{~s}$ ?

Rachel Lopez
Rachel Lopez
Numerade Educator
01:10

Problem 46

Every student in a discrete mathematics class is either a computer science or a mathematics major or is a joint major in these two subjects. How many students are in the class if there are 38 computer science majors (including joint majors), 23 mathematics majors (including joint majors), and 7 joint majors?

Carson Merrill
Carson Merrill
Numerade Educator
02:11

Problem 47

How many positive integers not exceeding 100 are divisible either by 4 or by 6 ?

Clarissa Noh
Clarissa Noh
Numerade Educator
01:35

Problem 48

How many different initials can someone have if a person has at least two, but no more than five, different initials? Assume that each initial is one of the 26 letters of the English language.

Lucas Finney
Lucas Finney
Numerade Educator
09:58

Problem 49

Suppose that a password for a computer system must have at least 8 , but no more than 12 , characters, where each character in the password is a lowercase English letter, an uppercase English letter, a digit, or one of the six special characters $*,>,<, 1,+$, and $=$.
a) How many different passwords are available for this computer system?
b) How many of these passwords contain at least one occurrence of at least one of the six special characters?
c) If it takes one nanosecond for a hacker to check whether each possible password is your password, how long would it take this hacker to try every possible password?

Anthony Ramos
Anthony Ramos
Numerade Educator
04:26

Problem 50

The name of a variable in the $\mathrm{C}$ programming language is a string that can contain uppercase letters, lowercase letters, digits, or underscores. Further, the first character in the string must be a letter, either uppercase or lowercase, or an underscore. If the name of a variable is determined by its first eight characters, how many different variables can be named in $\mathrm{C}$ ? (Note that the name of a variable may contain fewer than eight characters.)

Nick Johnson
Nick Johnson
Numerade Educator
02:20

Problem 51

Suppose that at some future time every telephone in the world is assigned a number that contains a country code 1 to 3 digits long, that is, of the form $X$, $X X$, or $X X X$, followed by a 10 -digit telephone number of the form $N X X-N X X-X X X X$ (as described in Example 8). How many different telephone numbers would be available worldwide under this numbering plan?

Carson Merrill
Carson Merrill
Numerade Educator
01:17

Problem 52

Use a tree diagram to find the number of bit strings of length four with no three consecutive $0 \mathrm{~s}$.

Carson Merrill
Carson Merrill
Numerade Educator
03:20

Problem 53

How many ways are there to arrange the letters $a, b, c$, and $d$ such that $a$ is not followed immediately by $b$ ?

Clarissa Noh
Clarissa Noh
Numerade Educator
01:52

Problem 54

Use a tree diagram to find the number of ways that the World Series can occur, where the first team that wins four games out of seven wins the series.

Carson Merrill
Carson Merrill
Numerade Educator
01:48

Problem 55

Use a tree diagram to determine the number of subsets of $\{3,7,9,11,24\}$ with the property that the sum of the elements in the subset is less than 28 .

Clarissa Noh
Clarissa Noh
Numerade Educator
01:08

Problem 56

a) Suppose that a store sells six varieties of soft drinks: cola, ginger ale, orange, root beer, lemonade, and cream soda. Use a tree diagram to determine the number of different types of bottles the store must stock to have all varieties available in all size bottles if all varieties are available in 12 -ounce bottles, all but lemonade are available in 20 -ounce bottles, only cola and ginger ale are available in 32 -ounce bottles, and all but lemonade and cream soda are available in 64 -ounce bottles?
b) Answer the question in part (a) using counting rules.

Carson Merrill
Carson Merrill
Numerade Educator
02:57

Problem 57

a) Suppose that a popular style of running shoe is available for both men and women. The woman's shoe comes in sizes $6,7,8$, and 9 , and the man's shoe comes in sizes $8,9,10,11$, and 12 . The man's shoe comes in white and black, while the woman's shoe comes in white, red, and black. Use a tree diagram to determine the number of different shoes that a store has to stock to have at least one pair of this type of running shoe for all available sizes and colors for both men and women.
b) Answer the question in part (a) using counting rules.

Clayton Schubring
Clayton Schubring
Numerade Educator
02:12

Problem 58

Use the product rule to show that there are $2^{2 *}$ different truth tables for propositions in $n$ variables.

Lucas Finney
Lucas Finney
Numerade Educator
01:59

Problem 59

Use mathematical induction to prove the sum rule for $m$ tasks from the sum rule for two tasks.

Carson Merrill
Carson Merrill
Numerade Educator
03:36

Problem 60

Use mathematical induction to prove the product rule for $m$ tasks from the product rule for two tasks.

Carson Merrill
Carson Merrill
Numerade Educator
01:32

Problem 61

How many diagonals does a convex polygon with $n$ sides have? (Recall that a polygon is convex if every line segment connecting two points in the interior or boundary of the polygon lies entirely within this set and that a diagonal of a polygon is a line segment connecting two vertices that are not adjacent.)

Clarissa Noh
Clarissa Noh
Numerade Educator
05:34

Problem 62

Data are transmitted over the Internet in datagrams, which are structured blocks of bits. Each datagram contains header information organized into a maximum of 14 different fields (specifying many things, including the source and destination addresses) and a data area that contains the actual data that are transmitted. One of the 14 header fields is the header length field (denoted by HLEN), which is specified by the protocol to be 4 bits long and that specifies the header length in terms of 32 -bit blocks of bits. For example, if HLEN $=0110$, the header is made up of six 32-bit blocks. Another of the 14 header fields is the 16 -bit-long total length field (denoted by TOTAL LENGTH), which specifies the length in bits of the entire datagram, including both the header fields and the data area. The length of the data area is the total length of the datagram minus the length of the header.
a) The largest possible value of TOTAL LENGTH (which is 16 bits long) determines the maximum total length in octets (blocks of 8 bits) of an Internet datagram. What is this value?
b) The largest possible value of HLEN (which is 4 bits long) determines the maximum total header length in 32-bit blocks. What is this value? What is the maximum total header length in octets?
c) The minimum (and most common) header length is 20 octets. What is the maximum total length in octets of the data area of an Internet datagram?
d) How many different strings of octets in the data area can be transmitted if the header length is 20 octets and the total length is as long as possible?

Lucas Finney
Lucas Finney
Numerade Educator