Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CC511.
Quiz
#3
2012.03.06
Student I. D.:
1.
Name:
A multiplechoice quiz consists of 10 questions, each with five possible answers of
which only one is correct. A student passes the quiz if nine or more correct answers
are obtained. Then, what is the prob
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CC511 Quiz #8
Student I. D.:
Name:
2012.04.26
1. Suppose that two independent samples from two normal populations are given as
follows: and .
Here, the problem of testing two population means are given by
versus .
If two variances are equal and unknown,
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CC511. Quiz #3
2012.03.06
Student I. D.:
Name:
1. A multiplechoice quiz consists of 10 questions, each with five possibleanswers of
which only one is correct. A student passes thequiz if nine or morecorrect answers
are obtained. Then, whatis theprobabilit
Korea Advanced Institute of Science and Technology
Introduction to Software Engineering
COMPUTER S CS550

Spring 2016
SYSTEM MODELING AND SIMULATION
UNIT8
VIK
1
UNIT 8: VERIFICATION AND VALIDATION OF SIMULATION MODELS, OPTIMIZATION: Model building, verification and validation; Verification of simulation
models; Calibration and validation of models. Optimization via Simu
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
String Matching
Sung Yong Shin
TC Lab.
CS Dept., KAIST
Contents
1.
2.
3.
4.
5.
Problem Definition
Straightforward Algorithm
String Matching with Finite Automaton
KnuthMorrisPratt Algorithm
BoyerMoore Algorithm
1. Problem Definition
T
P
SM : Given a tex
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Recurrence Relations
Recurrence Relations
Chapter 7
(7.2 Solving Recurrence Relations)
A recurrence relation for the sequence a0, a1, is an equation that relates equation that relates an to certain of its predecessors certain of its predecessors a0, a1,
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
End Note Questions
Functions, Sequences, & Relations Relations
Chapter 3 (3.4 Equivalence Relations) September 23, 2009 23 2009
Any specific topic for me to review from 1.6~3.2?
Strong form of induction (6 students) Mathematical Induction related (3 stu
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
For the past two weeks
Finished Chapter 1: Sets and Logic Learn Chapter 2: Proof Chapter 2: Proof Started Chapter 3: Functions and Sequences Questions? direct to Prof.Song: [email protected] Homework #1 graded
Average= 84.5 (Max= 100, Min= 51)
Functions, S
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Discrete Mathematics
CS204
Lecture #7
September 18, 2009
at KAIST
1
What is a function?
The Blackbox Analogy  The mechanism that assigns to each input an output is ignored.  Two blackboxes are equivalent as functions if they produce identical outputs fr
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Discrete Mathematics
CS204
Lecture #6
September 16, 2009
at KAIST
1
Review
Recall that  Mathematical induction, as a method of proof, is based on the following property of the set of positive integers. For n
Z+ ,
S (1) (n S (n) S (n + 1) n S (n)
where S
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Discrete Mathematics
CS204
Lecture #5
September 14, 2009
at KAIST
1
Review
Recall that  Proof by examples does not count as a proof unless the examples are exhaustive.  Among methods of direct proofs, there are
Constructing a counterexample for negatio
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Discrete Mathematics
CS204
Lecture #4
September 11, 2009
at KAIST
1
Review
Recall that  A proof is a sequence of purely logical arguments from hypotheses to a conclusion.  A long but nonexhaustive list of veried examples or cases does not count as a pr
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Discrete Mathematics
CS204
Lecture #3
September 9, 2009
at KAIST
1
Some Terminology from the last class
Suppose a conditional proposition
pq
is true. Then  we may use q as a criterion to test the truth value of p, and  we may use also p as a criterion t
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Homework #1
[was just due]
Show all your work in your homework.
Sets and Logic
Chapter 1 (1.4 Arguments and Rules of Inference 1.5 Quantifiers) September 7, 2009
Section 1.1 Exercises (p.12~13)
#50~54 #87~90 #94
Section 1.2 Exercises (p.20~21)
#49~54 #6
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Homework #1
[due: 9/7 11AM]
Show all your work in your homework.
Sets and Logic
Chapter 1 (1.2~1.3 Propositions) September 4, 2009 2009
Section 1.1 Exercises (p.12~13) (p
#50~54 #87~90 #94
Section 1.2 Exercises (p.20~21)
#49~54 #68,69,71,72
Section 1
Korea Advanced Institute of Science and Technology
Discrete Math
COMPUTER S Cs206

Spring 2008
Sets
Sets and Logic
Chapter 1 (1.1 Sets) September 2, 2009
A set is a collection of objects, order is not taken into account. Objects = elements, members elements members How to describe it?
By listing all members: A = cfw_1,2,3,4 listing all members: c
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
Theorem 1. Each subgraph consisting of the edges in an equivalence class and the incident vertices forms a biconnected component. Proof. Assume that the subgraph does not form a biconnected component. Then by denition, the subgraph contains at least one a
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
Theorem 1. If M (n) c log(n) and c > 0, then T (n) = O(n), where T (n) = 2T Proof. T (n) = 2T n + M (n) 2 n < 2T + c log n 2 n n < 2 2T 2 + c log + c log n 2 2 < . . . n n n n < 2k T k + c 2k1 log k1 + 2k2 log k2 + + 2 log + log n , if n = 2k 2 2 2 2 k2k1
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
Theorem 1. Let a, b, c, d R. Then the solution to the recurrence equation T (n) = for n = ck is the following: if a < c O(n) O(n log n) if a = c T (n) = O(nlogc a ) if a > c And theorem holds even if n = ck . Proof. For n = ck , T (n) = aT (n/c) + dn = a[
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
Theorem 1. Properties of O, , , o, Proof. P1 1. Prove f O(g ) and g O(h) f O(h). f c1 g, g c2 h, c1 , c2 R+ c3 R+
f c1 g c1 c2 h = c3 h, f O(h) 2. Prove f (g ) and g (h) f (h). f c1 g, g c2 h,
c1 , c2 R+ c3 R+
f c1 g c1 c2 h = c3 h, f (h) 3. Prove f (g )
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
Theorem 1. The intersection of a nite number of convex sets is also convex. Proof. 1. Let A, B be two convex sets. Take any pair of elements p, q such that p, q A B . Since A is convex, by denition, p + (1 )q A Similarily, p + (1 )q B Then the following i
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CS300 Algorithm Programming Assignment #3
GOAL I mplement Kruskals MST algorithm and BoyerMoore string matching algorithm
Programming Requirements Language: only C (C+ is not allowed.) Environment (1): Windows Visual Studio 6.0 / Visual Studio 2005 Envir
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CS300 Algorithm Programming Assignment #2
Graphrelated algorithms
GOAL Implement various graphrelated algorithms Programming Requirements Language: only C (C+ is not allowed.) Environment: Windows (recommended) Visual Studio 2005, 2008 Linux gcc 4.x (TA
Korea Advanced Institute of Science and Technology
Algorithm and analysis
COMPUTER S cs300

Spring 2008
CS300 Algorithm Programming Assignment #1
Implementing sorting algorithms
GOAL Implement various sorting algorithms. Programming Requirements Language: only C (C+ is not allowed.) Requirements (a) Implement all of the sorting algorithms youve learned in t