McGill University LEC ACTUAL EXAM PREP
NOTES ON COMP 350 complete guide 2025
Numerical Computing
Lecture 1
Objective : Design efficient Algorithms, numerical techniques.
MATLAB will be use usually for assignments !
Topics :
Computer numbers and arithmetic
MATLAB (Interactive environment. Easy to learn, code and debut !)
1. MATLAB has many toolboxes so in that respect it's better than Python
2. No types !!
3. You can use MATLAB apparently ?
Solving linear systems of operations
Solving nonlinear equations
Solving ODES.
We want to solve , where is a matrix
and is a column vector . Note that can be very large, thence we need numerical techniques.
If is nonsingular then has a unique solution. which is
Motivation to solve the matrix
This system of equations come sin many applications (e.g. PDEs)
, where is a scalar an d is a scalar valued function.
For instance we want to solve
, here we have a non linear function ! We have some techniques to solve that. Respectively, they have
advantages and disvantages.
We will use iterations iterative methods for solution of a local solution
Some may converge faster than others so we must do some analysis.
,In data analysis , we have
we don't know this function but we know a relationship between . If we want to estimate we use polynomial
fitting to get the values. We want to use the smallest polynomial function possible.
WE can then use this polynomial to evaluate the s.
we can actually use polynomial interpolation (Sprine ? ).
We can also use interpolation. It does not make sense to fit all the points exactly since the s have inherent errors ! In
this case ewe use A Least-Squares Approximation.
[ Definition ]= GPS.
We have a signal on the earth and some satellite ( and $$). We can measure the *signal travelling time* from
the reciever, from which we can deduce the distance $d_{i}$.
Given
,we need actually satellites for the best estimation. Here we solve a nonlinear lest squares solution
thence, we minimize the distance. We square the expression since it's a least square, and Least because we minimize !
[ Note ] We need at least 4 satellites for accuracy ? Not sure why.
because of relativity, so we have
This is important in research because we need very accurate measurements for GPS. SO we solve this model :
Integer Least Squres Problem.
We will also do Numerical Integration
, in practice we cannot solve all the integrals by hand, or find their antiderivatives. For instance in statistics a density
function of a population ? Basically can't be don analytically.
Last topic is ODEs
we consider a simple case
, here we cannot find analytically. Instead we will find approximations for for . We divide in
intervals .
Course Outline
The main textbook is Numerical and Mathematical and Computing form McGill's website or store.
WE have available course notes online
Grading
No late submissions are accepted.
Any requests have to be made within days.
6 assignments on Crowdmark for
Midterm
1. Thursday Oct 14 6-8 pm
Final
Note, both exams will be in person and closed book.
, Introduction to this course
Numerical computing is as old as civilization itself. E.g..., prediction of eclipses.
Modern NC began with Isaac Newton, his calculus invetion motivation was to solve numerical problems.
Until 20th century we use pen and paper only. The abacus appeared in the east
IN the first half of the 20th century we found the slide rule which made multplication easier, but gave only 3 digits of
accuracy.
IN 1950, invention of the electronic computer in the 40s, brought a new era of NC.
Many mundane things such as a Google search, involves numerical computing
In science and atmospherics (PDEs), we use a lot of NC
Also important in many areas of computer science: animation, data mining, machine learning, simulations, robotics,
computer vision, etc..
Lecture 2
Assignment 1 has been posted on Crowdmark
TAs zoom links has been posted on MyCourses
2 TAs are available for each office hours
Error: Unknown environment 'pamtrix'
Computer Numbers and Arithmetics
Today:
1. binary and decimal representation of real numbers2.
2. computer representation of integers and non-integral real numbers
3. IEEE floating point representaiton
*Rational numbers *: all the real nubmers which consist of a ratio of two integers e.g
There are two basic systems :
the decimal (base )
The binary (base )
Integers
The decimal and binary representation of integers requires anexpansion of nonenegative powers of the base
it's binary equivalent : is
Both represntations are finite :
The decimal is finite, but the binary is infinitely long
Both represntations are infinite and repeating
If the representation of a rational number is infinite, it must be repeating
is i t possible that the decimal represntatio nis infinte, but the binary repesentation is finite ? *NO !
We can do multiple sorts of conversions Binary decimal (straight forward ! ).
Decimal binary : more complicated
convert the integer and fractional parts separately.
NOTES ON COMP 350 complete guide 2025
Numerical Computing
Lecture 1
Objective : Design efficient Algorithms, numerical techniques.
MATLAB will be use usually for assignments !
Topics :
Computer numbers and arithmetic
MATLAB (Interactive environment. Easy to learn, code and debut !)
1. MATLAB has many toolboxes so in that respect it's better than Python
2. No types !!
3. You can use MATLAB apparently ?
Solving linear systems of operations
Solving nonlinear equations
Solving ODES.
We want to solve , where is a matrix
and is a column vector . Note that can be very large, thence we need numerical techniques.
If is nonsingular then has a unique solution. which is
Motivation to solve the matrix
This system of equations come sin many applications (e.g. PDEs)
, where is a scalar an d is a scalar valued function.
For instance we want to solve
, here we have a non linear function ! We have some techniques to solve that. Respectively, they have
advantages and disvantages.
We will use iterations iterative methods for solution of a local solution
Some may converge faster than others so we must do some analysis.
,In data analysis , we have
we don't know this function but we know a relationship between . If we want to estimate we use polynomial
fitting to get the values. We want to use the smallest polynomial function possible.
WE can then use this polynomial to evaluate the s.
we can actually use polynomial interpolation (Sprine ? ).
We can also use interpolation. It does not make sense to fit all the points exactly since the s have inherent errors ! In
this case ewe use A Least-Squares Approximation.
[ Definition ]= GPS.
We have a signal on the earth and some satellite ( and $$). We can measure the *signal travelling time* from
the reciever, from which we can deduce the distance $d_{i}$.
Given
,we need actually satellites for the best estimation. Here we solve a nonlinear lest squares solution
thence, we minimize the distance. We square the expression since it's a least square, and Least because we minimize !
[ Note ] We need at least 4 satellites for accuracy ? Not sure why.
because of relativity, so we have
This is important in research because we need very accurate measurements for GPS. SO we solve this model :
Integer Least Squres Problem.
We will also do Numerical Integration
, in practice we cannot solve all the integrals by hand, or find their antiderivatives. For instance in statistics a density
function of a population ? Basically can't be don analytically.
Last topic is ODEs
we consider a simple case
, here we cannot find analytically. Instead we will find approximations for for . We divide in
intervals .
Course Outline
The main textbook is Numerical and Mathematical and Computing form McGill's website or store.
WE have available course notes online
Grading
No late submissions are accepted.
Any requests have to be made within days.
6 assignments on Crowdmark for
Midterm
1. Thursday Oct 14 6-8 pm
Final
Note, both exams will be in person and closed book.
, Introduction to this course
Numerical computing is as old as civilization itself. E.g..., prediction of eclipses.
Modern NC began with Isaac Newton, his calculus invetion motivation was to solve numerical problems.
Until 20th century we use pen and paper only. The abacus appeared in the east
IN the first half of the 20th century we found the slide rule which made multplication easier, but gave only 3 digits of
accuracy.
IN 1950, invention of the electronic computer in the 40s, brought a new era of NC.
Many mundane things such as a Google search, involves numerical computing
In science and atmospherics (PDEs), we use a lot of NC
Also important in many areas of computer science: animation, data mining, machine learning, simulations, robotics,
computer vision, etc..
Lecture 2
Assignment 1 has been posted on Crowdmark
TAs zoom links has been posted on MyCourses
2 TAs are available for each office hours
Error: Unknown environment 'pamtrix'
Computer Numbers and Arithmetics
Today:
1. binary and decimal representation of real numbers2.
2. computer representation of integers and non-integral real numbers
3. IEEE floating point representaiton
*Rational numbers *: all the real nubmers which consist of a ratio of two integers e.g
There are two basic systems :
the decimal (base )
The binary (base )
Integers
The decimal and binary representation of integers requires anexpansion of nonenegative powers of the base
it's binary equivalent : is
Both represntations are finite :
The decimal is finite, but the binary is infinitely long
Both represntations are infinite and repeating
If the representation of a rational number is infinite, it must be repeating
is i t possible that the decimal represntatio nis infinte, but the binary repesentation is finite ? *NO !
We can do multiple sorts of conversions Binary decimal (straight forward ! ).
Decimal binary : more complicated
convert the integer and fractional parts separately.