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 in
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)
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)
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 rec
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
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
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 rec
CSC236H Exercise 2
Sample Solutions
Winter 2016
1. Let F be a set defined as follows:
any tree consisting of a single node is an element of F ;
if t1 , t2 F , so is a binary tree consisting of a new
CSC236 Tutorial #3
Sample Solutions
Winter 2016
1. Let = cfw_a, b be a set of characters. Let A be a set of strings of characters in . Assume A is defined
as follows:
a A;
if s A, then s a A and s b
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)
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 t
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, h
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
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 s
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 s
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
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 pr
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 st
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
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 co
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
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
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
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
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,
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 c
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 al
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, h
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 st
CSC236H Exercise 1
Due by the end of Tutorial 2
Fall 2017
IMPORTANT:
This exercise is worth 1% of your total mark in the course.
You must work on this exercise in groups of two, and submit a single
CSC236H, Fall 2017
Assignment 1
Sample Solutions
1. Prove by induction that 2n+2 + 32n+1 is divisible by 7 for all positive integers.
Solution:
P (n) : exists m N such that 2n+2 + 32n+1 = 7m.
We will
CSC236 Tutorial #1
Sample Solutions
1. Aaron and Bianca play the following game: they place on a table two piles containing an equal number
of matches. They take turns removing some (non-zero) number
CSC236H
Introduction to the Theory of Computation
Running-Time Complexity of Algorithms - Review
Measure running time by counting steps in algorithm: arithmetic operations,
assignments, array accesse
CSC236H
Introduction to the Theory of Computation
Example When we cannot use the Master Theorem
Theorem (Master Theorem). Let T : N R+ be a recursively defined function with recurrence
relation
n
T (n