CPSC 121, Winter 2017: Assignment 1
Alice Gao, Ryan Vogt, and Steve Wolfman
Due Thursday 19 January 2017 at 16:00
1. An Island of Riddles (10 marks)
There is an island on which everyone is a dragon or
CPSC 121: Models of Computation
Assignment #5, due Tuesday April 7th , 2015 at 17:00
[6] 1. Design a DFA that accepts exactly the strings over the alphabet cfw_A, B, . . . , Z in
which every pair of c
CPSC 121: Models of Computation
Assignment #4, due Friday, July 6th , 2007 at 14:25
[6] 1. Determine the truth value of each statement. The domain of discourse is the set R of real
numbers. Justify yo
CPSC 121: Models of Computation
Assignment #5, due Friday, July 13th , 2007 at 14:25
[12] 1. Consider the theorem: for all integers a, b and c, if a divides b and a does not divide c, then
a does not
CPSC 121: Models of Computation
Assignment #2, due Thursday February 5th , 2015 at 17:00
[6] 1. Computers represent characters by associating with each character a specic sequence of 0s and 1s. In thi
CPSC 121: Models of Computation
Assignment #4, due Friday, July 6th , 2007 at 14:25
[6] 1. Determine the truth value of each statement. The domain of discourse is the set R of real
numbers. Justify yo
CPSC 121: Models of Computation
Assignment #3
SOLUTIONS
Question 1
We use the typical order of operations (as the text does): ~ is evaluated first, then and , and
is evaluated last.
a) x U, J(x) C(x)
#
0
1
2
3
4
5
6
7
8
9
A
F
F
F
F
F
F
F
F
T
T
B
F
F
F
F
T
T
T
T
F
F
C
F
F
T
T
F
F
T
T
F
F
D
F
T
F
T
F
T
F
T
F
T
#
0
1
2
3
4
5
6
7
8
9
a
F
F
F
F
F
F
F
F
T
T
b
F
F
F
F
T
T
T
T
F
F
c
F
F
T
T
F
F
T
T
F
F
d
2017/9/17
Take Test: Quiz 3a: Number Representation - Part 1 .
Take Test: Quiz 3a: Number Representation - Part 1
Test Information
Description
Instructions Readings for this quiz: 1.5 (Epp 3rd ed) or
CPSC 121: Models of Computation
Assignment #5 Solutions
Question 1 [9]
Lets try a few terms first:
n
S(n)
1
1/2
2
2/3
3
3/4
4
4/5
n
n/(n+1)
We claim that for any n 1, S(n) = n/(n+1)
We will prove that
CPSC 121: Models of Computation
Assignment #4 Solutions
Question 1
a.
nZ+, Odd(n) jZ, kZ, n = j2 k2
b. Proof:
Let n be any positive integer.
Assume n is odd. Well show that n = j2 k2 for some integers
For theorems like:
You might try:
WLOG
x D, P (x).
Exhaustion
Cases
In which case, write:
WLOG, let x be an element of D.
We proceed by exhaustion over D.
Note that Q(x) or
R(x) must be true.
And then
CPSC 121 Midterm 1
Friday October 14th, 2016
Name:
Student ID:
Signature:
Section (circle one): 11:00 15:30 17:00
You have 70 minutes to write the 9 questions on this examination.
A total of 60 marks
CPSC 121 Midterm 1
Wednesday 31 May 2017
Name:
Student ID:
Signature:
Question Marks
1
You have 60 minutes (individual), 30 minutes (group) to
write the 15 questions on this examination. A total of 3
3/30/17
CPSC 121: Models of Computation
Who am I?
Alice Gao ([email protected])
Postdoctoral fellow in Computer Science
PhD in Computer Science at Harvard University
Undergrad in CPSC and MATH at UB
CPSC 121: Models of Computation
Unit 1
Propositional Logic
Based on slides by Patrice Belleville and Steve Wolfman
Last Updated: 2017-09-09 12:04 AM
PreLecture Learning Goals
By the start of the clas
Lab Activities
Icebreaker
When you arrive at the lab, your TAs will lead an icebreaker activity so that you can get to
know your labmates. This will help you find a partner for the lab. The labs are m
2/8/17
Admin
Midterm 1 is at 7pm tonight.
Pre-class quiz #7 is due Thursday at 7pm.
Assigned reading for the quiz:
Epp, 4th edition: 4.1, 4.6, Theorem 4.4.1
Module 6: Rewriting
predicate logic statem
3/30/17
Due dates
Pre-class quiz 3 due Sunday January 15 at 7pm.
Module 2: Conditionals and
Logical Equivalences
Assigned Readings:
Epp, 4th edition: 2.5
http:/en.wikipedia.org/wiki/Binary_numera
2/5/17
Admin
Midterm 1: read the Piazza post on the two-stage
exam.
Assignment #2 is due Thursday Feb 2 at 4pm.
Pre-class quiz #6 is due Thursday Feb 2 at 7pm.
Module 5: Predicate Logic
Assigne
CPSC 121 - PROPOSITIONAL LOGIC I
Problem 1. Consider the following two circuits whereP and Q are the input signals. Are these two circuits
logically equivalent?
(1) Circuit 1:
(2) Circuit 2:
Problem 2
CPSC 121 TUTORIAL 1 - PROPOSITIONAL LOGIC I SOLUTIONS
Problem 1. Consider the following two circuits whereP and Q are the input signals. Are these two circuits
logically equivalent?
(1) Circuit 1:
(2)
CPSC 121: Models of Computation
Assignment #1, due Tuesday 23 May 2017 at 16:00
[9] 1. An Island of Riddles
There is an island on which everyone is a dragon or a troll. Dragons, being noble,
always te
CPSC 121: Models of Computation
Assignment #2, due Tuesday 30 May 2017 at 16:00
[15] 1. ASCII Soup
Computers represent characters by associating with each character a specific sequence
of 0s and 1s. I
CPSC 121, Summer 2016: Midterm 1
Ryan Vogt
27 May 2016
This exam is open-book, and you may use any written or printed materials to assist you. You
may not use any electronic devies, though (e.g., calc
CPSC 121: Models of Computation
Assignment #1, due Tuesday 23 May 2017 at 16:00
[9] 1. An Island of Riddles
There is an island on which everyone is a dragon or a troll. Dragons, being noble,
always te
CPSC 121: Models of Computation
Module 1: Course Introduction
Today's learning goals
By the end of this module, you should be able
to:
Give an example of how we can apply formal
reasoning to a simple,
CPSC 121: Models of Computation
Assignment #1
Due: Monday September 25, 4:00 pm
Submission Instructions- read carefully
Total: 42 Marks
All assignments should be done in groups of 2. It is very