0% found this document useful (0 votes)
4 views

notes

Mathematics serves as a powerful tool for modeling and representing real-world relationships, providing concise, precise, and rigorous insights. Through examples, the document illustrates how mathematical models can simplify complex problems, guide computations, and facilitate reasoning without needing to interpret the underlying symbols. Additionally, it emphasizes the importance of clear notation and various proof techniques in mathematical reasoning, particularly in the context of computer science.

Uploaded by

magesmail
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

notes

Mathematics serves as a powerful tool for modeling and representing real-world relationships, providing concise, precise, and rigorous insights. Through examples, the document illustrates how mathematical models can simplify complex problems, guide computations, and facilitate reasoning without needing to interpret the underlying symbols. Additionally, it emphasizes the importance of clear notation and various proof techniques in mathematical reasoning, particularly in the context of computer science.

Uploaded by

magesmail
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter 0 Using Mathematics

Mathematics can be used to represent/model the world.

Mathematics
provides a way to represent relationships that is
concise
precise
well suited to manipulations (_ to create 'child' representations)
that reveal insights about the objects being modeled.

All areas of science and engineering use mathematical models.

An Example of a mathematical model.

Consider the following (_ 'real world') problem.

Mary has twice as many apples as John. Mary throws half her apples away because
they are rotten. John eats one of his. Mary still has twice as many apples as John.
How many apples did Mary and John have initially?

we use (_ the variables) m and j to (KEY) denote the number of apples Mary and John
have (_ note: what is actually happening is abstraction - we throw away all
attributes of 'apples' except number)

(_ then we re express the conditions in the question we write the two formulas
below to) build a (KEY) model of the problem
m = 2j ---(1)
m/2 = j -1 --(2)

(_ these two formulas create a model of the 'real world' mary-john-apple-eating


comparison at different points in time etc aspects)

Note: the mathematical model is much more succinct than the English description of
the problem.

We now see the other virtues of the mathematical model.

Virtues of Mathematical Models

(KEY ?) What is it about mathematical models that make them so useful?

! -- A mathematical model can be more


1. understandable
2. concise
3. precise
4. rigorous

as compared to an informal description written in a natural language.

Example 2 (of virtues of a mathematical model)


Consider an algorithm to compute b, an *integer* approximation to sqrt(n) for
some integer n.

This algorithm is rigorously specified by a precondition (which holds before the


execution of the algorithm) and a postcondition (which describes what is to be true
on termination) pair.

here
precondition = 0 <= n. -- n is a positive integer
postcondition - think carefully about what approximations for sqrt(n) would be
accetptable. Three choices are given, where the variable b contains the
approximation to sqrt(n)

1. b^2 <= n < (b + 1)^2


compute the largest integer b that is at *most* sqrt(n)

teasing out

>>> import math


>>> math.sqrt(10)
3.1622776601683795

let b = 1
1^2 <= 10 AND 10 < (1+1)^2 no the second condition fails
likewise 2 fails but 3^2 <= 10 and 10 < (3 + 1)^2
the actual sqrt is 3.16 so 3 is the integer nearest to it,

choice 3
(b-1)*2 < n <= b^2
let b = 1
0 < 10 <= 1 the right condition fails
so this is b such that b^2 is at *least* sqrt(n)

choice 2:
abs(b^2 - n) <= abs( ( b + 1)^2 - n ) AND
abs(b^2 - n) <= abs ( ( b - 1)^2 - n)

which is computing the integer closest to sqrt (n) _from both directions?

Note: in the informal English specification, we just said "an approximatin to


sqrt(n)"

In the mathematical notation we were forced to be more precise wrt what


approximation is acceptable (_ we are forced to specify what exactly
"approximation" means) Rigor (_of the mathetatical notation/model/spec) guided us
to a moro thorough analysis.

A second virtue of mathematical models is


answers to
questions about some phenomenen
can be *computed*
using a mathematical model of the object or phenomenon.

E.g: Discovery of the planet Neptune.


Kepler, Newton and co, formalized mathematical models of planetary motion.
people noticed that Uranus's orbit deviated from what the model predicted.

