Jacob Lowey
Question 1 [Rosen Section 1.1, Exercise 30] ( points)
How many rows appear in a truth table for each of these compound propositions?
(a) (q p) (p q) 4 rows
(b) (p t) (p s) 8 rows
(c) (p r) (s t) (u v)
64 rows
(d) (p r s) (q t) (r t)
32 rows
Qu
Jacob Lowey
Question 1 [Rosen Section 1.3, Exercise 42]
Suppose that a truth table in n propositional variables is specified. Show that a compound
proposition with this truth table can be formed by taking the disjunction of conjunctions of the
variables o
Evelyn Skinner
8 Oct 2015
Assignment 4
1)Itistrueforn=2,since2 is divisible by 2.
Supposeitistrueforallnfrom2tok1.Provekisdivisiblebyaprime.Ifkisprime,thenkisdivisible
bytheprime QED.
If kisnotprime,itmustbecomposite.Thusk=ab, k=ab,whereaandbareintegersle
Rachel Blacker
RIN: 661034719
CSCI 2200 | Spring 2016
FOCS Homework 4
Problem 1
Prove that for all 2, $ > & + 3. What happens for = 1 or = 0?
When = 1 the inequality is false.
1$ > 1& + 3 = 1 > 4
When = 0 the inequality is false.
0$ > 0&
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 7
5) We can picture n summed in 1s. So if n = 4 we have 1, 1, 1, 1. We can then imagine that there are
k - 1 dividers between these 1s, such that the 1s are split up into k sect
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 5
5)
a) By definition we know that a full rooted binary tree must always have an odd number of nodes, and
also only leaf and full nodes.
Base Case: Full rooted binary tree has s
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 9
5)
a)
We have n people: x1,x2,x3,xN.
Considering there are n hats, the probability of any person x i getting their hat back is 1/n, thus
E[xi] = 1/n
Since X is the total numbe
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 6
5) We can prove there exists n >= 3 for n boys and n girls such that all matchings lead to stable
relationships. We can do this by devising an algorithm such that we can organ
Name:
CSCI 2200: Foundations of Computer Science
Homework 3
Due Monday, Feb. 23, 2014 at 10:00 am, in class
Section:
1. (20 points) Prove that for all positive real numbers x and y, (x + y)/2 = xy if and only if x = y.
Solution: First. we prove that x+y
x
FoCS: Exam 2 Review Questions
1. (Rosen 2.4: prob. 15) Show that the sequence cfw_an is a solution of the recurrence relation
an = an1 + 2an2 + 2n 9 if
(a) an = 5 (1)n n + 2
(b) an = 7 2n n + 2
2. For each of the recurrence relations below, write the sol
CSCI 2200: Foundations of Computer Science
Homework 1 Solution (100 points)
Due Thursday, Feb. 5 2014 at 10:00 am, in class
Homework must be typed.
1. (15 points) Using propositional logic, write a statement that contains the propositions p, q, and r that
1 (20)
CSCI 2200: Foundations of Computer Science
Homework 2 Solution
Due Thursday, Feb. 12, 2014 at 10:00 am, in class
Homework must be typed.
2 (20)
3 (30)
4 (30)
Total (100)
1. (20 points) Let F (x, y) be the statement x can fool y and let P (x, y) be
CSCI 2200 - Spring 2015
Exam 1
Name:
Instructions:
Write your name on the front and back of this cover sheet and sign the bottom of this
page.
You have 100 minutes to complete this exam. The exam is worth a total of 100 points.
Put away laptop computer
Rachel Blacker
RIN: 661034719
CSCI 2200 | Spring 2016
FOCS Homework 6
Problem 1
Suppose you have 35 books (15 novels, 10 math books, and 10 computer science
books). Assume that all 35 books are different. In how many ways can you:
Put the 35 b
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 1
5)
a) x and y are irrational numbers. We know 2 is irrational, so x = 2. We can then set y = 2 2, though we
have not yet proven that it is irrational. When we do y x = (22) 2
CSCI-2200 Foundations of Computer Science
Spring 2015 Homework 8
Vincent Cerati
September 11, 2015
1. If I keep going on the chosen path there is a 23 % chance I will be eaten by the giant. Using
Bayes theorem I calculated the probability I chose the path
CSCI-2200 Foundations of Computer Science
Spring 2015 Homework 2
Vincent Cerati
February 11, 2015
1. (a)
(b)
(c)
(d)
xy F (x, y)
yx F (x, y)
F (x, y) = P (y, x)
P (x, y) = z P (z, y)
2. (a) xy(P (x) Q(y)
(b) xy(P (x) = Q(y)
(m c)
(d = m)
(d = s)
3. (a)
c
CSCI-2200 Foundations of Computer Science
Spring 2015 Homework 6
Vincent Cerati
April 18, 2015
1. (a) procedure: sumodds(n: nonnegative integer)
if n = 1 then return 1 else return sumodds(n-1) + 2n - 1
(b) Base case: n = 1 it returns 1 trivially. Inductio
CSCI-2200 Foundations of Computer Science
Spring 2015 Homework 5
Vincent Cerati
March 28, 2015
1. (a) 1
(b)
1
(n+1)!
n
X
i
1
=1
(i
+
1)!
(n
+
1)!
i=1
Base Case:
When n = 1, the equation holds as seen below:
1
1
2 =1 2
Inductive Step:
k
X
i
1
= 1
(i + 1)!
Rachel Blacker
RIN: 661034719
CSCI 2200 | Spring 2016
FOCS Homework 8
Problem 1
Consider the alphabet = cfw_, . Show that the following languages are regular (give
the FAs, either deterministic or non-deterministic, that accept the languages):
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 10
5)
a) CFG for computational task:
G is defined by:
S => 0S1S | 1S0S | (Empty string)
L(G) is the CFG of computational task L
b) L is any string with the same number of 1s and
Vincent Cerati - 61191386
Foundations of Computer Science
Fall 2014
Homework 4
Base Case:
Say n = 2. Then there are two people, p1 and p2, in the tournament. Say p1 beats p2, then we line them
up as p2, p1 and fit the specifications of the theorem. Proven
Rachel Blacker
RIN: 661034719
CSCI 2200 | Spring 2016
FOCS Homework 3
Problem 1
Let = , , and = cfw_, . Determine whether the following statements are true or
false and explain your answer. (We use 2+ to denote the powerset of a set .)
1.
a.
Rachel Blacker
RIN: 661034719
CSCI 2200 | Spring 2016
FOCS Homework 9
Problem 1
Give Standard Turing machines for each of the following languages (the alphabet is
always = cfw_, ):
( = cfw_,
o At the initial state, if the input string start
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 2
5)
You have an unlimited supply of 4c and 5c stamps. Prove by induction that you can make any
postage value greater than 12c.
Essentially this is asking us to prove the follow
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 8
5)
a) We will always need at least 4 buckets for the compounds. Say n = 4 and there are 4 compounds:
c1, c2, c3, c4. Although this is the minimum number of compounds, each com
Vincent Cerati - 661191386
Foundations of Computer Science
Fall 2014
Homework 3
5)
Base Case: A 21 *21 grid.
This can clearly be filled in by a single L-tile, as the remaining 3 tiles are in
the shape of an L-tile. Base Case Proven!
Inductive step:
Assume
FoCS: Exam 2 Review Questions
1. (Rosen 2.4: prob. 15) Show that the sequence cfw_an is a solution of the recurrence relation
an = an1 + 2an2 + 2n 9 if
(a) an = 5 (1)n n + 2
(b) an = 7 2n n + 2
2. For each of the recurrence relations below, write the sol
CSCI 2200 - Spring 2014
Exam 2
Name:
Instructions:
You have 105 minutes to complete this exam. The exam is worth a total of 90 points.
Put away laptop computers and other electronic devices. Calculators are NOT allowed.
Cheating on an exam will result i
Yihao Huang
RIN: 661536870
1,
A)
(a (17) mod 4 1
(a mod 4 (17) mod 4) 1
(a 3) mod 4 1
a3
B)
a 17 mod 4
a3
C)
a 17(mod 4)
a (mod 4) 17 mod(4)
a (mod 4) 3
a 4k 3
k 0, a 3
Yihao Huang
RIN: 661536870
2, Prove that if a, b, m Z, m 2, and a b(mod m), then gcd(a
CSCI 2200: Foundations of Computer Science
Homework 6 (100 points)
Due Thursday, April 6, 2017 at 11:59pm, in Gradescope
Homework submission and formatting requirements
Submissions not meeting the following requirement will receive a score of 0 and will n
CSCI 2200: Foundations of Computer Science
Homework 7 (100 points)
Due Friday, April 21, 2017 at 11:59pm, in Gradescope
Homework submission and formatting requirements
Submissions not meeting the following requirement will receive a score of 0 and will no
CSCI 2200: Foundations of Computer Science
Homework 1 (100 points)
Due Thursday, Jan. 26 2017 at 11:59pm, in Gradescope
Homework submission and formatting requirements
Submissions not meeting the following requirement will receive a score of 0 and will no
CSCI 2200: Foundations of Computer Science
Homework 4 (100 points)
Due Thursday March 9, 2017 at 11:59pm, in Gradescope
Homework submission and formatting requirements
Submissions not meeting the following requirement will receive a score of 0 and will no
CSCI 2200: Foundations of Computer Science
Homework 2 (100 points)
Due Thursday, Feb. 9, 2017 at 11:59pm, in Gradescope
Homework submission and formatting requirements
Submissions not meeting the following requirement will receive a score of 0 and will no