York University
EECS 2001
June 22, 2015
Homework Assignment #6
Due: July 8, 2015 at 7:00 p.m.
1. The textbook gives a high-level description of a Turing machine to decide the language
C = cfw_ai bj ck : i j = k and i, j, k 1 in Example 3.11 on page 174. (

York University
EECS 2001
May 20, 2015
Homework Assignment #1
Due: May 27, 2015 at 7:00 p.m.
When you submit your solution to Assignment 1, you should also hand in the
declaration on academic honesty. Without this declaration, your assignment will
not be

York University
CSE2001
February 16, 2011
Homework Assignment #5
Due: March 2, 2011 at 2:30 p.m.
1. Give a regular expression that describes the set of all odd-length binary strings that contain
an even number of 0s.
2. The York University Turing Machine

York University
EECS 2001
November 5, 2016
Bonus Assignment
Due: Friday, November 18, 2016 at 4:00 p.m.
For this bonus assignment, you must construct a Turing machine that takes a lot of steps
and then halts.
We shall restrict attention to Turing machines

York University
EECS2001
November 13, 2014
Test 2
First Name:
Last Name:
Student Number:
This test lasts 80 minutes. No aids allowed.
You may use any result that was proved in class or in the textbook without reproving it.
You may also use the Church-Turi

York University
EECS 2001
September 30, 2016
Homework Assignment #4
Due: October 6, 2016 at 4:00 p.m.
1. If L is any language, we define ADD(L) to be the set of all strings that can be obtained
by inserting a single character into a string in L. More form

York University
EECS 2001
September 22, 2016
Homework Assignment #3
Due: September 29, 2016 at 4:00 p.m.
Hand in Question 1 on paper in class. Submit Question 2 electronically.
1. Nine people are arranged in a circle, facing the centre, to play a game. At

York University
EECS 2001
November 1, 2016
Homework Assignment #7
Due: November 8, 2016 at 4:00 p.m.
1. In class, we discussed a way to simulate a k-tape Turing machine using an ordinary (singletape) Turing machine. Our construction was a little different

York University
EECS 2001
June 3, 2015
Quiz
First Name:
Last Name:
Student Number:
This test lasts 40 minutes. No aids allowed.
Make sure your test has 3 pages, including this cover page.
Answer in the space provided. (If you need more space, use the reve

York University
EECS 2001
November 10, 2016
Homework Assignment #8
Due: November 17, 2016 at 4:00 p.m.
1. For this question, assume that the input alphabet of all the Turing machines discussed is = cfw_0, 1.
Let L = cfw_hM1 , M2 i : M1 and M2 are TMs and

York University
EECS 2001
September 8, 2016
Homework Assignment #1
Due: September 15, 2016 at 4:00 p.m.
When you submit your solution to Assignment 1, you should also hand in the
declaration on academic honesty. Without this declaration, your assignment w

York University
CSE2001
September 23, 2010
Homework Assignment #2
Due: October 5, 2010
1. Recall the formal denition of a string from class: a string over alphabet is a function
from cfw_i IN : 1 i to (where is some natural number called the length of th

Nondeterminism
Nondeterministic machines are capable
of being lucky, no matter how small the
probability.
A nondeterministic finite automaton
has transition rules/possibilities like
q1
9/24/2013
1
q2
q1
CSE 2001, Fall 2013
q2
1
q3
21
A Nondeterministic Au

York University
CSE2001
January 10, 2011
Homework Assignment #0
Due: January 19, 2011 at 2:30 p.m.
This assignment is based on material that is a prerequisite to this course. See the handout Mathematical Prerequisites. After doing any rough work required,

CSE 2001
May 7, 2012
Review Questions
1. Prove that (p (r p) is logically equivalent to r p.
2. Use a proof by contradiction to show that if n is an integer and n2 is even, then n is even.
3. Is the following statement true or false?
x in R, y in R such t

York University
CSE 2001
October 5, 2010
Homework Assignment #4
Due: October 26, 4:00 p.m.
For this assignment, you do not have to prove that your answers are correct. For
full marks, your answers should be as simple as possible.
1
1
0
0
. We shall use st

York University
EECS 2001
July 7, 2015
Homework Assignment #7
Due: July 15, 2015 at 7:00 p.m.
1. In this question, we consider a variant of a Turing machine called a Card Turing Machine
(CTM). Instead of a tape, this machine has two piles of paper cards,

York University
EECS 2001
June 1, 2015
Homework Assignment #3
Due: June 10, 2015 at 7:00 p.m.
1. In this question, we shall consider a nite automaton that uses the input alphabet =
0
0
1
1
,
,
,
. If x is a string, we dene top(x) and bottom(x) to
0
1
0
1

York University
EECS 2001
June 8, 2015
Homework Assignment #4
Due: June 17, 2015 at 7:00 p.m.
1. If L is any language, we dene DROP (L) to be the set of all strings that can be
obtained by removing a single character from a string in L. More formally,
DRO

York University
CSE2001
March 2, 2011
Homework Assignment #6
Due: March 9, 2011 at 2:30 p.m.
1. Let L be a language over some alphabet .
Let w1 w2 . . . wn be a string (where each wi ). Let A[0.n] be an array of boolean
values. We would like to ll in A wi

York University
EECS 2001
October 16, 2014
Homework Assignment #6
Due: Friday October 24, 2014 at 5:00 p.m.
1. The textbook gives a high-level description of a Turing machine to decide the language
C = cfw_ai bj ck : i j = k and i, j, k 1 in Example 3.11

York University
EECS 2001
September 9, 2014
Homework Assignment #1
Due: September 18, 2014 at 4:00 p.m.
This assignment is based on material that is a prerequisite to this course. See the handout Mathematical Prerequisites. After doing any rough work requ

York University
EECS 2001
September 23, 2014
Homework Assignment #3
Due: October 2, 2014 at 4:00 p.m.
1. Draw the transition diagram of a deterministic nite automaton that accepts the language
of all binary strings that contain an even number of 0s and en

York University
EECS 2001
September 15, 2016
Homework Assignment #2
Due: September 22, 2016 at 4:00 p.m.
Submission Instructions: Each question below requires you to design a finite automaton.
You must type a description of your automaton (using the file

EECS2001
ASSIGNMENT 3
Deadline: March 30
PROBLEM 1. 1%
In your course directory, there is a file called text. Use Unix (Linux)
egrep command together with appropriate regular expressions to accomplish the
following tasks:
(a) find all
end with
(b) find al

EECS 2001
Assignment 1
Deadline: January 28, 2015
NOTES:
(i) assignments must be deposited in the EECS 2001 drop box;
(ii) assignments must have a cover page clearly indicating:
your full name and student number, the course number as well as
this assignme

EECS2001
ASSIGNMENT 3 - solutions
This assignment is marked out of 7%
PROBLEM 1. 1% (0.2% each)
(a) egrep a[:alpha:]e text
(b) egrep m[:alpha:]*r text
(c) egrep [a-e]d text
(d) since some of you asked to change the requirement to all occurrences of
number

EECS 2001
Assignment 4 - Solutions
PROBLEM 1. 1% (i)=0.2%, (ii)=0.5% and (ii)=0.3%)
In what follows, (w q s) denotes a configuration of a PDA, where w is the input
string to
be processed, q is the current state, and s is the contents of the stack.
(i) M=<

Assignment 2 - solutions
PROBLEM 1:
(a) Let G-<V,T,P,S),
where:
V=cfw_0,1
T=cfw_S,A
P:
S->0A0 | 1A1 |00 | 11
A->0 | 1 | AA
Note that one can generate any non-empty string of 0s and 1s from A. Also, the S
productions guarantee that derivable strings start

EECS 2001
Assignment 2
Deadline: February 11, 2015
NOTES:
(i) assignments must be deposited in the EECS 2001 drop box;
(ii) assignments must have EECS 2001 cover page clearly indicating:
your full name, student number as well as the course name
and this a

EECS 2001
Assignment 4 - Solutions
PROBLEM 1. 1% (i)=0.2%, (ii)=0.5% and (ii)=0.3%)
In what follows, (w q s) denotes a configuration of a PDA, where w is the input
string to
be processed, q is the current state, and s is the contents of the stack.
(i) M=<

EECS2001
ASSIGNMENT 3
Deadline: March 26
PROBLEM 1. 1%
In your course directory, there is a file called text. Use Unix (Linux)
egrep command together with appropriate regular expressions to accomplish the
following tasks:
(a) find all
end with
(b) find al