Discrete Math:
Example illustrating the Subtraction Rule in discrete mathematics, focusing on counting binary strings of length eight that either start with a 1 bit or end with the two bits 00. Understand the application of the product rule in determining the number of ways to construct such strings.
Uploaded on Feb 21, 2025 | 0 Views
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Discrete Math: Example1 The Subtraction Rule
Example 1 of The Subtraction Rule How many bit strings of length eight either start with a 1 bit or end with the two bits 00?
Solution We can construct a bit string of length eight that either starts with a 1 bit or ends with the two bits 00, by constructing a bit string of length eight beginning with a 1 bit or by constructing a bit string of length eight that ends with the two bits 00. We can construct a bit string of length eight that begins with a 1 in 27 = 128 ways. This follows by the product rule, because the first bit can be chosen in only one way and each of the other seven bits can be chosen in two ways. Similarly, we can construct a bit string of length eight ending with the two bits 00, in 26 = 64 ways.
Solution This follows by the product rule, because each of the first six bits can be chosen in two ways and the last two bits can be chosen in only one way. Some of the ways to construct a bit string of length eight starting with a 1 are the same as the ways to construct a bit string of length eight that ends with the two bits 00. There are 25 = 32 ways to construct such a string. This follows by the product rule, because the first bit can be chosen in only one way, each of the second through the sixth bits can be chosen in two ways, and the last two bits can be chosen in one way. Consequently, the number of bit strings of length eight that begin with a 1 or end with a 00, which equals the number of ways to construct a bit string of length eight that begins with a 1 or that ends with 00, equals 128 + 64 32 = 160.
References Discrete Mathematics and Its Applications, McGraw-Hill; 7th edition (June 26, 2006). Kenneth Rosen Discrete Mathematics An Open Introduction, 2nd edition. Oscar Levin A Short Course in Discrete Mathematics, 01 Dec 2004, Edward Bender & S. Gill Williamson