Mathematical Sciences at Oxford Stephen Drape Access/Schools Liaison Officer Computer Science.

Slides:



Advertisements
Similar presentations
Computer Science at Oxford
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
1 CS101 Introduction to Computing Lecture 17 Algorithms II.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Mathematical Sciences at Oxford Stephen Drape. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental.
Mathematical Sciences at Oxford Stephen Drape. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental.
Mathematical Sciences at Oxford Stephen Drape. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental.
Choosing Oxford. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental Lecturer) 8 years at Oxford.
Computer Science at Oxford Stephen Drape Access/Schools Liaison Officer.
Module #1 - Logic Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen 1 Module.
Mathematical Sciences at Oxford Stephen Drape. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental.
Welcome to CSCA67 Discrete Mathematics for Computer Scientists
Overview of the MS Program Jan Prins. The Computer Science MS Objective – prepare students for advanced technical careers in computing or a related field.
FANTASTIC FACTORING!!! Greatest Common Factor Difference of Squares Perfect Square Trinomial Leading Coefficient of One Leading Coefficient Not One All.
BIT Presentation 4.  An algorithm is a method for solving a class of problems.  While computer scientists think a lot about algorithms, the term.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Core Class Presentation. Language 9 (1) (Required) Language 10 (1) (Required) Language 11 (1) Honors Language 11 (1) College-bound student Action/Mystery/
COMP 170 L2 Page 1 L05: Inverses and GCDs l Objective: n When does have an inverse? n How to compute the inverse? n Need: Greatest common dividers (GCDs)
MATH 224 – Discrete Mathematics
Mathematical Sciences at Oxford Stephen Drape. 2 Who am I? Dr Stephen Drape Access and Schools Liaison Officer for Computer Science (Also a Departmental.
Structure of Study Programmes
Mathematical Methods Wallands Community Primary School
IT253: Computer Organization
1 Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
By the Ahmadiyya Muslim Womens’ Student Association COMPUTER SCIENCE.
1 Amador Valley High School Mathematics Offerings for Current Students.
MATH 224 – Discrete Mathematics
CS212: DATA STRUCTURES Lecture 10:Hashing 1. Outline 2  Map Abstract Data type  Map Abstract Data type methods  What is hash  Hash tables  Bucket.
4-1 6 th grade math Exponents. Objective To write and evaluate exponential expressions Why? To prepare you for higher learning in math and science. To.
Physics. Why pick Physics? About 50% of 3 rd level courses involve science, medicine or technology. –Physics is usually part of these courses. –Choosing.
Chapter 3 Sec 3.3 With Question/Answer Animations 1.
1 10/13/2015 MATH 224 – Discrete Mathematics Why Study Discrete Math  Determination of the efficiency of algorithms, e.g., insertion sort versus selection.
Korea Advanced Institute of Science and Technology, Dept. of EECS, Div. of CS, Information Systems Lab. 1/10 CS204 Course Overview Prof.
Discrete Mathematics 이재원 School of Information Technology
Relationships Between Structures “→” ≝ “Can be defined in terms of” Programs Groups Proofs Trees Complex numbers Operators Propositions Graphs Real.
Basic Structure 3 Year BSc Single Honours  Single Honours: 3 year degree 120 credits of modules in each year; Modules are 20, 15 or 10 credits; 60 credits.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 3.1 Mathematical Foundation.
IT253: Computer Organization
Discrete Structures for Computing
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
1 HASHING Course teacher: Moona Kanwal. 2 Hashing Mathematical concept –To define any number as set of numbers in given interval –To cut down part of.
MATH 224 – Discrete Mathematics
How a Computer Processes Information. Java – Numbering Systems OBJECTIVE - Introduction to Numbering Systems and their relation to Computer Problems Review.
Chapter 10 Hashing. The search time of each algorithm depend on the number n of elements of the collection S of the data. A searching technique called.
Computer Science 210 Computer Organization Course Introduction.
D75P 34R – HNC Computer Architecture Week 1 Introduction to Binary Storage © C Nyssen/Aberdeen College 2004 All images © C Nyssen /Aberdeen College unless.
THE IMPORTANCE OF DISCRETE MATHEMATICS IN COMPUTER TECHNOLOGY.
{ What is a Number? Philosophy of Mathematics.  In philosophy and maths we like our definitions to give necessary and sufficient conditions.  This means.
Intro To Algorithms Searching and Sorting. Searching A common task for a computer is to find a block of data A common task for a computer is to find a.
WHAT IS THE APPROPRIATE MATHEMATICS THAT COLLEGES STUDENTS SHOULD KNOW AMATYC Conference November 20, 2015 Phil Mahler & Rob Farinelli.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Number Systems Natural Numbers. Where Our Numbers Came From The earliest known evidence for writing or counting are scratch marks on a bone from 150,000.
Revision on Matrices Finding the order of, Addition, Subtraction and the Inverse of Matices.
New Curricula Proposal at FSMN by Miroslav Ćirić & Predrag Krtolica.
Discrete mathematics Kwon, Tae-kyoung
The normal approximation for probability histograms.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Algorithm efficiency Prudence Wong.
Introductory Lecture. What is Discrete Mathematics? Discrete mathematics is the part of mathematics devoted to the study of discrete (as opposed to continuous)
Mathsercise-C Factors & Multiples Ready? Here we go!
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Algorithm efficiency Prudence Wong
Mathematics at Cambridge
Discrete Mathematics and Its Applications
Foundations of Computer Science
Theory of Computation Turing Machines.
The lowest common multiple The lowest common multiple (or LCM) of two numbers is the smallest number that is a multiple of both the numbers. For small.
RECURSION Haskell.
Quantitative Reasoning
Discrete Mathematics in the Real World
Discrete Mathematics and Its Applications
Presentation transcript:

Mathematical Sciences at Oxford Stephen Drape Access/Schools Liaison Officer Computer Science

2 Mathematical Science Subjects Mathematics Mathematics and Statistics Computer Science Mathematics and Computer Science All courses can be 3 or 4 years

3 Admissions data for 2007 entry ApplicationsAcceptances% Maths % Maths & Stats % Maths & CS % Comp Sci %

4 Admissions Process Fill in UCAS and Oxford form Choose a college or submit an “Open” Application Interview Test Based on common core A-Level Taken before the interview Interviews Take place over a few days Often have many interviews

5 Entrance Requirements Essential: A-Level Mathematics Recommended: Further Maths or a Science Note it is not a requirement to have Further Maths for entry to Oxford For Computer Science, Further Maths is perhaps more suitable than Computing or IT Usual offer is AAA

6 Course Structure The first year consists of compulsory courses which act as a foundation to build on The second year starts off with more compulsory courses The reminder of the course consists of a variety of specialised options In the fourth year, students have to study 6 courses from a choice of 40 There are opportunities for projects

7 First Year Maths Course Algebra (Group Theory) Linear Algebra (Vectors, Matrices) Calculus Analysis (Behaviour of functions) Applied Maths (Dynamics, Probability) Geometry

8 Computer Science Computer Science firmly based on Mathematics Mathematics and Computer Science Closer to a half/half split between CS and Maths Computer Science is part of the Mathematical Science faculty because it has a strong emphasis on theory

9 Computer Science Year 1 Year 2 Year 3 Year 4 MathematicsComputingProject work

10 Mathematics & Computer Science Year 1 Year 2 Year 3 MathematicsComputing Year 4 Project work

11 Some of the first year courses Functional Programming Design and Analysis of Algorithms Imperative Programming Digital Hardware Calculus Linear Algebra Logic and Proof Discrete Maths

12 Subsequent Years The second year is a combination of compulsory courses and options Many courses have a practical component Later years have a greater choice of courses Third and Fourth year students have to complete a project

13 Some Computer Science Options Compilers Programming Languages Computer Graphics Computer Architecture Intelligent Systems Machine Learning Lambda Calculus Computer Security Category Theory Computer Animation Linguistics Domain Theory Program Analysis Information Retrieval Bioinformatics Formal Verification

14 Useful Sources of Information Admissions: Mathematical Institute Computing Laboratory: Colleges

15 What is Computer Science? It’s not about learning new programming languages. It is about understanding why programs work, and how to design them. If you know how programs work then you can use a variety of languages. It is the study of the Mathematics behind lots of different computing concepts.

16 Power We can use the power notation to write very large in a compact way. 3 5 = 3 £ 3 £ 3 £ 3 £ 3 = 243 How could we write a program to compute this? base exponent 3535

17 Writing a program for this Here’s a very simple program: This uses a technique called recursion

18 Number of multiplications So we’ve just seen that to work out 3 5 we need 5 multiplications. What about 3 25 ? Using the previous program, we would need 25 multiplications. But it is possible to compute this using only 7 multiplications!

19 Splitting Up the Exponent Split the exponent (power) into powers of = = and so 3 25 = 3 1 £ 3 8 £ 3 16 Now working out the powers: 1 £ 3 = 3 1 (keep)3 1 £ 3 1 = £ 3 2 = £ 3 4 = 3 8 (keep) 3 8 £ 3 8 = 3 16 (keep) So we have 7 multiplications in total

20 Setting up an algorithm We have three variables: y (which keeps the powers of 2 that we need) z (which works out the powers of 2) k (a counter to count down) Initially we set y = 1, z = base, k = exponent

21 The algorithm This algorithm is not written in any programming language – it is written in “pseudo-code” so that we can explain what is happening.

22 A real program This is written in a programming language called Haskell. It’s used throughout the Computer Science course at Oxford.

23 Try an example Let’s try an example and see how this algorithm works out At the start, we take y=1, z=3 and k=25

24 Steps 1 starty=1z=3k=25 oddy=1 £ 3 =3 1 z=3 1 k=24 eveny=3 1 z=3 1 £ 3 1 = 3 2 k=12 eveny=3 1 z=3 2 £ 3 2 = 3 4 k=6 eveny=3 1 z=3 4 £ 3 4 = 3 8 k=3

25 Steps 2 k=6eveny=3 1 z=3 4 £ 3 4 = 3 8 k=3 oddy=3 1 £ 3 8 =3 9 z = 3 8 k=2 eveny=3 9 z=3 8 £ 3 8 = 3 16 k=1 oddy=3 9 £ 3 16 =3 25 z=3 16 k=0 doney = multiplications

26 Comparison of number of steps Here’s a table showing the size of the power and the number of multiplications needed using our fast algorithm: Size of powersNumber of multiplications (10 6 )

27 So What? Many computer algorithms need to be able to work out powers efficiently. The RSA encryption algorithm needs to do calculations such as: For security, e and n need to be 2048 bits (which means bigger than ) which has over 600 digits.

28 Algorithm Design When designing algorithms, we have to consider a number of things: Our algorithm should be efficient – that is, where possible, it should not take too long or use too much memory. We should look at ways of improving existing algorithms. We may have to try a number of different approaches. We should make sure that our algorithms are correct.

29 An Interview Type Problem You have an urn which contains 23 white beans and 34 black beans. You take out two beans from the jar: if the beans are the same colour then you put a black bean (from a large pile of beans that you have) into the jar otherwise, you put a white bean into the jar You repeat this process until there is only one bean left. What colour is it?

30

31 Finding the Highest Common Factor Example: Find the HCF of 308 and ) Find the factors of both numbers: 308 – [1,2,4,7,11,14,22,28,44,77,154,308] 1001 – [1,7,11,13,77,91,143,1001] 2) Find those in common [1,7,11,77] 3) Find the highest Answer = 77

