1 / 21

Discrete Structures for Computer Science Section – 3 - Tutorial – 2 (21 Aug 2013)

Discrete Structures for Computer Science Section – 3 - Tutorial – 2 (21 Aug 2013). Jagat Sesh Challa. Problem - 1. Determine the number of four digit decimal numbers that contain no repeated digits. This is a problem of arranging 4 of 10 digits 0,1,2,…,9. So the answer is .

Download Presentation

Discrete Structures for Computer Science Section – 3 - Tutorial – 2 (21 Aug 2013)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Structures for Computer ScienceSection – 3 - Tutorial – 2 (21 Aug 2013) JagatSeshChalla

  2. Problem - 1 Determine the number of four digit decimal numbers that contain no repeated digits. This is a problem of arranging 4 of 10 digits 0,1,2,…,9. So the answer is . Is this answer correct ??? How many of them have leading zeros? So, the result is The result can also be computed as

  3. Problem - 2 How many 4 digit decimal sequences are possible when digits are allowed to be repeated? How many of them contain one or more repeated digits? Total number of 4 digit decimal sequences that are possible = Total number of sequences without repetition = Therefore, Total number of sequences containing one or more repeated digits = .

  4. Problem - 3 Out of all r digit binary sequences, how many of them have even number of 1’s? Total number of r digit binary sequences = Total number of (r-1) digit binary sequences = These sequences, will either have even number of 1’s or odd number of 1’s. For the sequences with even number of 1’s we append 0 to make it r digit sequence with even number of 1’s For the sequences with odd number of 1’s we append 1 to make it r digit sequence with even number of 1’s Therefore, Total number of r digit sequences with even number of 1’s =

  5. Problem – 4 Among 11 senators, how may ways can we select a committee of five members so that at least one of Senator A and Senator B will be included. Among 11 senators, Total no of ways to select a committee of 5 members = No of committees where Senator A is always included = No of committees where Senator A is always excluded = No of committees where both Senator A and B are present =

  6. Problem – 4 No of selections including Senator A but excluding Senator B = . No of selections including Senator B but excluding Senator A = . So, total no of ways of selecting committees where either Senator A or B are present Alternatively, Since the no of ways of selecting a committee excluding both A and B is So, the total ways of selection =

  7. Problem – 4 This problem can be solved by applying the principle of inclusion and exclusion. Let & be the set of ways of selection that includes Senator A and B respectively. Therefore

  8. Problem - 5 How many ways can I select 15 cans of soda from a cooler containing large quantities of Coke, Pepsi, Diet Coke, Root Beer and Sprite? We have to model this problem using the chart: Here, we set an order of the categories and just count how many from each category are chosen.

  9. Problem - 5 Now, each event will contain fifteen 1’s, but we need to indicate where we transition from one category to the next. If we use 0 to mark our transitions, then the events become: A: 1110111011101110111 B: 1100111111011111101 C: 0111101111111011110 Thus, associated with each event is a binary string with #1’s = #things to be chosen and #0’s = #transitions between categories.

  10. Problem - 5 From this example we see that the number of ways to select 15 sodas from a collection of 5 types of soda is C(15 + 4,15) = C(19,15) = C(19,4). Note that #zeros = #transitions = #categories - 1. Theorem: The number of ways to fill r slots from n categories with repetition allowed is: C(r + n - 1, r) = C(r + n - 1, n - 1). In words, the counts are: C(#slots + #transitions, #slots) or C(#slots + #transitions, #transitions).

  11. Problem - 5.1& 5.2 How many ways can I fill a box holding 100 pieces of candy from 30 different types of candy? Solution: Here #slots = 100, #transitions = 30 - 1, so there are C(100+29,100) = 129!/(100!29!) different ways to fill the box. How many ways if I must have at least 1 piece of each type? Solution: Now, we are reducing the #slots to choose over to (100 - 30) slots, so there are C(70+29,70) = 99!/70!29!

  12. Problem - 6 What is the probability that out of 23 people, none of them have birthday on the same date? Sample space = Assume that all these distributions are equiprobable. No of distributions such that no birthdays of 2 people are on the same day = In other words it is Therefore Probability that none of them have same birth date =

  13. Problem - 7 Digital data received from a remote site might fill up 0 to 32 buffers. Let the sample space be , where the sample denotes that of the buffers are full. It is given that ) Compute Probability that at most 16 buffers are full. Probability that odd number of buffers are full. Probability that odd number of buffers are full and at most 16 of the buffers are full.

  14. Problem - 7 Let A be the event that at most 16 buffers are full. Then . Let B be the event that odd number of buffers are full. Then What we want is

  15. Problem - 8 8 students are standing in a line for an interview. We want to determine the probability that exactly two 1styearites, two 2ndyearites, two 3rdyearites and two 4thyearites are standing in the queue. Sample space = . No of samples meeting the above criteria = Therefore probability =

  16. Problem - 9 Generate next and previous 10 permutations of 124653. Next 10 permutations - 124653 -> 125346 -> 125364 -> 125436 -> 125463 -> 125634 -> 125643 -> 126345 -> 126354 -> 126435 Previous 10 permutations – 124653 -> 124635 -> 124563 -> 124536 -> 124365 -> 124356 -> 123654 -> 123645 -> 123564 -> 123546

  17. Problem - 10 Three dice were rolled. Given that no two faces were the same, what is the probability that there was an ace? Let A denote the event that there was an ace. Let B denote the event that no two faces were the same. What we want is . We have So

  18. Problem – 11 A die is rolled. The die has red color on the sides 4 and 6. Let A be the event that 4 has occurred. Let B be the event that a red has come. Find information of both the events. Also, find mutual information of event A given B has occurred.

  19. Problem -11

  20. Problem - 12 Tri-mino Problem Best explained on the Board…!!!

  21. Q & A

More Related