Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Symbolic Logic
1. Consider the following statements:
(S1) Programs that passed test 1 also passed test 2.
(S2) Programs passed test 2 unless they failed test 1.
(S3) Programs passed test 2 only if they passed test 1.
(a) Rewrite statements (S1), (S2), and
Mathematical Expression and Reasoning for Computer Science
CSC 165

Summer 2014
CSC165, Summer 2014
Assignment 2
Weight: 5%
Solutions
The goal of this assignment is to make sure that you understand how to relate language and logic, and
how to transform statements to get their negation, converse, and contrapositive.
You may work in gr
Mathematical Expression and Reasoning for Computer Science
CSC 165

Summer 2014
CSC 165 Midterm Exam Solutions
1 of 5
1. [10] Consider the domain D of all people. Dene the predicates Y(x, y): x is younger than y, H(x): x is a hipster, and
A(x): x loves Apple. Translate each English sentence below into logical notation, and translate
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1 Problem Set 0
Due Date: Sep. 20th
2.
ECO101H1
Principles of Microeconomics
Peter Foltin
PSY100H1
Introductory Psychology
Ashley Waggoner Denton
CSC108H1
Introduction to Computer Programming
Thomas Fairgrieve
MAT221H1
Applied Linear Algebra
Th
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
David Liu and Toniann Pitassi
Mathematical Expression and Reasoning for
Computer Science
Lecture Notes for CSC165 (0.3)
Department of Computer Science
University of Toronto
mathematical expression and reasoning for computer science
Many thanks to Prof. To
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
0>3 => 0>1
True
Boolean Functions
True or False
IsTall(x):Animals>cfw_T,F
where IsTall(x) T iff x is over 3 meters
G(n): n > 7.2, where n R
nN, n>7.2
nN, n>7.2
Special cases
x, blah(x) > True
x, blah2(x) > False
All nZ, n>5
For every integer n, n is gr
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Code:12345
DEPARTMENT OF MATHEMATICS
University of Toronto
MAT 136H1S
Term Test
Wednesday, March 2, 2016
Time allowed: 1 hour, 30 minutes
NAME OF STUDENT:
(Please PRINT full name
and UNDERLINE surname):
STUDENT NUMBER:
SIGNATURE OF STUDENT
(in INK or BALL
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1, Winter 2017
Problem Set 5
CSC165H1:
Problem Set 5
Due April 6, 2017 before 10pm
General instructions
Please read the following instructions carefully before starting the problem set. They contain important
information about general problem set e
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Winter 2014
Term Test 1 / L0101
Duration:
Aids Allowed:
CSC 165 H1
60 minutes (2:15pm 3:15pm)
none
Student Number:
Family Name(s):
Given Name(s):
Do not turn this page until you have received the signal to start.
In the meantime, please fill out the ident
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1, Winter 2017
Problem Set 2
CSC165H1:
Problem Set 2
Due February 15, 2017 before 10pm
General instructions
Please read the following instructions carefully before starting the problem set. They contain important
information about general problem s
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1, Winter 2017
Problem Set 3 Sample Solutions
CSC165H1:
Problem Set 3 Sample Solutions
Due March 8, 2017 before 10pm
Note: solutions are incomplete, and meant to be used as guidelines only. We encourage you to ask
followup questions on the course
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Learning Objectives
Translation with predicates.
Exists xP, Python(x) and not Correct(x)
Python(my_prog) and Correct(my_prog)
Any xP, Python(x) and not Correct(x)
Any xP, not Correct(x) and Python(x)
Some program written in Python is correct
Every program
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 2, Version 3
CSC165H1S
Date: Friday March 24, 2:103:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guidelines c
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 1, Version 1
CSC165H1S
Date: Thursday February 9, 6:107:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guidelin
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
University of Toronto, Faculty of Arts and Science
December 2015 EXAMINATIONS
CSC236H1F
Professor Azadeh Farzan
Seyed Amir Hejazi
(December 15, 2015: 9am12pm)
Duration: 3 hours
Name:
Student Number:
Lecture Session (circle one):
_ Morning Afternoon _ Eve
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Biochemistry
Basic chemistry, basic energy, energy
and macromolecules
Safety Concerns
Although we do very few dangerous activities, you should be
aware of a few standard practices and bits of knowledge.
Turn to page xiii at the front of your text.
Ther
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Problem Set #1
CSC165 Summer 2017
Insert author(s) here
Insert date here
We declare that this assignment is solely our own work, and is in accordance with
the University of Toronto Code of Behaviour on Academic Matters.
This submission has been prepared u
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Problem Set #2
CSC165 Summer 2017
Insert author(s) here
Insert date here
We declare that this assignment is solely our own work, and is in accordance with
the University of Toronto Code of Behaviour on Academic Matters.
This submission has been prepared u
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 2, Version 2
CSC165H1S
Date: Friday March 24, 12:101:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guidelines
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 2, Version 1
CSC165H1S
Date: Thursday March 23, 6:107:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guidelines
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 1, Version 2
CSC165H1S
Date: Friday February 10, 12:101:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guidelin
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
UNIVERSITY OF TORONTO
Faculty of Arts and Science
Midterm 1, Version 3
CSC165H1S
Date: Friday February 10, 2:103:00pm
Duration: 50 minutes
Instructor(s): David Liu, Toniann Pitassi
No Aids Allowed
Name:
Student Number:
Please read the following guideline
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1, Winter 2017
Problem Set 2 Sample Solutions
CSC165H1:
Problem Set 2 Sample Solutions
Due February 15, 2017 before 10pm
Note: solutions are incomplete, and meant to be used as guidelines only. We encourage you to ask
followup questions on the cou
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC165H1, Winter 2017
Problem Set 3
CSC165H1:
Problem Set 3
Due March 8, 2017 before 10pm
General instructions
Please read the following instructions carefully before starting the problem set. They contain important
information about general problem set e
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC 165 H1 / L0101
Midterm Test
31 October 2012
Duration: 50 minutes
Aids Allowed: one singlesided handwritten 8.511 aid sheet
Student Number:
Last (Family) Name(s):
First (Given) Name(s):
Do not turn this page until you have received the signal to start
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Winter 2014
CSC 165 H1
Term Test 2 / L0101
Duration: 60 minutes (2:15pm 3:15pm)
Aids Allowed: none
Student Number:
Family Name(s):
Given Name(s):
Do not turn this page until you have received the signal to start.
In the meantime, please fill out the ident
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Problem Set #5
CSC165 Summer 2017
Insert author(s) here
Insert date here
We declare that this assignment is solely our own work, and is in accordance with
the University of Toronto Code of Behaviour on Academic Matters.
This submission has been prepared u
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Problem Set #3
CSC165 Summer 2017
Insert author(s) here
Insert date here
We declare that this assignment is solely our own work, and is in accordance with
the University of Toronto Code of Behaviour on Academic Matters.
This submission has been prepared u
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Problem Set #4
CSC165 Summer 2017
Insert author(s) here
Insert date here
We declare that this assignment is solely our own work, and is in accordance with
the University of Toronto Code of Behaviour on Academic Matters.
This submission has been prepared u
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
CSC 165 H1 / L5101
Midterm Test
30 October 2012
Duration: 50 minutes
Aids Allowed: one singlesided handwritten 8.511 aid sheet
Student Number:
Last (Family) Name(s):
First (Given) Name(s):
Do not turn this page until you have received the signal to start
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Summer 2014
CSC 165 H1
Midterm Test
Duration: 3 hours (6:10pm 9:10pm)
Aids Allowed: Formula sheet supplied with the test
Student Number:
Family Name(s):
Given Name(s):
Do not turn this page until you have received the signal to start.
In the meantime, ple
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
D
IN
H
A
N
D
SE
N
A
H
IN
P
LE
A
SE
A
LE
P
"!$#&%(')*+,/.0/1324,/2
5617.82)89
: :<;>[email protected]= /E9F9G2)
H)/D/17#I,KJ ?DC 9L1M,/2+
#<13.+N8O*#P2.
".E24,"$E9FQR2)&S
TU8+VW9G2S
X17)/+Y$9G2S
Z\[0]
^
_a`cb"d>ef`hgjilknmoqpjrsb/et`uiwvGxL[&bsgtoy/rzdqrDcf
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
D
IN
H
A
N
D
SE
N
A
H
IN
P
LE
A
SE
A
LE
P
"!$#&%(')*+,/.0/1324,/2
5617.82)89
: :<;>[email protected]= /E9F9G2)
H)/D/17#I,KJ ?DC 9L1M,/2+
#<13.+N8O*#P2.
".E24,"$E9FQR2)&S
TU8+VW9G2S
X17)/+Y$9G2S
Z\[0]
^
_a`cb"d>ef`hgjilknmoqpjrsb/et`uiwvGxL[&bsgtoy/rzdqrDcf
Mathematical Expression and Reasoning for Computer Science
CSC 165

Spring 2015
Summer 2014
Question 1.
Midterm Test Solutions
CSC 165 H1
[15 marks]
An interpretation for a logical statement consists of a domain D (any nonempty set of elements) and
a meaning for each predicate symbol. For example, D = cfw_1, 2 and P (x): x > 0 is an
Mathematical Reasoning and Expression in Computer Science
CSC 165

Winter 2013
H
A
N
D
LE
IN
P
SE
A
UNIVERSITY OF TORONTO
Faculty of Arts and Science
A
H
LE
IN
Duration  110 minutes
P
D
N
CSC 165H
A
SE
Midterm Test
Student Number:
Last/Family Name:
First/Given Name:
Do not turn this page until you have received the signal to start.