Problem Solving in mathematics and computer science	Team 4	Chapter 13 	Reading in MathematicsTeam members:Lishu LiuYun ZhangProsunjitBiswasTahmina Ahmed
How ideas and relationships are expressed in mathematics?Ideas and relationships are expressed through notations, symbols, numbers and formulas.Symbol: =,<,>,+,-,*,/ etc.Number: 1,2,3,0.1,1/2,logn etc.Formula: ex. y = x+2
Thought pattern in mathematicsThe three patterns are: ProcessProblem solvingComparison and contrast
The kissing problem
Problem solving in mathematics- step1Define the problemEveryone must kiss each other.We  define one kiss as occurring when two people kiss each other, any number of times.Q: How many kisses will occur if we have n people? 
Problem solving in mathematics- step2Try to solvethe problem for simple cases
Problem solving in mathematics- step3Look for a pattern or cluen=2:    1 kiss  n=1:    0 kiss 3123142n=4:    3+2+1 kissesn=3:    2+1 kisses
Problem solving in mathematics- step3 (continuing…)n = 5, kisses = 4 + 3 + 2 + 1n = 6, kisses = 5 + 4 + 3 + 2 +1n= 7, kisses = 6 + 5 + 4 + 3 + 2 + 1So, what can be the pattern for the kissing problem?
Problem solving in mathematics- step4Guess and checkWhat if we have n people??
Problem solving in mathematics- step5Use knowledge to solve the problem and extend the solution Kisses = (n-1) + (n-2) + …  +  1
Problem solving in mathematics- step6Try to find a better solution Kisses = (n-1) + (n-2) + …  +  1                         = (n + n + … + n) – (1 + 2 + … + (n-1))               = n(n-1) – n(n-1)/2               = n(n-1)/2(n-(n-1))(n-1) factors(n-1) factors(n-1) factors
Summarizing steps  in mathematicsFlow chart
Problem solving in computer science - step1Define the problemEveryone must kiss each other.We  define one kiss as occurring when two people kiss each other, any number of times.Q: For N number of People how many kisses there will be ?
Problem solving in computer science - step2Get sample input and output for simple casesDefine input    1, 2, 3, 4 …	                           |  |  |   |Define output 0, 1, 3, 6 …
Problem solving in computer science - step3Construct logic with the patternFor first two inputSo, We can assume that for n people n -1 kisses.n=1:    0 kiss                                                                  n=2 :    1 kiss
Problem solving in computer science - step3We consider more input & output to justify our guess(kiss=n-1).     n=1:    0 kiss                                                              n=2:    1 kiss n=3:    2 kisses                                                     n=4:    3 kissesBut this time we are indeed wrong. So, need to improve our guess.
Problem solving in computer science - step4We will improve our solution through trial & error.what will  happen if we cannot reach the exact solution ?
Problem solving in computer science – step4So, we will construct & justify our logic using mathematical formula. Kisses = n (n-1) / 2
Problem solving in computer science - step5Now we have the solutionNow its time to code !FIND NO OF KISSES( N)          KISS=N(N-1)/2RETURN KISS
Problem solving in computer science - step6Problem solved!Why do we really need a computer to solve the problem?
Summarizing steps  in computer scienceFlow chart
Mathematics vs. Computer Science
Historical relation between mathematics & computer scienceDonald Knuth (Professor of Stanford)-- Father of Analysis of  AlgorithmGraduated in Mathematics (Case Institute of Tech.)PhD in Mathematics (Caltech)
Acknowledgement
Questions?
Problem solving strategies in mathematics and computer science

Problem solving strategies in mathematics and computer science

  • 1.
    Problem Solving inmathematics and computer science Team 4 Chapter 13 Reading in MathematicsTeam members:Lishu LiuYun ZhangProsunjitBiswasTahmina Ahmed
  • 2.
    How ideas andrelationships are expressed in mathematics?Ideas and relationships are expressed through notations, symbols, numbers and formulas.Symbol: =,<,>,+,-,*,/ etc.Number: 1,2,3,0.1,1/2,logn etc.Formula: ex. y = x+2
  • 3.
    Thought pattern inmathematicsThe three patterns are: ProcessProblem solvingComparison and contrast
  • 4.
  • 5.
    Problem solving inmathematics- step1Define the problemEveryone must kiss each other.We define one kiss as occurring when two people kiss each other, any number of times.Q: How many kisses will occur if we have n people? 
  • 6.
    Problem solving inmathematics- step2Try to solvethe problem for simple cases
  • 7.
    Problem solving inmathematics- step3Look for a pattern or cluen=2: 1 kiss n=1: 0 kiss 3123142n=4: 3+2+1 kissesn=3: 2+1 kisses
  • 8.
    Problem solving inmathematics- step3 (continuing…)n = 5, kisses = 4 + 3 + 2 + 1n = 6, kisses = 5 + 4 + 3 + 2 +1n= 7, kisses = 6 + 5 + 4 + 3 + 2 + 1So, what can be the pattern for the kissing problem?
  • 9.
    Problem solving inmathematics- step4Guess and checkWhat if we have n people??
  • 10.
    Problem solving inmathematics- step5Use knowledge to solve the problem and extend the solution Kisses = (n-1) + (n-2) + … + 1
  • 11.
    Problem solving inmathematics- step6Try to find a better solution Kisses = (n-1) + (n-2) + … + 1 = (n + n + … + n) – (1 + 2 + … + (n-1)) = n(n-1) – n(n-1)/2 = n(n-1)/2(n-(n-1))(n-1) factors(n-1) factors(n-1) factors
  • 12.
    Summarizing steps in mathematicsFlow chart
  • 13.
    Problem solving incomputer science - step1Define the problemEveryone must kiss each other.We define one kiss as occurring when two people kiss each other, any number of times.Q: For N number of People how many kisses there will be ?
  • 14.
    Problem solving incomputer science - step2Get sample input and output for simple casesDefine input 1, 2, 3, 4 … | | | |Define output 0, 1, 3, 6 …
  • 15.
    Problem solving incomputer science - step3Construct logic with the patternFor first two inputSo, We can assume that for n people n -1 kisses.n=1: 0 kiss n=2 : 1 kiss
  • 16.
    Problem solving incomputer science - step3We consider more input & output to justify our guess(kiss=n-1). n=1: 0 kiss n=2: 1 kiss n=3: 2 kisses n=4: 3 kissesBut this time we are indeed wrong. So, need to improve our guess.
  • 17.
    Problem solving incomputer science - step4We will improve our solution through trial & error.what will happen if we cannot reach the exact solution ?
  • 18.
    Problem solving incomputer science – step4So, we will construct & justify our logic using mathematical formula. Kisses = n (n-1) / 2
  • 19.
    Problem solving incomputer science - step5Now we have the solutionNow its time to code !FIND NO OF KISSES( N) KISS=N(N-1)/2RETURN KISS
  • 20.
    Problem solving incomputer science - step6Problem solved!Why do we really need a computer to solve the problem?
  • 21.
    Summarizing steps in computer scienceFlow chart
  • 22.
  • 23.
    Historical relation betweenmathematics & computer scienceDonald Knuth (Professor of Stanford)-- Father of Analysis of AlgorithmGraduated in Mathematics (Case Institute of Tech.)PhD in Mathematics (Caltech)
  • 24.
  • 25.