32 Creating an algorithm For our example, we had three steps: 1) Find the factors 2) Find those factors in common 3) Find the highest factor in common These steps allow us to construct an algorithm.

33 Creating a program We are going to use a programming language called Haskell. Haskell is used throughout the Computer Science course at Oxford. It is very powerful as it allows you write programs that look very similar to mathematical equations. You can easily prove properties about Haskell programs.

34 Step 1 We need produce a list of factors for a number n – call this list factor(n). A simple way is to check whether each number d between 1 and n is a factor of n. We do this by checking what the remainder is when we divide n by d. If the remainder is 0 then d is a factor of n. We are done when d=n. We create factor lists for both numbers.

35 Function for Step 1

36 Step 2 Now that we have our factor lists, which we will call f1 and f2, we create a list of common factors. We do this by looking at all the numbers in f1 to see if they are in f2. We there are no more numbers in f1 then we are done. Call this function: common(f1,f2).

37 Function for Step 2

38 Step 3 Now that we have a list of common factors we now check which number in our list is the biggest. We do this by going through the list remembering which is the biggest number that we have seen so far. Call this function: highest(list).

39 Function for Step 3 If list is empty then return 0, otherwise we check whether the first member of list is higher than the rest of list.

40 Putting the three steps together To calculate the hcf for two numbers a and b, we just follow the three steps in order. So, in Haskell, we can define Remember that when composing functions, we do the innermost operation first.

41 Problems with this method Although this method is fairly easy to explain, it is quite slow for large numbers. It also wastes quite a lot of space calculating the factors of both numbers when we only need one of them. Can we think of any ways to improve this method?

42 Possible improvements Remember factors occur in pairs so that we actually find two factors at the same time. If we find the factors in pairs then we only need to check up to  n. We could combine common and highest to find the hcf more quickly (this kind of technique is called fusion). Could use prime numbers.

43 A Faster Algorithm This algorithm was apparently first given by the famous mathematician Euclid around 300 BC.

44 An example of this algorithm hcf(308,1001) = hcf(308,693) = hcf(308,385) = hcf(308,77) = hcf(231,77) = hcf(154,77) = hcf(77,77) = 77 The algorithm works because any factor of both a and b is also a factor of a – b

45 Writing this algorithm in Haskell

46 An even faster algorithm hcf(1001,308)1001 = 3 × = hcf(308,77) 308 = 4 × 77 = hcf(77,0) = 77