MBB.IntroProb13.ch10sec4
TRUE/FALSE
1. In testing the difference between two population means using two independent samples, the
sampling distribution of the sample mean difference
both greater than 30.
ANS: F
is normal if the sample sizes are
PTS: 1
2. T
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 8
1. Consider the decision problem of testing whether a DFA and a regular expression are
equivalent. Express this problem as a language and show that it is decidable.
2. Consider th
1. (7 pts) Express the multinomial coefcient (4 3102 1) as a product of binomial coef
cients. I
(Ll?) (g) (a) - 0W faClUnEC-Ihm Me foSSJMQH
2. (8 pts ea.) (a) Show that the number of (n + 1) element multisets with elements 1n
cfw_1,. ,k + 1, and containi
1. (10 points each) For each of the following counting problems, express the answer in
terms of factorials, falling powers, binomial, multinomial and multichoose coefcients, Stir-
ling numbers (of either kind) and/ or partition numbers. Write answers in a
CS 341, Fall 2011
Solutions for Quiz 2, Day Section
1. (a) There are two different approaches one can use to show that ILP NP:
Show that ILP has a nondeterministic Turing machine that runs in polynomial time, or
Show that ILP has a polynomial-time verif
CS 341, Day Class, Fall 2013
Quiz #2
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the back
of the qu
CIS 341, Face-to-face Section, Fall 2013
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the ba
CIS 341, Face-to-face Section, Fall 2011
Quiz #2
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the ba
CIS 341, Face-to-face Section, Spring 2013
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the
CS 341, Day Class, Fall 2012
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the back
of the qu
CIS 341, Face-to-face Section, Fall 2014
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the ba
CS 341, Fall 2014
Solutions for Quiz 1, Day Section
1. (a) A is not closed under reversal. For example, w = 01 A, but w R = 10 6 A.
(b) A DFA for A is below:
q3
1
1
q1
0
0
q2
1
0
0
1
q4
(c) Note that C = cfw_w | w = s01 for some s , i.e., strings that end
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 1
1. Answer the questions below for the sets
C
D
E
F
=
=
=
=
cfw_, aab, baa,
cfw_bb, aab,
cfw_,
.
Except for parts (c) and (h), write out any sets with the elements in string order,
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 6
1. Give pushdown automata that recognize the following languages.
(a) A = cfw_ w cfw_0, 1 | w contains at least three 1s
(b) B = cfw_ w cfw_0, 1 | w = w R and the length of w is
Midterm Exam
CS 341-452: Foundations of Computer Science II Spring 2016, eLearning section
Prof. Marvin K. Nakayama
Print family (or last) name:
Print given (or first) name:
I have read and understand all of the instructions below, and I will obey the Uni
Midterm Exam 2
CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section
Prof. Marvin K. Nakayama
Print family (or last) name:
Print given (or first) name:
I have read and understand all of the instructions below, and I will obey the
CS 341, Fall 2016, Face-to-Face Section
Solutions for Midterm 1
1. (a) False. A = cfw_an bn | n 0 is context-free but not regular.
(b) True. Homework 2, problem 5.
(c) False. 0 1 generate the string 001
6 A, so the regular expression is not correct.
In f
Midterm Exam 1
CS 341: Foundations of Computer Science II Fall 2016, day section
Prof. Marvin K. Nakayama
Print family (or last) name:
Print given (or first) name:
I have read and understand all of the instructions below, and I will obey the University Co
Midterm Exam
CS 341-451: Foundations of Computer Science II Fall 2016, eLearning section
Prof. Marvin K. Nakayama
Print family (or last) name:
Print given (or first) name:
I have read and understand all of the instructions below, and I will obey the Unive
CS 341, Fall 2016, Face-to-Face Section
Solutions for Midterm 2
1. (a) False. A TM M may loop on input w.
(b) False. ATM is not Turing-recognizable by Corollary 4.23.
(c) True, because the definition of Turing-decidable is more restrictive than the
defini
CS 341, Spring 2016
Solutions for Midterm, eLearning Section
1. (a) False. For example, let A = cfw_an bn | n 0 and B = (a b) . Then A B, B is
regular, but A is nonregular.
(b) False. a b generates the string abb 6 cfw_an bn | n 0. In fact, cfw_ an bn | n
CS 341, Fall 2016
Solutions for Midterm, eLearning Section
1. (a) True. Suppose A is non-context-free but regular. But then Corollary 2.32 implies
A is context-free, which is a contradiction.
(b) False. The language a is regular but infinite.
(c) False. T
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 5
1. Give context-free grammars that generate the following languages.
(a) cfw_ w cfw_0, 1 | w contains at least three 1s
(b) cfw_ w cfw_0, 1 | w = wR and |w| is even
(c) cfw_ w c
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 11
1. Answer each part TRUE or FALSE.
(a) 2n = O(n).
(b) n2 = O(n).
(c) n2 = O(n log2 n).
(d) n log n = O(n2 ).
(e) 3n = O(2n ).
(f) 3n = 2O(n) .
n
n
(g) 22 = O(22 ).
2. Let b > 1 b
CS 341: Foundations of Computer Science II
Prof. Marvin Nakayama
Homework 7
1. Give an implementation-level description of a Turing machine that decides the language
B = cfw_ 0n 1n 2n | n 0 .
2. (a) Show that the class of decidable languages is closed und
CS 341, Spring 2012
Solutions for Quiz 1, Day Section
1. (a) bba, abba, bbba, aabba, abbba, babba
(b) A is closed under concatenation. To prove this, let w1 and w2 be arbitrary strings
in A. Then w1 and w2 both end in bba. Then the concatenation w1 w2 als
CIS 341, Face-to-face Section, Spring 2012
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the
CIS 341, Face-to-face Section, Fall 2011
Quiz #1
Prof. M. K. Nakayama
Print Family (i.e., Last) Name:
Print Given (i.e., First) Name:
Student ID Number:
For each question, write the answer next to the question. If you need to use scratch paper, use the ba
CO 220 Winter 2009 Homework #4.
Five questions due Friday, March 6th, 2009.
1. Consider the three graphs G, H, and J pictured below.
(a) Two of these graphs are isomorphic. Determine which two, and exhibit
an isomorphism between them.
(b) Give an explanat
CO 220 Homework #6
Six questions due on Friday, April 3rd.
1. Is the graph shown here planar or non-planar? Explain your answer.
2. Is the graph shown here planar or non-planar? Explain your answer.
1
3. Consider the three graphs G, H, and J pictured here