CPSC 121: Models of Computation
Assignment #3, due Wednesday, October 23th , 2013 at 17:00
[12] 1. Consider the following predicates over the set U of all UBC students:
P(x): x is pursuing a BSc in physics.
K(x): x speaks Klingon.
C(x): x plays curling
CPSC 121: Models of Computation
Assignment #1, due Thursday, September 19th , 2013 at 17:00
[10] 1. When we use a computational system, such as a circuit built out of gates, or (later
in the course) regular expressions, we like it to have as many features
CPSC 121: Models of Computation
Assignment #1
Due: Monday September 28, 17:00
Total: 30 Marks
Submission Instructions- read carefully
We strongly recommend that you do the assignments in groups of 2, but we dont require it .
We believe that in this course
CPSC 121: Models of Computation
Assignment #1, due Thursday, January 21st , 2016 at 17:00
[10] 1. When we use a computational system, such as a circuit built out of gates, or (later
in the course) regular expressions, we like it to have as many features a
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 this question, you will be dealing with the ASCII and
Unic
CPSC 121: Models of Computation
Assignment #1
SOLUTIONS
Note: For most problems, the solution shown here is not the only correct solution.
Question 1 [ 12]
a. ~p
~ (p V p) . Therefore it is implemented by
b. p V q
~ (~(p V q) V ~(p V q) ) and is implement
CPSC 121: Models of Computation
Assignment #4
Due: Wednesday, March 26, 2014 at 17:00
Total Marks: 30
Submission Instructions- read carefully
All assignments should be done in groups of 2. It is very important to work with another
student and exchange ide
CPSC 121 Sample Final Examination
December 2013
[6] 1. Short answers
[3] a. What is wrong with the following circuit?
Solution : You can not connect the outputs of two or more gates together directly;
what will happen if one of the gates tries to drive it
Name
Student No
The University of British Columbia
CPSC 210
Sample Midterm Examination - Solution
Question 1. Will be discussed in class.
Question 2. Implementing an Object-Oriented Design. [Total 14 points]
a. (10 points) Consider a software system that
CPSC 121: Models of Computation
Assignment #5
Due: Monday, April 7, 2014 at 17:00
Total Marks: 18
Submission Instructions- read carefully
All assignments should be done in groups of 2. It is very important to work with another
student and exchange ideas.
CPSC 121: Models of Computation
Assignment #4, due Monday, March 16th , 2015 at 17:00
Each of the following questions asks you to prove (or disprove) a theorem. When the
theorem is stated in English, it would be an excellent idea to rst rewrite it in pred
CPSC 121: Models of Computation
SAMPLE Final Exam, 2009 April 17
Name:
Student ID:
Signature:
Section (202, 203, or BCS):
The cover page on the real exam will be identical to this one except that (1) it will not include this line, (2)
the number of quest
CPSC 121: Models of Computation
Assignment #1 Solution
[10] 1. When we use a computational system, such as a circuit built out of gates, or (later in the
course) regular expressions, we like it to have as many features as possible since it
makes it more c
CPSC 121
Lecture 4
January 12, 2009
Menu January 12, 2009 Topics: Representing Values Reading: Today: Epp 1.5 January 14: Epp 1.3 Reminders: Labs and tutorials have begun! On-line Quiz 3 deadline 9:00pm January 13 READ the WebCT Vista course announcements
CPSC 121: Models of Computation
Assignment #6, Not to be handed in.
1. Evaluate the sum
n
S(n) =
k
(k + 1)!
k=1
for n = 1, 2, 3, 4, 5. Make a conjecture about a formula for S(n) that works for every n 1, and then
prove your conjecture by mathematical indu
CPSC 121: Models of Computation
Assignment #3, due Friday, June 5th , 2015 at 18:00
Each of the following questions asks you to prove (or disprove) a theorem. When the
theorem is stated in English, it would be an excellent idea to rst rewrite it in predic
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 consecutive Es occurs before every pair of consecutive O
CPSC 121: Models of Computation
Assignment #5, due Wednesday, November 27th , 2013 at 17:00
[6] 1. Design a nite state machine that takes in a string of bits, and terminates in an
accepting state if the string of bits ends with 10110. Clearly indicate the
CPSC 121: Models of Computation
Lab #6: Sequential Circuits
Objectives
In this lab, you will learn more about sequential circuits and get some practice implementing them in Logisim. You will
also learn about a new type of memory called RAM, or random acce
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 consecutive Es occurs before every pair of consecutive O
CPSC 121: Models of Computation
Assignment #2, due Thursday October 3rd , 2013 at 17:00
[8] 1. Computers represent characters by associating with each character a specic sequence of 0s and 1s. In this question, you will be dealing with the ASCII and
Unico
CPSC 121: Models of Computation
Assignment #4, due Monday, March 16th , 2015 at 17:00
Each of the following questions asks you to prove (or disprove) a theorem. When the
theorem is stated in English, it would be an excellent idea to rst rewrite it in pred
CPSC 121: Models of Computation
Assignment #4, due Wednesday, November 6th , 2013 at 17:00
Each of the following questions asks you to prove (or disprove) a theorem. When the
theorem is stated in English, it would be an excellent idea to rst rewrite it in
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 this question, you will be dealing with the ASCII and
Unic
CPSC 121: Models of Computation
Unit 8: Sequential Circuits
Based on slides by Patrice Belleville and Steve Wolfman
Pre-Class Learning Goals
By the start of class, you should be able to
Trace the operation of a DFA (deterministic finite-state
automaton)
CPSC 121: Models of Computation
Unit 7: Proof Techniques
Based on slides by Patrice Belleville and Steve Wolfman
Pre-Class Learning Goals
By the start of class, for each proof strategy below, you
should be able to:
Identify the form of statement the str
Exam No
The University of British Columbia
Computer Science 121
Midterm 2
March 15, 2012
Time: 70 minutes
Instructors (Circle one):
Total marks: 60
Section 202 - Patrice Belleville
Section 203 & BCS - George Tsiknis
Name
(PRINT)
Student No
(Last)
(First)
CPSC 121: Models of Computation
Unit 6
Rewriting Predicate Logic Statements
Based on slides by Patrice Belleville and Steve Wolfman
Pre-Class Learning Goals
By the start of class, you should be able to:
Determine the negation of any quantified statement
CPSC 121: Models of Computation
Unit 5
Predicate Logic
Based on slides by Patrice Belleville and Steve Wolfman
Before-Class Learning Goals
By the start of class, you should be able to
Evaluate the truth of predicates applied to particular values.
Show
CPSC 121: Models of Computation
Unit 9b: Mathematical Induction - part 2
Based on slides by Patrice Belleville and Steve Wolfman
Outline
Strong Mathematical Induction.
Pattern and Examples
More examples using induction.
Further exercises.
Unit 9: Indu
Learning Goals: In-Class
By the end of the unit, you should be able to:
Give an example of how we can apply formal
reasoning and computers to a simple, real-world
task.
Give an example of how a computational solution
to a simple task might go wrong.
De
Learning Goals: In-Class
By the end of this unit, you should be able to:
Devise and attempt multiple different, appropriate
proof strategiesincluding all those listed in the
pre-class learning goals plus use of logical
equivalences, rules of inference, u
CPSC 121: Models of Computation
2017S
Proof Techniques
(Part A)
Meghan Allen based on notes by Steve
Wolfman, Patrice Belleville and others
1
Outline
Learning Goals, Quiz Notes, and Big Picture
Problems and Discussion: Generally Faster?
Breaking Down B
Syllabus update
Instead of two midterms, we will only have
one midterm. It will be on Thursday, June 15
at 6pm in DMP 310
CPSC 121: Models of Computation
2017S
Propositional Logic:
A First Model of Computation
Meghan Allen, based on notes by Steve Wolfma
Quick Review (?) of Sets
A set is a collection of elements:
the set of students in this class
the set of lowercase letters in English
the set of natural numbers (N)
the set of all left-handed students in this class
CPSC 121: Models of Computation
2017