Download
handshake problem and phone call problem n.
Skip this Video
Loading SlideShow in 5 Seconds..
Handshake Problem and Phone Call Problem PowerPoint Presentation
Download Presentation
Handshake Problem and Phone Call Problem

Handshake Problem and Phone Call Problem

176 Views Download Presentation
Download Presentation

Handshake Problem and Phone Call Problem

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Handshake Problem If there are 30 people in a room and everyone has to shake hands, how many handshakes will there be? What about if there are n people in the room? Handshake Problem and Phone Call Problem Phone Call Problem 30 people are invited to a party. If every person speaks to every other person on the phone beforehand, how many phone calls will there be? What about if there are n people invited to the party?

  2. Student 1 ViewPoint – Start Simple! 0 1 3 6 10 4 people 1 person 2 people 5 people 3 people

  3. +1 +2 +3 +4 +5 +1 +1 +1 +1 Sequence: 0, 1, 3, 6, 10, 15, ... Since the second difference is constant, we have a quadratic sequence with first term ½ n² ½ n² Compare Original Sequence with Sequence: 0, 1, 3, 6, 10, 15, ... ½ n²: 0.5 2 4.5 8 12.5 18 -0.5, -1, -1.5, -2, -2.5, -3, ... T(n) = -½n Therefore T(n) = ½ n² - ½n

  4. Questions you might ask yourself? • What do T(n) and n represent? 2) Does the formula work?

  5. Student 2 Viewpoint Start with less people. For example when n = 6 If there are 6 people then every single person will have to make 5 phone calls. 6 x 5 = 30 calls However, this is twice as many calls as is needed because if you´ve already been called by someone then you don´t need to call them back. Therefore, the number of calls is: 6 x 5 = 15 calls 2

  6. Student 2 Viewpoint Hence for n = 7 people, the number of calls is: 7 x 6 = 21 calls 2 For n = 8 people, 8 x 7 = 28 calls 2 For n people, n x (n-1) = Number of calls 2

  7. Student 2 Viewpoint (without words) 6 x 5 = 30 calls 6 x 5 = 15 calls 2 7 x 6 = 21 calls 2 8 x 7 = 28 calls 2 n x (n-1) = Number of calls 2 Which is easier to understand?

  8. Student 3 viewpoint Number of Telephone Calls = What does this mean? Out of n objects, how many ways are there to choose 2 of them? E.g. If you have one object: can´t choose two of them! two objects: 1 way to choose three objects: 3 ways to choose four objects: 6 ways to choose five objects: 10 ways to choose etc. Lisa & Bart Lisa & Homer Bart & Homer Lisa & Marge Bart & Marge Marge & Homer Lisa & Maggie Bart & Maggie Marge & Maggie Homer & Maggie So we do have the triangle number sequence again: 1, 3, 6, 10, 15, ...

  9. Why does = n(n-1) ? 2 = n! 2!(n-2)! = n x ( n-1) x (n - 2)! 2! (n – 2)! = n(n – 1) 2 11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 11 6 15 20 15 6 11 7 21 35 35 21 7 11 8 28 56 70 56 28 8 11 9 36 84 126 126 84 36 9 1