My solution to a4q5 is not finished yet.
The natural spline can be computed by setting up and solving the
linear system that was derived in class, or by setting up and solving
the system derived in Heath. Note though that the Heath system is
larger than n
Assignment Four, Question Three
The following matlab program may be used to generate the required plots.
%
% Script file: a4q3.m
%
% part (a)
%
t = linspace( -2.0, 2.0, 201 ); % generate 201 equally spaced points on [-2,2]
f = 1.0 ./ ( 1.0 + t.*t);
% eval
CSC 336 H1F
Worth: 10%
Fall 2015
Assignment Four
Due: Before 10:00pm on Tuesday 8 December 2015.
Your submission must be a PDF file named a4.pdf and it must be handed-in using the
MarkUs system. You are to create the PDF file using a document preparation
Assignment Four, Question One
The following matlab program may be used to generate the required Vandermonde matrices and
compute the condition numbers.
%
% Assignment Four, Question One
%
% clear any leftover definitions from previously run scripts.
clear
Assignment Four, Question Two
We need to determine the degree 3 polynomial interpolant to the data set:
cfw_(xi , yi )i=4
i=1 = cfw_(1, 0), (2, 1), (3, 1), (5, 2).
Part (a)
Using the matlab script:
%
% Script File: a4q2a.m
%
% Determines the polynomial in
Assignment Three, Question Three
=
A matlab program that finds roots of each of the 4 problems
by using the bisection method, Newton's method, the secant
method and fzero follows.
The termination tolerance of 1.0e-10 on changes in x was applied.
For the
Assignment Two, Question Three
=
part (a)
In this part of the question we are to implement functions that
solve the linear system Ax=b using
- Gauss elimination without any pivoting
- Gauss elimination with partial row pivoting
- Gauss elimination wit
Assignment Three, Question One
=
Part (a)
=
We expect that when fixed point iterations converge, they display linear
convergence (rate r = 1) with convergence constant C = | g'(x*) |, where
x* is the fixed point. The process converges provided C < 1. H
CSC 336H
Sample Midterm Test
October 2015
Duration:
50 minutes
Aids Allowed:
A calculator.
A single 8.5 by 11 inch aid sheet, written on one side only.
The aid sheet must be a handwritten original copy. No photocopies.
Student Number:
Family Name:
First N
Assignment Four, Question Four
=
We need to determine the number of equally spaced entries
in a table of sin(x) values. We want the table to be
such that linear interpolation between table entries will
give approximate sin(x) results with an absolute er
CSC 336
Numerical Methods
Fall 2015
Instructor
Tom Fairgrieve
Office: BA 4230
Phone: 416-978-3965
Email: [email protected]
Office Hours: M 4:10pm 5:00pm
W 4:10pm 5:00pm
or by appointment.
Courseweb page www.cdf.toronto.edu/~tff/336/
Lectures and tutorial
Assignment Three, Question Two
=
Part (a):
Show that the iterative method
x f(x ) - x f(x )
k-1 k k k-1
x = -
k+1 f(x ) - f(x )
k k-1
is mathematically equivalent to the secant method for solving a scalar
nonlinear equation f(x) = 0.
The Secant meth
Assignment Two, Question Two
=
We have the n-by-n matrices A, B and C (with B and C nonsingular) and the
n-vector w and need to compute the n-vector x which is such that:
x = B^cfw_-1(C^cfw_-1 + A)(2A + I)w
We seek an algorithm for computing x that avo
CSC108H
Lecture 09
> MORE FUNCTIONS + REVIEW
Sadia Rain Sharmin
January 20, 2017
ConcepTest
valid = False
while not valid:
s = input("Enter a password: ")
valid = len(s) = 5 and s[:2] = xy
Which of the following passwords gets us out of the loop?
I
A. xyz
CSC108H
Lecture 08
> MORE FUNCTIONS
Sadia Rain Sharmin
January 18, 2017
ConcepTest
What are the bugs in the following code?
def add_one(x):
return x + 1
x = 2
x = x + add_one(x)
I
A. No bugs. The code is fine
I
B. The function body is not indented
I
C. We
def is_even(num):
"
TYPE CONTRACT
DESCRIPTION
EXAMPLE
(int) -> bool
Return True iff the given num is even.
> is_even(3)
False
> is_even(2)
True
"
return num % 2 = 0
#
# Try this at home; use is_even as a helper function
# This should be a familiar pattern
def make_sandwich(INGREDIENT):
"
.
"
Step 1: Open the bag
Step 2: Take the loaf out
Step 3: Put it on top of the bag
Step 4: Pick up the knife
Step 5: Slice the loaf in the middle
Step 6: Move the knife 50pixels to the right, and slice again
Step 7: Put t
CSC108H
Lecture 01
> COURSE INTRODUCTION
Sadia Rain Sharmin
January 3, 2016
CSC108H COURSE INTRODUCTION
Todays topics
What is computer programming?
What is this course?
Getting started with Python
CSC108H COURSE INTRODUCTION
Computer Programming
Learning
CSC108H
Lecture 04
> BOOLEANS, IF STATEMENTS
Sadia Rain Sharmin
January 10, 2016
CSC108H LECTURE 2
Computer Science
The Art of Problem Solving
CSC108H LECTURE 2
1. identify problem
CSC108H LECTURE 2
1. identify problem
2. take steps to solve the problem
C
CSC108H
Lecture 02
> DATA TYPES, FUNCTIONS, MODULES
Sadia Rain Sharmin
January 4, 2016
CSC108H LECTURE 2
What is the difference between the literals 1 and 1.0?
A. Nothing. They are both 1
B. Nothing. They might be of different types, but types dont matter
CSC108H
Lecture 03
> BOOLEANS, IF STATEMENTS
Sadia Rain Sharmin
January 6, 2016
ConcepTest
Assume that a refers to a three-digit integer. Which of the
following evaluates to the middle digit of a? (For example, if a
referred to value 456, we want an expre
# We're using the python shell. The shell displays the result of the expression
# that you type on each line. An expression is a computation. It might be a
# literal .
> 1
1
> 1.0
1.0
# Or it might be a computation
> 2 + 1
3
> 2 + 1.0
3.0
# Note that when
# Solution for ex1: The nth digit is (the remainder of dividing by 10*n) divided by 10*(n-1)
# Notice the pattern when we get the remainder of dividing by 10 to the power of something:
> 12345 % 10
5
> 12345 % 100
45
> 12345 % 1000
345
> 12345 % 10000
234
CRITICAL REASONING
PHL 145
PROFESSOR AMY MULLIN
[email protected]
SYLLABUS
Contacting me
Email or office hours: Annex 214, M 11:45-12:45 and 3:15-4:15, W 11:1512:15 and 3:30-4:30. I am also available by appointment.
Tutorials
Fridays either at 9, 1
Running Head: CYBER SECURITY
1
Hackers Used New Weapons to Disrupt Major Websites across U.S.
Name:
College:
Tutor:
Course:
Date:
CYBER SECURITY
2
On Friday last week, epic cyber-attacks crippled a major internet firm, repeatedly
disrupting the availabili
Morphology: the analysis of word structure 1 1 1
422-? Some English derivational affixes '
Table 4.6 provides a partial list of English derivational affixes, along with information about the
category of their usual base (ignoring bound roots) and of the r