Disclaimer. CSUSB and the CS Dept have no responsibility for the content of this page.
Copyright. Richard J. Botting ( Fri May 12 15:36:12 PDT 2006 ). Permission is granted to quote and use this document as long as the source is acknowledged.
.EMail rbotting@Wiley.csusb.edu
Abstract
This poster describes a notation for discrete mathematics which is easy to
use with any computer and needs no software except a simple ASCII editor.
The name of the notation is MATHS and stems from my research into why
software is expensive, late and low quality.
Mathematics to the Rescue
Logic, mathematics, and proofs should be a part of project documentation
from the initial stages. Set Theory and Logic are important for defining
the problem area. In general Formal Analysis proceeds by stating the
obvious. Simple facts determine the set of logically correct structures.
Grammar theory is useful for documenting sequential data. The same theory
helps define the dynamics (entities, events and patterns) in a situation.
Sets and functions describe the structure of the problem domain and are
used to document requirements and specifications. These sets and functions
define entity types, abstract data types, classes of objects, and/or paths
through the data structures and data base. Thus maps and sets define the
structure shared by the solution and the problem's environment.
Design involves other mathematical methods - The calculus of relations plus an extension to the lower predicate calculus can be used for specifying designs. Statistical analysis and simulations are needed to ensure satisfactory performance as well. Projects that use mathematics and logic can "zero-in" on the best software. First: Define things that appear in the description of the problem and (1) are outside the software, (2) interact with the software, and (3) are individually identifiable by the software. Second: Define events, entities, identifiers, relationships, attributes, facts, and patterns. These initial steps are an exercise in stating the obvious. The Scientific Method is an effective way to develop a mathematical theory or model of the situation. Abstracting a formal model reveals a natural internal structure and so a structure for a design. The models are used to validate requirements, specifications, designs, algorithms, data structures, and data bases.
Problems with Mathematics
However there is a problem which is not noticeable in the typical discrete
mathematical model: A digraph G is a pair (N, A ) where N is a set and A
is a subset of N ><N....
If we model a typical problem area then we might see:
One problem is obvious - there are too many components! The computer professional is further struck by the informality of the language and the difficult of processing it with a computer. The typical client will be dumb founded, of course.
A Prototype Solution
My research has focussed on putting together a formal language, that can be
handled by any computer and even translated into 'client friendly' language
and graphics. I have designed a prototype formal language that uses ASCII.
I call it the Multi-purpose Abstraction, Terminology, Heuristic Symbology
(MATHS).
. . . . . . . . . ( end of section Introduction) <<Contents | End>>
MATHS
If D is a collection of declarations, definitions, axioms, theorems etc. then Net{ D } is called a set of documentation and Net{ D } is the set of objects that satisfies the documentation. A degenerate case is when D contains nothing recognisably formal - it is then treated as a natural language comment - with perhaps some variables/parameters embedded in it.
(S, P) |-(=) ::S->P. - by definition Students are people. (F, P) |-(=) ::F ->P. - by definition Faculty are people.
Object Oriented Conceptual Model
After some manipulation this can be turned into a data base or an object
oriented design (also in ASCII) :
--------------People-----------
"1 "1
" "
"0..1 "
Faculty Department "
"1 "1 |1 |1 |1 "
" " | | | "
" "0,1 |1.. | |0.. "0..1
" Member | Qualification Student
" | |1 |1 |1 |1
" | | |0..|0..|
" |0.. | Declared |
" Course |1.. |
" |1 |1 Electives |
" | | |1 |
" | | | |
" |0.. |0.. |1.. |
" Section --in--- |
" |1 |1 |
"0.. |1..4 |10..200 |0..15
Teacher ------Enrolled---------
(Each vertical line is a mapping. Ditto marks show a subset of the upper one.)
Unlike most programming languages mathematics has two kinds of infix operator.
For more see [ logic_0_Intro.html ]
Predicates and Quantifiers
A predicate can have variables, quantifiers and equalities as well the
propositions listed above. MATHS spells quantifiers out and includes
numerical quantifiers like "one", "no", "0..1". The syntax attempts to make
the writing of formal statements as natural as possible. In the following
X is a set or a type, x is a variable and W(x) a proposition containing x
in a number of places.
for all x:X(W(x)) ::=For all x of type X, W(x) is true ,
Here are some typical expressions
Predicates
Operators
Forthe full details see: [ logic_30_Sets.html ] [ logic_31_Families_of_Sets.html ] [ logic_32_Set_Theory.html ]
Maps and Functions
MATHS uses both the traditional functional notation (f(x)) and a dot
notation(x.f). So
For x:X and f:X>-Y, f(x)=x.f= the f of x in Y.
The dot notation fits with Ada, C, Pascal,... where item names map record values into item values. In mathematics '.' projects a vector into a scalar. MATHS uses functions to project structured objects to their components.
The symbol fun (and also 'map') is used to abstract functions from expressions:
For more see: [ logic_5_Maps.html ] [ logic_6_Numbers..Strings.html ]
Structures
All modern formal notations from Ada to Z provide means for creating a new
type of object by listing components and specifying constraints and
operations on these components. In MATHS a special set of declarations can
be interpreted as defining a set of labeled tupls. If D is a list of
declarations then
is a set of documentation and
is the set of labelled tupls that satisfy the documentation. A name can be given to documentation (
) and if N is the name then N represents the set of objects that satisfy the documentation. The formal meaning of a structure is as a collection of maps. Thus
implies 1st: (A><B)->A and 2nd:(A><B)->B. Formally, Pairs is the universal (free, initial, or universally repelling) object in the category of all types with 1st and 2nd. This means that all types with two maps called 1st and 2nd into the A and B respectively, is modeled by Pairs. This means that we can map Pairs into any other type without loosing the information about 1st and 2nd items. Therefore A><B = Pairs encodes all sets of objects with two components.
Given a structured type T=N then we can talk about its subsets (@T). Sets of structures are universal. Codd has shown that any set of data can be expressed as simple structured tables. This justifies modelling all abstract objects as tuples. A collection of sets of tuples is a relational data base and forms a category. The objects in an object oriented design also forms a similar category. These collection form a conceptual model of the area being studied that is readily implemented using modern techniques such as data bases, logic programming, and object oriented programming.
Binary Relations
A special kind of relationship is one with two components - equivalent to a
set of 2-tuples. They are turn up in all formal and natural settings. A
relation is typically defined like this
where W(x,y) is a well formed formula. Given the above definition then
Thus relations inherit set operations of intersection, union and complement.
They have their own operators as well:
For more see [ logic_40_Relations.html ] [ logic_41_HomogenRelations.html ] [ logic_42_Properties_of_Relation.html ] [ logic_44_n-aryrelations.html ]
Other Logics
See
[ logic_7_Semantics.html ]
[ logic_8_Natural_Language.html ]
[ logic_9_Modalities.html ]
Use in Teaching
In a Discrete Mathematics class students can draw up formal models as
homework and present them for grading, or later in class for review by
their peers. Each model has endless homework exercises in using set
theory, functions, simple combinatorics, relations etc. The familiarity
gained by making abstractions from concrete situations prepares for the
introduction of theories at a higher level of abstraction - Posets,
Algebras,...
. . . . . . . . . ( end of section Discrete Mathematics in Software Engineering) <<Contents | End>>
End