CSC C63, Spring 2016
Assignment 4 Solutions
Problem 1:
(a) It is a decision problem.
We will use a verification algorithm. A certificate is a complete prime factorization of n. The
verification algorithm multiplies the given factorization to confirm that

1. (12 pts) Short Answers.
(a) (4 pts) Name any NPcomplete problem.
CNFISAr
(b) (4 pts) State Churchs Thesis.
AVW Q031'ol9cvsuk 4,\&a\".(\|"( Catt (o QMcocLcL
d") a. Tut/1m; Mmolaivd
(c) (4 pts) What does it mean for a verication algorithm to run in polyn

080 063 Midterm Exam
Mar 12, 2012
1 hour and 50 minutes
NAME: 3 0 L U 0 6
Calculators are not permitted (nor would they be useful).
This is cfw_Elosed FdSkrexam;
Ask an invigilator if there is anything that you do not understand completely.
M m, cfw

CSC C63 Final Exam
April 10., 2015
NAME:
Calculators are not permitted (nor would they be useful).
This is a closed book exam.
M Alt-l HS
%?~ /lt kg
% /35 #u_
l 3 Paes You can assume that the following problems are NP-complete.
CNF-SAT
Input: A CNF boolea

University of Toronto Scarborough
CSC C63
Final Examination
23 April 2013
NAME:
STUDENT NUMBER:
Do not begin until you are told to do so. In the meantime, put your name and student number
on this cover page and read the rest of this page.
Aids allowed: No

University of Toronto Scarborough
CSC C63
Final Examination
18 August 2014
NAME:
STUDENT NUMBER:
Do not begin until you are told to do so. In the meantime, put your name and student number
on this cover page and read the rest of this page.
Aids allowed: N

University of Toronto Scarborough
CSC C63
Final Examination
14 August 2013
NAME:
STUDENT NUMBER:
Do not begin until you are told to do so. In the meantime, put your name and student number
on this cover page and read the rest of this page.
Aids allowed: N

CSC 363, Winter 2010 Short Assignment #2 Solution
1) Scan the input tape, checking the syntax of the DFA encoding, and setting tape 2 to the largest state
number that appears in the transition table.
a) Reject if the first symbol on tape 1 is not $, other

CSC C63 Midterm Exam
Mar 2, 2015
1 hour and 50 minutes
NAME:
Calculators are not permitted (nor would they be useful).
This is a closed book exam.
Ask an invigilator if there is anything that you do not understand completely.
1
1. (16 pts) Short Answers.

CSC 363, Winter 2010 Solutions to Long Assignment #1
Question 1: For any language L, define the language L as the set of all permutations of strings
in L. In other words,
L = cfw_ s1 s2 sn | for some permutation 1 2 n of 1, . . . , n, s1 s2 sn is in L
He

CSC 363 Solutions to Test #2, Winter 2010
1) [ 30 marks ] Recall that a clique in an undirected graph is a set of nodes in which every pair of nodes
is connected by an edge. The textbook defined the language CLIQUE as follows:
CLIQUE = cfw_ hG, ki | G is

CSC 363 Solutions to Test #1, Winter 2010
1) Consider the Nondeterministic Finite Automaton (NFA) with alphabet = cfw_ 0, 1 , state space
Q = cfw_ q0 , q1 , q2 , q3 , q4 , start state q0 , set of accepting states F = cfw_ q2 , q4 , and transition
function

CSC C63 Final Exam
April 22, 2014
NAME:
Calculators are not permitted (nor would they be useful).
This is a closed book exam.
1
You can assume that the following problems are NP-complete.
SAT
Input: A CNF boolean formula, F .
Question: Is F satisfiable?
3

CSC C63, Winter 2016
Assignment 1 Solutions
Problem A Many of you solved this one. Compare your solutions.
Problem B X is decidable, by the following algorithm:
Input i.
Test whether i is prime.
If i is not prime, reject.
If i is prime, then test whether

CSC C63, Spring 2016
Assignment 3 Solutions
Problem 1:
(a) The problem is:
DWVC
Input: A graph G with a positive integer weight on every vertex, and an integer T .
Question: Does G have a vertex cover of total weight at most T ?
(DWVC stands for Decision

CSC C63, Spring 2016
Assignment 2 Solutions
Problem 1: We denote the language by A.
(i) First, we will prove that A is not decidable:
Assume that a Turing Machine T decides A. Under this assumption, we can solve the Halting
Problem as follows:
1. Input <