Homework 2
Due: Friday, April 19, 2013
CS103, Spring 2012-2013
Monday 4/15 5:30 p.m.: Problem 6 has been cancelled. All students will get
full credit on this problem.
These questions require thought, but do not require long answers. Please be
as concise
Handout #4
March 28, 2011
CS103
Robert Plummer
Problem Set #1 - Due Monday, April 4 in class
Here are the homework policies for this class:
1. All assignments are due in class.
2. Be sure to put your name on your paper and staple the pages together.
3. If
. . .CS103 HO#9 Proof Methods 4/9/10
1. How do we prove conditionals? The truth table for p q tells us that the conditional holds iff q can't be false when p is true. So what we can do is this, when we are dealing only with propositions: Premises. Suppose
CS103
Fall 2014
Handout 09
October 3, 2014
Problem Set 2
This second problem set is all about induction and its sheer breadth of applications. By the time
you're done with this problem set, you will have a much deeper understanding of how to think in duct
Homework 1
Due: Friday, April 12, 2013
CS 103 Spring 2012-2013
Notes
4/5/2013 3:10 PM We deleted an extra in problem 1, denition of Y .
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include
CS103
Fall 2015
Handout 09
September 25, 2015
Problem Set 1
Here we are the first problem set of the quarter! This problem set is designed to give you practice
writing proofs on a variety of different topics like set theory, binary operators, puzzles, gam
CS103
HO#54
Slides-More on Reductions
CS103
5/27/11
HALTTM = cfw_ M, w | Turing machine M halts on w
NOHALTTM = cfw_ M, w | Turing machine M does not halt on w
Mathematical Foundations of Computing
5/27/11
FINAL EXAM: Monday, June 6, 12:15 3:15
Braun Au
Announcements
Homework 5 due now.
Homework 6 is on the web.
Context-free Languages I
David L. Dill
Department of Computer Science
Stanford University
2 / 21
1 / 21
Outline
Context-Free Languages
Context-free languages are more expressive than regular la
Announcements
Homeworks returned at end of lecture.
No Dill oce hours today.
Context-free Languages III
David L. Dill
Department of Computer Science
Stanford University
2 / 22
1 / 22
Outline
Push-down automata
A push-down automaton is a generalized nite
Announcements
Discussion section this evening.
Turing Machines and Decidability II
David L. Dill
Department of Computer Science
Stanford University
2 / 18
1 / 18
Outline
Recursive and recursively enumerable (summary)
Turing machines are one of many forma
Announcements
HW8 assigned today.
HW8 will be due on the last day of class.
Turing Machines and Decidability IV
David L. Dill
Department of Computer Science
Stanford University
2 / 22
1 / 22
Outline
Mathematical denition of Turing machine
There is a spe
Announcements
Homework 1 is assigned today.
First problem session Monday evening.
First Order Logic
Keith Schwartzs course notes are on the web page.
David L. Dill
Department of Computer Science
Stanford University
2 / 31
1 / 31
Outline
Example
Propositio
Announcements
Homework due today.
Next homework is on the web.
Turing Machines and Decidability I
David L. Dill
Department of Computer Science
Stanford University
2 / 29
1 / 29
Outline
Turing machines
Regular languages have restricted expressive power,
Announcements
Graded homeworks will be returned at the end of the lecture.
Turing Machines and Decidability III
David L. Dill
Department of Computer Science
Stanford University
2 / 24
1 / 24
Outline
Computable Functions
Turing machines can also implement
Announcements
No Dill oce hours this week.
Problem session tonight.
Context-free Languages II
David L. Dill
Department of Computer Science
Stanford University
2 / 21
1 / 21
Outline
Arithmetic expressions
E E + E | E E | E E | E | (E ) | num
Suppose 1, 2
Announcements
Homework 2 due now.
Homework 3 is posted on the web.
Functions, Cardinality
David L. Dill
Department of Computer Science
Stanford University
2 / 25
1 / 25
Outline
Function Composition
The composition of functions f : A B and g : B C is wri
Handout #62
June 4, 2011
CS103
Robert Plummer
Practice Final #2 Solutions
FINITE AUTOMATA
1. (5 points) Let L be the following language:
L = cfw_ w | w cfw_0, 1* and the number of 0's in w is divisible by 2 and the number of 1's
in w is divisible by 3 .
D
TABLE 6 Logical Equiw'aloncoa.
Identity Jaws
Domination laws
ldontpotont laws
In a: q E a v p Commutative lawa
noazaop
{p v a l a; r' E p v 1!] v H Associative Jaws
{p n a t .A. r' E p A it; Art
p v {a .o. r} E {p as qr} .A. U? arr} [tiati'ihtltive lawa
J
Homework 4
Due: Friday, May 3, 2013
CS 103, Spring 2012-2013
General Notes
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
n
Homework 5
Due: Friday, May 10, 2013
CS 103, Spring 2012-2013
General Notes
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
Homework 3
Due: Friday, April 26, 2013
CS103, Spring 2012-2013
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
name, like di
Homework 7
Due: Friday, May 24, 2013
CS 103, Spring 2012-2013
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
name, like dil
Homework 6
Due: Friday, May 17, 2013
CS 103, Spring 2012-2013
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
name, like dil
Homework 8
Due: Wednesday, June 5, 2013
CS 103, Spring 2012-2013
These questions require thought, but do not require long answers. Please be
as concise as possible.
Please include your SUNet ID in your submission. (This is your WebAuth login
name, like
Handout #61
June 4, 2011
CS103
Robert Plummer
Practice Final #1 Solutions
FINITE AUTOMATA
1. (5 points) Let L be the following language: L = cfw_ awa | w cfw_a, b* . Show by
drawing an NFA that L* is regular. Your NFA should have no more than three state
Announcements
Cray Welcome Back Picnic with WICS on Friday afternoon! RSVP
by Wednesday. (Email sent.)
Functions
David L. Dill
Department of Computer Science
Stanford University
1 / 26
Outline
2 / 26
Equivalence relation
Def: An endorelation R is an equiv
Announcements
Homework 3 due now.
Homework 4 is on the web.
Introduction to formal language theory
Practice midterm is on the web.
Dont forget the midterm Thursday evening.
David L. Dill
Department of Computer Science
Stanford University
2 / 25
1 / 25
Outline
CS103 Introduction and Set Basics
Course Introduction and Overview
Purpose and Content
Course Administration
David L. Dill
Department of Computer Science
Stanford University
Sets
Basics
1 / 31
Purpose of the class
2 / 31
Topics
Our goal is to get
Announcements
HW8 due today.
Final review Monday evening see Piazza. We recommend
CS103 Review
that you try working through the sample nal rst.
David L. Dill
Department of Computer Science
Stanford University
1 / 19
Outline
2 / 19
Final
First-order logi
Announcements
HW5 assigned today due in one week.
Regular Languages III
David L. Dill
Department of Computer Science
Stanford University
2 / 25
1 / 25
Outline
Regular expression denition
Regular expressions are dened relative to some alphabet .
This is a