Scientists CONJECTURE d that there was an an unknown planet affecting Uranus's


orbit and 2-3 years of calculation uncovered the probably position of the planet
Neptune and searching the area *indicated by the calculations* as a probable
location, uncovered the real planet.

(_ so the key idea seems to be that calculation/computation based on models can


substitute for or optimize real world 'blind' activity (here search) that would
have to be done in the absence of such computation/calculation

Key Question would seem to be: without the model, to base computation on, how would
you discover the planet - verify a conjecture?

_ note: two uses of the model. Initial model sets a baseline, and then deviations
from this model lead to a conjecture(d new model) then these two models somehow
guide computation - here by hand - which in turn optimized the real world search
area TBD: Follow up on the details of this story.
)

so thus far mathematical models


- are concise
- are rigorous - remove ambiguity fron natural language e.g "approximate"
- provide a baseline to look for discerpancies
- are given rise to by conjectures from observers
- can guide computation/calculation, which in turn can save real world effort.

the third (_yet another!) advantage in using mathematical models (_ KEY: This
seems to be the real focus of this book)

Mathematics provides methods for reasoning


where reasoning ==
manipulating expressions
to provide properties of expressions
to obtain new results from old ones and
(KEY) this 'reasoning' can be done *without caring what the symbols mean (_ as we
saw in the apple problem above)

i.e there are (KEY) rules for performing syntactic manipulations - _ iow once we
have a mathematical expression, part of a 'model' *or whatever else*, we can
manipulate symbols through these rules and (KEY) by such *syntactic*/_symbolic
manipulation_ we can learn more about the model (of which the expressions are a
part) and most importantly (KEY) only the initial and final formulations need be
interpreted in terms of the original problem.

(step) example of syntactic maniplation.

We want an expression equivalent to Einstein's equaton e = mc^2 that shows how to


calculate m given e.

Without thinking about it we can write m = e/c^2.


We can do this without thinking because we learned rules to manipulate symbols in
school and practiced them so much that you can now apply themautomaticalyl , often
(_applying) several rules ato ne.

If we were to list out the steps of the manipulation of symbols and list therules,
we'd get

(_ start with)
e = mc^2
== divide both sides with c^2 which is non zero
e/c^2 = (m.c^2)/(c^2)
== associativity
e/c^2 = m(c^2/c^2)
== any non zero number / itself = 1
e/c^2 = m . 1
== x . 1 = x
e/c^2 = m

In this calculation (KEY) between each pair of exrpessions appears a line with
ahint
the equals sign indicates that the expressions are equal
the hint explains why
(KEY) since equality is transitive (m = n and n = p we can conclude m = p)
we conclude that e = m c^2 (KEY) is equivalent (_ by transitivity) to
e/c^2 == m

(step)
KEY
we can understand each ofthe above manipulations *without* knowing what m,
e and n denote, i.e we can manipulate the expression to obtain a new expression
*without* knowing that the equations being manipulated are models of the relatoin
between energy and matter.

(_iow) we (KEY) are abel to reason *syntactically*

We could likewise mainpulate boolean expressions (_ generalize to program


fragments) using similar rules.

Example skipped, as it is dealt with in a later chapter.

Beyond Syntactic Manipulation

- Notation should not be ambiguous.

The text introduces you to a number of useful abstractions and their properties.
- integers
- set - allow us to model and reason about collections of objects
- relation - model and reason about relationships between objects in sets
- various types of infinites - abstractions which may not have a counterpart in
reality, but neverthelessa re useful in understanding questions that arise wrt the
foundations of mathematics.

- there are many styles of proof, but underlying them all are as (KEY) small
number of (KEY) domain independent methods.
- mathematical induction
- proof by contradiction
- the pigeonhole principle
we discuss various styles and formats for proofs.
The basis of discussions is Formal Logic

we apply what we advocate in domains of particular interest in computing science.


e.g: the design of combinatoinal circuits
the study of boolean expressions
both involve reasoning about "variables" (wires in circuit design) that can take
one of two values, and expressions obtained by combining those variables with
boolean operators (gate in circuit design)
reasoning about programs

You might also like