CSC 336 H1F
Assignment One
Worth: 10%
Fall 2015
Due: Before 10:00pm on Thursday 8 October 2015.
Your submission must be a PDF le named a1.pdf and it must be handed-in using the
MarkUs system. You are to create the PDF le using a document preparation syste
Polynomial interpolation with Lagrange basis
Polynomial interpolation with Lagrange basis
We (again) construct a polynomial p n (x) of degree at most n, that interpolates the data
(x i , f i ), i = 0, . . . , n. Instead of using the monomials 1, x, x 2 ,
CSC336 Tutorial 4 GE/LU, pivoting, scaling
Q UESTION 1 Let A and b be given by
2 3 6
8
A = 1 6 8 , b = 7
3 2 1
2
Apply GE without pivoting to A and obtain the L and U factors, such that A =
LU . Indicate the results of each step of GE. Using L and U , an
CSC336S
Assignment 2
Due Tuesday, March 15, 2016
Please write your family and given names and underline your family name on the front page of your paper.
General note: Plotting quantity y versus quantity x, means that x is in the x-axis and y is on the y-
A BRIEF INTRODUCTION TO MATLAB
by
Christina Christara and Winky Wai
December 2001
1. What is MATLAB?
2.2. Invoking MATLAB functions and scripts.
MATLAB is an object-oriented high-level interactive
software package for scientific and engineering numerical
Assignment One, Question One
Part (a)
In IEEE arithmetic how many double precision numbers are there between any two adjacent nonzero
single precision numbers? Justify your response.
Solution:
IEEE single-precision numbers may be considered to be in the f
Assignment One, Question Two
part (a)
We can show that the number 0.1 (decimal) is equal to
(0.000110011001100110011001100.)_(2)
When 0.1 (decimal) is stored in double precision IEEE arithmetic, we need
to properly round
bit 1 2 3 4 5555
pos'n: 1 23 0
Assignment One, Question Three
The following matlab program performs the required computations:
%
% Script File: a1q3.m
%
% Prints cos(2*m*pi), for m = 10^cfw_k, k = 0,1,2,.,20.
%
% Mathematically, we expect cos(2*m*pi) = 1, however we observe that
% our
Assignment One, Question Four
(a) We have
f (x) =
1
cos(x)
sin(x)
with f (0) = 0 and x 2 [ /2, +/2]. To show that one can expect to be able to write a
computer program that uses oating-point arithmetic to accurately evaluate f (x), we need to
compute the
CSC 373 H1
Worth: 10%
Assignment # 1
Fall 2015
Due: By 9:59pm on Friday 30 October
Remember to write the full name and student number of every group member prominently on
your submission.
Please read and understand the policy on Collaboration given on the
CSC 373 H1
Worth: 1%
Tutorial # 2
Fall 2015
Due: At the beginning of tutorial (Thursday October 1st )
1. (a) Prove or disprove: If e is a minimum-weight edge in connected graph G (where not all edge
weights are necessarily distinct), then every minimum sp
CSC 373 H1
Worth: 1%
Tutorial # 3
Fall 2015
Due: At the beginning of tutorial on Thursday October 8th
1. Consider again the problem of making change when the denominations are arbitrary.
Input: Positive integer amount A, positive integer denominations d[
Tutorial # 4
CSC 373 H1
Fall 2015
Due: At the beginning of tutorial on Thursday October 22th
Worth: 1%
1. Consider the following network.
a
10
s
8
3
10
b
5
3
3
5
c
3
8
t
10
d
(a) Compute a maximum ow in this network, using the Ford-Fulkerson algorithm: nd
CSC 373 H1
Worth: 1%
Tutorial # 5
Fall 2015
Due: At the beginning of tutorial on Thursday October 29th
Consider a set of mobile computing clients that each need to be connected to one of several possible
base stations. Well suppose there are n 1 clients c
What is Scientific Computing?
world
nature, technology,
phenomena and situations
(Human) Representation of nonnegative integers
modelling
measurements
input data analysis and reduction
physical laws, restrictions, assumptions,
simplifications
Decimal syst
CSC336 Tutorial 5 Norms and condition numbers of matrices
Q UESTION 1 Prove that maxx6=0
PROOF:
n
kAxk
kxk
o
= max cfw_kAxk
kxk=1
1. Let S1 = cfw_x : kxk = 1, S2 = cfw_x : x 6= 0. Clearly, S1 S2. Then, we have
kAxk
kAxk
max
= max kAxk.
max
x6=0 kxk
kxk=1
CSC336 Tutorial 6 Nonlinear equations
Q UESTION 1 Assume that five iterative methods applied to a non-linear problem exhibit the convergence behaviour indicated by the errors in the first four iterations
below:
method (a): 102, 103, 104, 105
method (b): 1
CSC336S
Lecturer
Lectures
Tutors
Tutorial
Office Hours
Textbook
Web site
Bulletin board
Numerical Methods
Spring 2016
: Christina C. Christara ([email protected])
: Tuesday 7-9 p.m. Room BA 1180
: Jonathan Calver, Lin Gao, Samir Hamdi
: Tuesday 6-7 p.m.
CSC336S
Assignment 3
Due Wednesday, April 6, 2016, 6:00 PM
Please write your family and given names and underline your family name on the front page of your paper.
Submit at BA4226.
General note: Plotting quantity y versus quantity x, means that x is in t
Inner products
Vector norms
An inner product (, ) is a mapping from (S, S), where S is a linear space (vector,
function, etc.), to IR (more generally to C
I ), with the following properties: For any
x, y, z S,
(i) (x, x) 0, and (x, x) = 0 iff x = 0S.
(ii)
Vectors and matrices - review of terminology
Vectors and matrices - review of terminology - properties
Matrix: a rectangular array of (possibly complex) numbers arranged in rows and columns.
Order or size: a matrix A with m rows and n columns is said to b
Gauss elimination and LU factorization - breakdown
Gauss elimination and LU factorization - instability
Recall a point in the Gauss elimination algorithm:
if a kk 0, aik = aik / a kk , else quit /* a kk pivot */
Using exact (fractional or with enough deci
CSC336 Tutorial 3 Matrices, operation counts, GE/LU
Q UESTION 1 Show that the product of lower triangular (l.t.) matrices is a lower
triangular matrix.
PROOF: First consider a l.t. matrix L of size n n and a n 1 vector x, whose first
k components are 0. W
Computer Arithmetic
Computer Arithmetic
Simplified form for representing a floating-point number x in base b:
x = ( f )b b(e)b
Saturation: The phenomenon in which a non-zero number is added to another and the
latter is left unchanged.
f = (. d 1 d 2 . . .
CSC336 Tutorial 2 Computer arithmetic
Q UESTION 1 Find the positive numbers in R2(4, 3) assuming normalized mantissa.
ANSWER: The numbers in R2(4, 3) are of the form f 2e, where f the mantissa
and e the exponent. The table below indicates all possible pos
Numerical Interpolation - Introduction
Numerical Interpolation - Introduction
a least squares approximation to a function
10
Given a (possibly complicated) function f (x), it is often desirable to approximate it by
a simpler function g(x).
Sometimes, the
Nonlinear equations and systems
Nonlinear equations and systems - systems of nonlinear equations
An equation is nonlinear if it involves nonlinear components of the unknown, such as
1
powers of the unknown (with exponent other than unit, e.g. x 3 , x 1/4
Solution of linear systems
Solution of lower triangular systems
Solving linear systems lies in the heart of almost any scientific, engineering, financial,
and not only, problem.
x1
x2
Let A be n n and b be n 1. Solving Ax = b means computing an n 1 vector