foundations of computing
play

Foundations of Computing Professor Steve Schneider 30BB02 Course - PowerPoint PPT Presentation

Foundations of Computing Professor Steve Schneider 30BB02 Course Structure Two lectures per week One tutorial per week (exercise sheets) Mathematics Surgeries: Room 44BB02, Wednesdays 10am. Course material posted on CS189


  1. Foundations of Computing Professor Steve Schneider 30BB02

  2. Course Structure � Two lectures per week � One tutorial per week (exercise sheets) � Mathematics Surgeries: Room 44BB02, Wednesdays 10am. � Course material posted on CS189 website. � Assessment: Entirely by examination . � Everything covered in lectures and tutorials is examinable.

  3. Course Structure � Monday 3pm : lecture � Wednesday 9am : lecture (not week 1) � Tuesday 2pm : tutorial (not weeks 1, 2, or 4. I n week 4, the tutorial will be on Wednesday) to go through the previous week’s exercise sheet. Bring your solution to the previous week’s exercise sheet; it will be marked. Marks do not count towards the final assessment. � Office hours : Monday 4pm and Wednesday 10am. Sign up for an appointment. � Maths surgery : Wednesday 10am in 44BB02

  4. Foundations of Computing Course Content � Set theory � Sets, relations, functions � Logic � Propositions, truth tables, logical reasoning, predicates � The Z notation � Use of logic and set theory in specification � Number representations � Representation of values in a computer � Dr Roger Peel – weeks 11 and 12

  5. Recommended texts � E Currie: The Essence of Z, � Prentice Hall, (1999), ISBN 0-13-749839-X � R Haggarty: Discrete Mathematics for Computing, � Pearson Education, (2002), ISBN 0-201-73047-2L � Bottaci & J Jones: Formal Specification Using Z. � Thompson, (1995), ISBN 1-850-32109-4

  6. Other background texts � Ben Potter, Jane Sinclair, David Till: An Introduction to Formal Specification and Z, (Prentice Hall) ISBN 0-13-242207-7 � Mike McMorran, Steve Powell: Z Guide for Beginners, (Blackwell) ISBN 0-632-03117-4 � Jim Woodcock and Jim Davies: Using Z, Specification and Refinement, (Prentice Hall) ISBN 0-13-948472-8 � Keith Devlin: Sets Functions and Logic (Chapman Hall), ISBN 1-5848-8449-5 � Keith Hirst: Numbers Sequences and Series, (Edward Arnold) ISBN 0-340-61043—3 � Judith Gersting: Mathematical Structures for Computer Science, (Freeman) ISBN 0-7167-8306-1 � Daniel Velleman : How to prove it, (Cambridge University Press) ISBN 0-521-44116-1

  7. Sim ulation only Using the voting handset To vote, press Note: you can one of these only vote when buttons FIRMLY the green ‘polling and watch the open’ indicator is small light (goes projected in the green on top-right of the successful vote) screen Do not press this button or you will not be able to vote

  8. 0% w o Did you have breakfast today? n k t ’ n o D 0% o N 0% s e Y Don’t know 0 of 5 Yes No 1. 2. 3.

  9. Are you familiar with sets and 0% l l a t a t o N 0% e l t t i l A 0% y r e v , s e Y Yes, very Not at all logic? A little 1. 2. 3.

  10. 0% o N Do you know about truth 0% . . . t o g r o f e v ’ 0% I t u b , d s i d e Y I forgotten them I did, but I’ve tables? Yes No 1. 2. 3.

  11. Do you know about power sets and cartesian products? 33% 33% 33% Yes 1. I did, but I could 2. do with some revision Never heard of 3. them s m . e . i e Y w h o t f d o d d l u r a o e c h I r t e u v b e , N d i d I

  12. Do you know about Karnaugh 0% o N 0% s e Y maps? Yes No 1. 2.

  13. 0% o N Have you come across 0% s e Y boolean algebra? Yes No 1. 2.

  14. Motivation � Logic is the foundation of computing. � The ability to think and reason logically is essential in Computing. � Humans are not always very good at thinking logically. � Thus: formal and systematic ways of handling logic are necessary.

  15. This lecture � Some exercises and discussion in logical thinking.

  16. Example 1: quality control � You work in quality control at a games manufacturer. � A game contains cards with letters on one side and numbers on the other. � They must be printed according to the rule: If one side has a vowel, the other side must have an even number

  17. Example 1: quality control If one side has a vowel, the other side must have an even number � You have 4 cards in front of you. Which cards do you need to turn over to check the rule is being followed? A B C D

  18. Which cards do you need to turn over to check the rule is being followed? A 1. C 2. A and B 3. A and C 4. A and D 5. B and C 6. A, C and D 7. 0% 0% 0% 0% 0% 0% 0% 0% 0% A, B, C, and D 8. A C B C D C D D n d d d d o d d n n n n n i n t Some other combination a a a a a a a n A A A B 9. C , i C b , m A , B o , c A r e h t o e m o S

  19. Example 2: law enforcement � You work in law enforcement. � A law states that anyone buying alcohol in a bar should be at least 18 years old.

  20. Example 2: law enforcement You have 4 customers in front of you. You can question up to 2 of them. � A: buying a beer � B: buying a coke � C: a 21 year old � D: a 17 year old

  21. Which customers should you question to check the rule is being followed? A 1. B 2. C 3. D 4. A and B 5. A and C 6. A and D 7. 0% 0% 0% 0% 0% 0% 0% 0% B and C 8. A B C D B C D C d d d d n n n n a a a a A A A B

  22. Logical structure � What can we say about the logical structure of examples 1 and 2?

  23. Example 3: genealogy � You are trying to trace your great- great-grandfather and you are looking through the records at the Family Records Office. � You have spoken to Aunt Gladys and Uncle Alan � Your sister has spoken to Grandma

  24. Example 3: genealogy Aunt Gladys and Uncle Alan � Aunt Gladys: He was born in Halifax or married in Derby. � Uncle Alan: He was married in Derby or he died in Skipton. � Gladys and Alan together: He was born in Halifax or married in Derby, AND he was married in Derby or died in Skipton.

  25. Example 3: genealogy: Grandma Carol � Grandma Carol: He was either married in Derby, or he was born in Halifax and died in Skipton.

  26. Whose information narrows it down more: Gladys&Alan, or Carol? Gladys & Alan 0% 1. Carol 0% 2. Neither - they are just different 0% 3. They are the same. 0% 4. No idea 0% 5.

  27. Example 4: truth and lies � Consider two kinds of people: truth tellers who always tell the truth, and liars who never tell the truth. � Alice says: “ If you asked Bob, he would say that I am a liar.”

  28. What can you deduce? 0% Alice is a truth teller 1. 0% Alice is a liar 2. 0% Bob is a truth teller 3. 0% Bob is a liar 4. 0% You can’t deduce anything 5. Alice says: “ If you asked Bob, he would say that I am a liar.”

  29. Summary � Logical reasoning is not always easy or intuitive. � Treating logic and logical thinking in a formal and systematic way is necessary.

  30. Please ensure you return your handset before leaving. The handset is useless outside of this class and non-returns will decease the likelihood of future voting system use on this course.

Recommend


More recommend