D
N
H
A
N
D
A
SE
A
H
IN
LE
SE
A
P
LE
IN
P
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Term test #2
CSC 236H1
Duration | 50 minutes
Last Name:
First Name:
Do not turn this page until you have received the signal to start.
(In the meantime, please ll
CSC236 tutorial exercise #5
week #7, Winter 2015
Consider the function dened by:
@
f (n) =
2
if n = 0
n c)2 + 2f (b n c) if n 1
f (b 2
2
Prove that if m and n are natural numbers with m n, then f (m) f (n).
1
CSC 236 H1
Winter 2012
Midterm Test #2
Duration: 60 minutes
Aids Allowed: one single-sided handwritten 8.511 aid sheet
Student Number:
Family Name(s):
Given Name(s):
Lecture Section:
L0101 (A. Farzan)
L0201 (F. Pitt)
Do not turn this page until you have r
CSC 236 H1
Winter 2012
Midterm Test #1
Duration: 50 minutes
Aids Allowed: one single-sided handwritten 8.511 aid sheet
Student Number:
Family Name(s):
Given Name(s):
Lecture Section:
L0101 (A. Farzan)
L0201 (F. Pitt)
Do not turn this page until you have r
9/10/13
CSC236
AzadehFarzan
Home Page
Office
BA 3252
Email
first_name at cs dot toronto dot edu
Introduction to Theory of Computation (Fall 2013)
The website will always contain the most up-to-date information regarding the course. You are
responsible for
CSC236H: Introduction to the Theory of Computation
Exercise 1
Due on Friday September 20, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students.
Before you start: this is your rst exercise.
CSC236H: Introduction to the Theory of Computation
Assignment 2
Due on Monday February 25, 2013 before 10pm (submit on Markus)
Note: As I mentioned at the beginning of the semester, we use assignments to propose problems that need a little
more (than aver
IN
SE
EA
PL
IN
CSC 236H1
Duration 50 minutes
E
PL
EA
S
ND
HA
Term test #1
HA
ND
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Last Name:
First Name:
Do
not
turn this page until you have received the signal to start.
(In the meantime, please ll out the
CSC236H: Introduction to the Theory of Computation
Assignment 2
Due on Friday November 1, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups (in fact, highly encouraged).
Great news: You get to do some progr
D
N
H
A
N
D
A
SE
A
H
IN
LE
SE
A
P
LE
IN
P
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Term test #2
CSC 236H1
Duration | 50 minutes
Last Name:
First Name:
Do not turn this page until you have received the signal to start.
(In the meantime, please ll
CSC 236 H1S
Homework Assignment # 1
Worth: 8%
Winter 2012
Due: Before 10pm on Tuesday 31 January 2012.
Remember to write the full name, student number, and CDF/UTOR email address of each group
member prominently on your submission.
Please read and underst
CSC236H: Introduction to the Theory of Computation
Exercise 3
Due on Friday November 15, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students. Have a good break!
1. Consider the following a
CSC236H: Introduction to the Theory of Computation
Exercise 3
Due on Friday November 15, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students. Have a good break!
1. Consider the following a
CSC236 Tutorial 9: More On Iterative Programs
1. Prove that the following code terminates. You may assume that the precondition is that a, b N.
function f(a, b):
x = a
y = b
count = 0
while x > 0 or y > 0:
if y > 0:
y-else:
x-y += 9
count+
return count
So
CSC236 Tutorial 3: Structural Induction
1. The XOR (exclusive or) boolean operator has the following truth table:
P
T
T
F
F
Q
T
F
T
F
PQ
F
T
T
F
That is, returns true if and only if exactly one of its arguments is true.
We can dene the set of well-formed
CSC236 2015 Winter
Assignment 1: Solutions
(1) We prove that m N, n N, (1 + mn) (1 + m)n .
Proof. Let m N.
Now by Simple Induction we prove n N, (1 + mn) (1 + m)n .
Base Case: 0. (1 + m 0) = 1 1 = (1 + m)0 .
Inductive Step Let n N.
(IH) Assume (1 + mn) (1
CSC236H: Introduction to the Theory of Computation
Exercise 2
Due on Friday October 18, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students. Have a happy thanksgiving week with your
family
CSC236 2015 Winter, Assignment 1
Due Monday February 2nd, 6 p.m.
Notice: The due date for this assignment has been postponed to Monday February 2nd at 6PM.
You may work in groups of up to three people currently enrolled in CSC236.
Submit your solutions as
CSC236 Tutorial 9: More On Iterative Programs
1. Prove that the following code terminates. You may assume that the precondition is that a, b N.
function f(a, b):
x = a
y = b
count = 0
while x > 0 or y > 0:
if y > 0:
y-else:
x-y += 9
count+
return count
2.
CSC236H: Introduction to the Theory of Computation
Assignment 1
Due on Friday February 1, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups. See the course page for more details.
This assignment is now comp
CSC236H: Introduction to the Theory of Computation
Assignment 3
Due on Friday November 29, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups (in fact, highly encouraged). But, I strongly encourage you
to so
CSC236H: Introduction to the Theory of Computation
Exercise 2
Due on Wednesday February 13th, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students. Also note the new (compared to
the one on
CSC236H: Introduction to the Theory of Computation
Assignment 2
Due on Monday February 25, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups. See the course page for more details.
1. Suppose we are given n
CSC 236 H1S
Winter 2012
Homework Assignment # 3
Worth: 8%
Due: Before 10pm on Thursday 5 April 2012.
Remember to write the full name, student number, and CDF/UTOR email address of each group
member prominently on your submission.
Please read and understan
CSC236H: Introduction to the Theory of Computation
Exercise 3
Due on Friday November 20, 2015 before 5pm (submit PDF on Markus)
Note that this is an exercise and has to be submitted individually by all students. Have a good break!
1. (8 points) Prove that
CSC236H: Introduction to the Theory of Computation
Assignment 2
Due on Friday November 1, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups (in fact, highly encouraged).
Great news: You get to do some progr
CSC236H: Introduction to the Theory of Computation
Exercise 2
Due on Friday October 18, 2013 before 10pm (submit on Markus)
Note that this is an exercise and has to be submitted individually by all students. Have a happy thanksgiving week with your
family
CSC236H: Introduction to the Theory of Computation
Assignment 2
Due on Friday November 6, 2015 before 5pm (submit PDF on Markus)
Note that this is an assignment and can be submitted in groups. In fact, it is highly encouraged. This is long and designed
fo
CSC236 tutorial exercise #4
week #6, Winter 2014
Use repeated substitution, aka unrolling or unwinding, to nd a closed form for T (n) when n = 2k and
k 2 N.
(
1
if n = 1
T ( n) =
1 + T (dn=2e) + T (bn=2c) if n > 1
Prove your closed form is correct (for th
Problem Set 1 Solutions
Preliminary Solution
. . . niln + if
Proo The predicate here is P(n] =Ex=1 k3 = . We must prove that We 2 1,P(n].
The base case occurs when n : 1. Substituting l for n, the le. side ofthe equality (the summation) evaluates
to 13 =
CSC236 Problem Set 5
There are two components of this problem set. The preliminary question is not marked or submitted: it is there as a suggested
exercise that you should do early to make sure that youre on track. The problem set itself is what you will
CSC236 Problem Set 7
There are two components of this problem set. The preliminary question is not marked or submitted: it is there as a suggested
exercise that you should do early to make sure that youre on track. The problem set itself is what you will
CSC236 Problem Set 9
There are two components of this problem set. The preliminary question is not marked or submitted: it is there as a suggested
exercise that you should do early to make sure that youre on track. The problem set itself is what you will
CSC236 Problem Set 1
There are two components of this problem set. The preliminary question is not marked or submitted: it is there as a suggested
exercise that you should do early to make sure that youre on track. The problem set itself is what you will