1 / 20

CS2013 Mathematics for Computing Science

This course explores formal languages, logic, and probabilistic reasoning in computing, bridging gaps in programming principles. Learn to solve problems through precise mathematical characterizations and explore Bayesian reasoning. Dive into formal logic and apply concepts to computer programming.

bbeam
Télécharger la présentation

CS2013 Mathematics for Computing Science

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. CS2013Mathematics for Computing Science Kees van Deemter k.vdeemter@abdn.ac.uk All information about the course: http://homepages.abdn.ac.uk/k.vdeemter/pages/teaching/CS2013/ (No Myaberdeen!) Lectures Monday 12:00 Taylor A21 Tuesday 11:00 Cruickshank Auris Theatre Tutorials/Practicals Thurs 12:00-14:00 MacRobert117 or 15:00-17:00 MacRobert 117

  2. Later Computing courses involve maths for Computational complexity Computability Evaluations of usability etc. Level-1 Computing Programming and Principles (CS1022) offers instruction on Relations and functions Combinatorics Some simple logic (and other Boolean Algebras) Aims and Background

  3. But there’s a gap … Aims and Background

  4. But there’s a gap … This course aims to plug it! Aims and Background

  5. Formal Languages Formal Logic Probabilistic reasoning Course structure

  6. A computer language is a FL while a<5 do {x:=2x; a:=a+1} The language of propositional logic is a FL x=64 & (a=4 v a=5) The language of UNIX commands is a FL chmod –R a+rx * Formal Language: a set of strings 1. Examples of Formal Languages

  7. An important insight: problem = formal language 1. Formal languages

  8. Problem 1: What’s a number between 00 and 99? {00,01,02,03,…99} A list of strings! Problem 2: What’s the sum of two numbers? {(0,0,0), (0,1,1), (1,0,1), (1,1,2), …} List of triples The problem/question has been solved/answered if we have a precise mathematical characterisation of the language Given such a characterisation, a computer program can often be written problems as languages (examples)

  9. Problem 1: What’s a number between 00 and 99? {00,01,02,03,…99} -- A list of strings! Problem 2: What’s the sum of two numbers? {(0,0,0), (0,1,1), (1,0,1), (1,1,2), …} Problem 3: What’s the alphabetical order of a list? {((b,a), (a,b)), …, ((ca,ba,da,aa),(aa,ba,ca,da),…) Problem 4: What’s the location of each landmine? {(area, m1, (lat1,long1)),(area, m2, (lat2,long2))} problems as languages (examples)

  10. When things (preconditions, constraints, goals,…) need to be stated precisely, logic is often best Example: 2. Formal Logic

  11. Proving things about programs. E.g.: “At any stage during execution of this program, a<6 and x>2: “At the end of execution, a<6 and x=64” “At the end of execution, all elements in this list are in alphabetical order” Note: “proof”, “and”, “all” 2. Formal Logic

  12. Some computer languages have logic at their core: Logic Programming (e.g. PROLOG) This course offers some grounding in formal logic (also known as mathematical logic) Starts from CS1002 Focusses on (simple) Predicate Logic 2. Formal Logic

  13. Some computer programs use statistics to solve a problem Lots of problems in Artificial Intelligence are solved using Bayesian Reasoning Spelling correction, Machine Translation, etc. use the Noisy Channel model 3. Probabilistic Reasoning

  14. Bayes’ rule: The Noisy Channel model

  15. Estimating probability of a hypothesis H given evidence E (that’s H|E), based on P(E|H) and P(H) E: Mary is extremely bright H1: Mary becomes an astronaut H2: Mary becomes a school teacher Which hypothesis is more likely? Bayesian Reasoning

  16. Estimating probability of a hypothesis H given evidence E (that’s H|E), based on P(E|H) and P(H) E: Mary is extremely bright H1: Mary becomes an astronaut H2: Mary becomes a school teacher P(E|H1) > P(E|H2) but P(H2) >> P(H1) H2 is the more plausible hypothesis Bayesian Reasoning

  17. The noisy channel model for spelling correction: What comes out is affected by what went in and how the channel distorts it. The Noisy Channel model

  18. Assume we have received the noisy word O We seek to choose the possible input w which maximises P(w|O) P(w|O) is the probability that w was intended, given that O was received By Bayes’ rule, this is equivalent to The Noisy Channel model

  19. Formal languages Formal Logic Probabilistic reasoning (And, tied up with (1) and (2): the proof method of Mathematical Induction) Course structure

  20. Let’s get started with formal languages

More Related