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 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
CS 103 Homework 2 Solutions
Spring 2013-14
Problem 1
Nim is a family of games played by two players. The game is set up with several of piles of stones. Players
take turns removing stones from the piles, such that each move involves removing one or more s
1. Problem 1 (20 points)
This question is designed to get you used to the notation and mathematical conventions
surrounding sets. We strongly suggest working through this problem and doublechecking that your answers are correct before starting Problem 2.
. . .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 2015
Handout 12
October 2, 2015
Problem Set 2
This second problem set explores mathematical logic and provides more opportunities for you to
practice you proof techniques. We've chosen the questions here to help you get a more nuanced understan
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
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
Handout #58 May 28, 2010
CS103 Robert Plummer
Practice Final
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 . Draw a state d
Homework 6
Due: Friday, February 21, 2014
CS 103, Winter 2013-2014
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, lik
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
Handout #61 June 2, 2010
CS103 Robert Plummer
Practice Final 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 . Draw
Announcements
HW7s will be returned on Friday.
HW8 is due the last day of class (Wed. June 5).
P and NP I
David L. Dill
Department of Computer Science
Stanford University
1 / 22
Outline
2 / 22
Running Time of a DTM
Def: A DTM M has running time (or time
Announcements
Problem session tonight.
Induction proofs
David L. Dill
Department of Computer Science
Stanford University
2 / 22
1 / 22
Outline
Pigeonhole Principle
Informally, the pigeonhole principle says: If you put a larger
number of things in a small
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
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
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
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
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
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
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
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
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,
CS103X: Discrete Structures
Homework Assignment 7
Due March 14, 2008
Exercise 1 (20 points). Let G be a graph that has no induced subgraphs that are P4 or C3 .
(a) Prove that G is bipartite.
(b) Assume in addition that G is connected. Prove that G is a co
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
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