Object Oriented Programming & Mathematics

Slides:



Advertisements
Similar presentations
Rational Algebraic Expressions
Advertisements

Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Topics Recap of the Object Model Inheritance Polymorphism – virtual functions Abstract classes, Pure virtual functions Design issues UML examples Templates.
7M701 1 Software Engineering Systems Models Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 7 (some items)
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora.
Computer Science I Inheritance Professor Evan Korth New York University.
Algebraic Fractions and Rational Equations. In this discussion, we will look at examples of simplifying Algebraic Fractions using the 4 rules of fractions.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Proceso kintamybių modeliavimas Modelling process variabilities Donatas Čiukšys.
Mathematics of Cryptography Part I: Modular Arithmetic
FINITE FIELDS 7/30 陳柏誠.
1 Using the Synergies Between the Object-Oriented Paradigm and Mathematics in Joint Mathematics/Computer Science Programs Marc Conrad - Tim French University.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
Object Oriented Design and Programming Alan Goude Room: Sheaf 9323.
Reviewed By: Paul Varcholik University of Central Florida EEL 6883 – Software Engineering II Spring 2009 Marc Eaddy, Thomas Zimmermann,
School of Computer Science & Information Technology G6DICP - Lecture 22 The Theory of Object Oriented Programming.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
CS200 Algorithms and Data StructuresColorado State University Part 4. Advanced Java Topics Instructor: Sangmi Pallickara
Marc Conrad, University of Luton1 Abstract Classes – pure computer science meets pure mathematics. The Beauty of Implementing Abstract Structures.
Rational Expressions.
Inheritance in the Java programming language J. W. Rider.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Chapter 12 Support for Object oriented Programming.
Evaluating Algebraic Expressions 1-7 Solving Equations by Adding or Subtracting Preparation for AF4.0 Students solve simple linear equations and inequalities.
Inheritance and Access Control CS 162 (Summer 2009)
{ What is a Number? Philosophy of Mathematics.  In philosophy and maths we like our definitions to give necessary and sufficient conditions.  This means.
Essential Questions How do we identify the multiplicity of roots?
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Assignment 3 is due Sunday, the 8 th at 7pm. Problems with assn 3? Discuss at your team meeting tonight.
ALGEBRA TILES SOLVING EQUATIONS Replace the equation with tiles: Negative Positive -X X 1.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
SECTION 3-3 Solving Algebraic Equations: Multiplication and Division.
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
CSC 427: Data Structures and Algorithm Analysis
Object Oriented Programming Development
Unit - 3 OBJECT ORIENTED DESIGN PROCESS AND AXIOMS
Agenda Preliminaries Motivation and Research questions Exploring GLL
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Object-Oriented Analysis and Design
Chapter 10 Design Patterns.
Chapter 8 Analysis & Modeling
Lecture 2 of Computer Science II
Abstract descriptions of systems whose requirements are being analysed
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
Road Map Inheritance Class hierarchy Overriding methods Constructors
Demeter Aspects Who We Are Aspectual Collaborations
Object Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Inheritance Basics Programming with Inheritance
Interface.
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Ada – 1983 History’s largest design effort
Objective of This Course
Software Construction Lecture 2
Introduction to Computer Science for Majors II
Computer Programming with JAVA
9: POLYMORPHISM Programming Technique II (SCSJ1023) Jumail Bin Taliba
Middleware, Services, etc.
Inheritance and Polymorphism
Axiomatic Mathematics meets Object Oriented Programming
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Object Oriented Programming & Mathematics The Beauty of Implementing Abstract Structures as Abstract Structures. Marc Conrad, University of Luton. 17.11.2018 Marc Conrad, University of Luton

Once upon a time... Mathematics before the 20th century 17.11.2018 Marc Conrad, University of Luton

there was two branches of Mathematics axiomatic Mathematics before the 20th century algorithmic 17.11.2018 Marc Conrad, University of Luton

Axiomatic Hilbert, N. Bourbaki, etc. axiomatic Mathematics before the 20th century algorithmic 17.11.2018 Marc Conrad, University of Luton

Algorithmic axiomatic Mathematics before the 20th century algorithmic Turing, Church, etc. 17.11.2018 Marc Conrad, University of Luton

Pure Mathematics & Computer Science axiomatic "pure" mathematics Mathematics before the 20th century algorithmic computer science 17.11.2018 Marc Conrad, University of Luton

With links in between. axiomatic "pure" mathematics Mathematics before the 20th century computer algebra etc. algorithmic computer science 17.11.2018 Marc Conrad, University of Luton

However, some topics of Computer Science seemed to be unrelated to mathematics... axiomatic "pure" mathematics Mathematics before the 20th century algorithmic computer science software design operating systems 17.11.2018 Marc Conrad, University of Luton

as e.g. object oriented programming. axiomatic "pure" mathematics Mathematics before the 20th century algorithmic object oriented programming is a technique to solve the "software crisis". It evolved in a context completely unrelated to mathematics. computer science e.g. object oriented programming 17.11.2018 Marc Conrad, University of Luton

But object oriented programming is closer to "axiomatic" mathematics than it appeared in the first place. object oriented programming... ... allows to implement abstract structures in an "axiomatic" way. "pure" mathematics axiomatic Mathematics before the 20th century algorithmic object oriented programming computer science 17.11.2018 Marc Conrad, University of Luton

Example: A ring (abstract). We cannot implement: addition negation multiplication inversion "zero" "one" check if zero We can implement: subtraction (because of addition and negation) exponentiation a embedding of Z, Q. check for equality polynomials over this ring etc. n 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton Example: A ring. We cannot implement: addition negation multiplication inversion "zero" "one" check if zero We can implement: subtraction (because of addition and negation) exponantiation a embedding of Z, Q. check for equality polynomials over this ring etc. Object Oriented programming allows having objects which do not implement everything! (Concept of overriding abstract methods) The good news is: n 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton A "UML" approach to a ring. Ring Z Q Polynomial Ring The child classes implement (override) the missing functionality of the parent class. 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton A "UML" approach to a ring. Ring Z Q Polynomial Ring But things are more complicated, a polynomial is defined over a ring. It both inherits and aggregates a ring. 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton A "UML" approach to a ring. Leads to multivariate polynomials by implementing univariate polynomials! Ring Z Q Polynomial Ring But things are more complicated, a polynomial is defined over a ring. It both inherits and aggregates a ring. 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton A "UML" approach to a ring. Ring Element Ring Z Q Polynomial Ring And in order to perform computations we also need a class for the elements of a ring. 17.11.2018 Marc Conrad, University of Luton

Marc Conrad, University of Luton The practical side. In order to get experience with the idea, an experimental implementation in Java classes has been developed. Java is highly object oriented but not very common in mathematical context. Results can be viewed at http://ring.perisic.com The name of the Java package is consequently: com.perisic.ring 17.11.2018 Marc Conrad, University of Luton

Results, Remarks, Conclusions It is possible to work with abstract structures! E.g. Modular Ring R/p(x), where R is abstract. E.g. Quotient Field Quot(R), where R is abstract. Same amount of work as implementing Z/mZ or Q. Multivariate polynomials can be used although only univariate polynomials have been implemented (over R). Complex structures can easily be derived as child classes: Cyclotomic fields, complex numbers, rational function fields, ... Concepts for automatic mapping from one ring to another. 17.11.2018 Marc Conrad, University of Luton

Results, Remarks, Conclusions It is astonishing simple to implement complex mathematical structures in an object oriented environment "from scratch". You are invited to experiment, contribute, or share experiences. The package com.perisic.ring is available and documented at http://ring.perisic.com. Caveat: There are drawbacks: performance, decisions on how to organise classes, implementing specialised algorithms (primality testing, factoring, …) 17.11.2018 Marc Conrad, University of Luton

Results, Remarks, Conclusions The experiments with the Java package com.ring.perisic show that object oriented programming deserves a closer look in the context of mathematics: The mechanism of overriding and dynamic binding allows protoyping of abstract mathematical structures. Object oriented programming should be a main feature in CAS (as user defined functions a couple of years ago). Mathematical software should use object oriented terminology instead of "reinventing the wheel". Disseminate object oriented concepts to the mathematical community. 17.11.2018 Marc Conrad, University of Luton