CSC236H: Introduction to the Theory of Computation
Assignment 1
Due on Friday October 4, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups (in fact, highly encouraged).
1. (10 points) Let Fn be the nth Fib
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 1
Due on Friday October 4, 2013 before 10pm (submit on Markus)
Note that this is an assignment and can be submitted in groups (in fact, highly encouraged).
1. (10 points) Let Fn be the nth Fib
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
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
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
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
Midterm Test
CSC236 Fall 2013
Professor A. Farzan
October 25, 2013
Name:
Student Number:
Morning
Lecture Session (circle one):
Evening
Read the following instructions before you start to work.
Write your name and student number on top of this page.
This
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 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
'
CSC 236 Assignment 2
Sample Test Cases
Created on 20131027
Created by David Liu
'
import sys
import unittest
from a2_max import second_largest_dc, second_largest_it
from a2_radix import msd_radix
class Test(unittest.TestCase):
# Divideandconquer tes
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
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
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
#
#
#
#
#
#
CSC236 Fall 2013
Assignment 2 Question 5
Names: SOLUTIONS
Student Numbers: SOLUTIONS

def second_largest_dc(A):
'
Precondition: A is a list of distinct positive integers of length at least 2
Postcondition: returns the second largest element