Homework 8
Due: Monday, March 2, and Friday, March 6, 2014
CS 103, Winter 2014-2015
EDIT: L(f ) was changed to L(f ). This doesnt change the meaning of anything in
the problem set, we just wanted to make it easier to read.
Notes Specic to This Homework
A
22 Slides-Poofs with Quantifiers
2/6/08
12.23
Proofs with Quantifiers
CS103A
Every child is right-handed or intelligent
No intelligent child eats liver
There is a child who eats liver and onions
There is a right-handed child who eats onions
2/6/08
Review
CS103A
HO# 11
Fitch Proofs
1/23/08
Conjunction Elimination ( Elim)
LPL Websites
http:/www-csli.stanford.edu/LPL/
http:/ggww2.stanford.edu/GUS/lpl/
Go to Student Resources for solutions and hints
Go to Related Pages for a link to a page that
identifies the
CS103A
HO#12
Slides-Fitch Examples
1/25/08
Example
Example
Example
Example
Example
1
CS103A
HO#12
Slides-Fitch Examples
1/25/08
Proof of Resolution Principle
Proof of Resolution Principle
(Proof 6.19)
AB
BC
(Proof 6.19)
AB
BC
A
AC
B
AC
AC
AC
Proof of Reso
Equivalencerelation:Reflexive,symmetric,and
transitive
Totalorder:Ristotalandpartialorder,andeach
elementiscomparabletoeachother
PartialOrder:Reflexive,antisymmetric,and
transitive
1. Mary loves everyone. [assuming D contains only humans] x love (Mary,
x)
Y OUR FINAL EXAM
D ECIDABILITY
P AND NP
T HE P UMPING L EMMA
CS103 Final Review
March 14, 2015
CFG S
Y OUR FINAL EXAM
D ECIDABILITY
P AND NP
T HE P UMPING L EMMA
T HE EXAM - LOGISTICS
I
Monday, 16th March 8:30 am - 11:30 am
I
Hewlett 200
I
Closed-book, cl
CS103
Summer 2016
July 13, 2016
Problem Set 4
This 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 inductively. Plus, you'll
CS103 Problem Set 7
Dylan McKay
August 2016
1
Concept Questions (4 points)
1. Let P be the set containing exactly the name of the next president of the
United States. Is P decidable? Justify your answer.
2. Suppose n is positive integer. If 2n 1 is a prim
CS103
Summer 2016
Problem Set 5
This problem set explores the regular languages and their properties. This will be your first foray
into computability theory, and I hope you find it fun and exciting!
As always, please feel free to drop by office hours, as
CS103
Summer 2016
Problem Set 3
This third problem set explores functions, cardinality, and relations. We've chosen these problems
to help you get a sense for how to reason about these structures and how to write proofs using formal mathematical definitio
FirstOrderLogic
o
(pq)pqand(pq)pq
o
(pq)pqorpq(pq)
o
o
o
pqqp
Someblobfishiscute.x.(Blobfish(x)Cute(x)
ThestatementVx.Ey.P(x,y)meansforanychoicex,there'ssomey
whereP(x,y)istrue.
ThestatementEx.Vy.P(x,y)meansthereissomexwhereforany
choiceofy,wegetthatP(x,
CS103
Summer 2016
Handout 13
June 30, 2016
Problem Set 2
This second problem set explores mathematical logic. We've chosen the questions here to help
you get a more nuanced understanding for what first-order logic statements mean (and, importantly, what t
Handout #35
Feb. 15, 2008
CS103A
Robert Plummer
Mathematical Proofs
John C. Mitchell & Maggie Johnson
Department of Computer Science
Stanford University
1. Why write proofs?
According to Webster's Unabridged Dictionary, the word prove comes from the Latin
CS103A
HO #57
Gdel II
3/12/08
Gdel Numbering
Gdel's Incompleteness Theorem
(
x
)
8
4
11
9
(
x
8
=
11
s
y
5
)
7
13
9
2 3 5 7 11 13 17 19 23 29
This scheme allows us to represent every formula with a unique
number. Given a number, we can determine whether i
CS103A
HO #56
Gdel's Incompleteness Theorem
Gdel's Incompleteness Theorem
3/10/08
Gdel, Kurt (1931). ber formal unentscheidbare Stze der Principia
Mathematica und verwandter Systeme I. Monatshefte fr Mathematik
und Physic, 38, 173-198.
On formally undecid
CS103A
HO #54
Combinatorics III
3/7/08
Set of size n, selecting r items, 0 r n
Permutations and Combinations with Repetition
Permutations
(ordered)
How many strings of length r can we form from the uppercase
letters of the English alphabet, if repetition
CS103A
HO #52
Combinatorics II
3/5/08
What is |A B C| ?
A
B
Once
Once
Once
Once
Once
Once
Once
A survey of 200 TV viewers found that 110 watch
sports, 120 watch comedy, 85 watch drama, 50 watch
drama and sports, 70 watch comedy and sports,
55 watch comedy
Handout #51
March 3, 2008
CS103A
Robert Plummer
Combinatorics
Combinatorics is the study of counting, which is important in Computer Science in many ways:
To understand the performance of algorithms, we need to count the steps they execute
We also need to
CS103
June 21, 2016
Summer 2016
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, number theory, puzzles, games, and
even logi
Homework 7
Due: Monday, March 2, 2015
CS 103, Winter 2014-2015
EDIT: Note that the previous version of this pset incorrectly stated that the due
date was Friday.
Instructions for Problem 1-2
Solutions to Problem 1 should be submitted using the NFA develo
Notations, Denitions and Theorems
CS 103 Winter 2014-2015
Syntax and Trees
Denition 1 (Abstract Syntax Tree). An abstract syntax tree is a concise tree representation of a linear notation.
The process of converting a linear notation to a syntax tree is ca
Homework 5
Due: Friday, February 13, 2015
CS103, Winter 2014-2015
NOTE : There are no problems on EdX for Homework 5.
Instructions for Problem 1
This problem is intended to help make sure you have understood the diagonalisation proof covered in lecture.
Homework 6 - Part 2
Due: Friday, February 20, 2015
CS103, Winter 2014-2015
Instructions for Problem 1
Solutions to this question should be submitted using the NFA developer at
https:/web.stanford.edu/class/cs103/cgi-bin/nfa/edit.php
Only the nal submiss
Homework 2
Due: Friday, January 23, 2015
CS 103 Winter 2015
Instructions
There are four parts to this homework. Problem 1 is on Blocks World. Problem 2
is about identity proofs in predicate logic. Problem 3 consists of written questions.
Problem 1 and 2 a
Homework 9
Due: Friday Mar 13, 2014
CS103, Winter 2014-2015
Instructions
There are no early submission problems this week.
Some of the material for Problems 4 and 5 will be taught in Monday lecture.
CFGs will be graded on functionality only.
All solut
Homework 1
Due: Friday, January 16, 2015
CS 103 Winter 2015
Instructions
There are two parts to this homework.
First, there are some multiple choice questions on edX. These are due Friday, January
16, 2015 12:30 PM PST; however, the 10% extra credit appli
CS 109 - Ron Dror
Winter 2015
Homework 1
Wednesday January 7th, 2015
Due: Friday January 16th, 2015 2:15 PM
For each problem, briefly explain/justify how you obtained your answer. Brief explanations of your
answer are necessary to get full credit for a pr
CS 109 - Ron Dror
Winter 2015
Homework 4
Friday February 6th, 2015
Due: Wednesday February 18th, 2015
For each problem, briefly explain/justify how you obtained your answer. Brief explanations of your
answer are necessary to get full credit for a problem
CS 109 - Ron Dror
Winter 2015
Homework 2
Friday January 16th, 2015
Due: Monday January 26th, 2015 2:15 PM
For each problem, briefly explain/justify how you obtained your answer. Brief explanations of your
answer are necessary to get full credit for a prob
CS 109 - Ron Dror
Winter 2015
Homework 6
Friday February 27th, 2015
Due: Monday March 9th, 2015 2:15 PM
Friday, March 13th is the last day Homework 6 will be accepted (HARD DEADLINE!)
For each problem, briefly explain/justify how you obtained your answer.
CS 109 - Ron Dror
Winter 2015
Homework 3
Monday January 26th, 2015
Due: Friday February 6th, 2015 2:15 PM
For each problem, briefly explain/justify how you obtained your answer. Brief explanations of your
answer are necessary to get full credit for a prob
CS 109 - Ron Dror
Winter 2015
Homework 5
Wednesday February 18th, 2015
Due: Friday February 27th, 2015
For each problem, briefly explain/justify how you obtained your answer. Brief explanations of your
answer are necessary to get full credit for a problem
V1: (quywanwnAw: mm) a. P > (Q > R) 41> (PAQ) > R
a w : (33, ; uP(y) v 62(2) A Va: ; 174;) by deMorgaanrall Solution (2 pain):
4% V: : (Ely : uP(y) V (2(3) AE($) by distribForaJlAnd
4: ~11: (ay ; -IP(y) v (in; ; 0(1) AR(1) by qmmmnm P > (Q > R) 4 -P V (Q