Algorithms
Spring 2013, Homework # 4
Due: June 10, 2013
1. (20 pts) Let G = (V, E) be a weighted, directed graph with n vertices and m edges, where all
edge weights are nonegative. Dene the bottleneck
Algorithm Design and Analysis
Homework #4
Due: 2:20pm, Thursday, November 28, 2013
TA email: [email protected]
= Homework submission instructions =
For Problem 1, commit your source code to the SVN
Algorithm Design and Analysis
Homework #3
Due: 2:20pm, Thursday, October 31, 2013
TA email: [email protected]
= Homework submission instructions =
For Problem 1, commit your source code to the SVN
Algorithm Design and Analysis
Homework #2
Due: 2:20pm, Thursday, October 17, 2013
TA email: [email protected]
= Homework submission instructions =
For Problem 1, commit your source code and a brief
Algorithm Design and Analysis
Homework #1
Due: 5pm, Friday, October 4, 2013
TA email: [email protected]
= Homework submission instructions =
For Problem 1, commit your source code and a brief docum
1. [Grading Rule] One mistake (out of order) costs 2 points.
2
1+
3
O ( 1 ) =192< lg lg n< ln n=lg n< ( lg n ) < n<n<n ( lg n )< n < n
nn3+ 7 n5 <nk <2n < n!
2. [Grading Rule] One sub-problem costs 5
Algorithms
Spring 2013, Homework # 1
Due: March 18, 2013
1. (20 pts) List the functions below from lowest to highest order. If any two (or more) are of the
same order, indicate which. (You do not have
Algorithms
Spring 2013, Homework # 2
Due: April 8, 2013
1. (20 pts) Consider the following algorithm to sort the values in array A[p.q]. To sort the entire
array, call New-Sort(A, 1, n). ( denotes ass
Algorithms
Spring 2013, Homework # 3
Due: May 6, 2013
1. (25 pts) Describe an ecient algorithm that, given a set cfw_x1 , x2 , ., xn of points on the real
line, determine the smallest set of unit-len
1. [Grading Rule] Algorithm costs 15 pts. Running time costs 5 pts. Correctness
costs 5 pts.
Greedy Solution:
1. Sort the set so that x1 <= x2 <= <= xn.
2. Let xmin be the smallest number in the set.
1. [Grading Rule]
(a)
Each sub-problem costs 10 pts.
(b)
No, New-Sort is not stable. Consider the sub-array S:
cfw_41, 42, 23, 24, 35, where the subscript numbers indicate original indices.
After swit
Online Algorithms
Introduction
An offline algorithm has a full information in advance so it can
compute the optimal strategy to maximize its profit (minimize its
costs).
An online algorithm is a strat
Algorithms
Dep. of Electrical Engineering
National Taiwan University
E-mail: [email protected]
http:/www.ee.ntu.edu.tw/~yen
Spring 2013
(Algorithms )
:
Theme: What is the best algorithm for a gi
Algorithm Design and Analysis
Homework #5
Due: 2:20pm, Monday, December 23, 2013
TA email: [email protected]
= Homework submission instructions =
For Problem 1, commit your source code to the SVN s
National Taiwan University
Department of Electrical Engineering
Algorithms, Fall 2016
Handout #6
October 19, 2016
TA: Zhi-Wen Lin and Yen-Chun Liu
Sample Solutions to Homework #1
1. (10)
(a) See Figur
National Taiwan University Department of Electrical Engineering Algorithms, Fall 2009
Handout #9 October 29, 2009 Yao-Wen Chang
Name:
Student ID:
Web ID:
Problem 1. (24 pts total) Given four matrices
National Taiwan University Department of Electrical Engineering Algorithms, Fall 2009
Handout #15 December 10, 2009 Yao-Wen Chang
Name:
Student ID:
Web ID:
Problem 1. (15 pts total) A group of n girls
National Taiwan University Department of Electrical Engineering Algorithms, Fall 2009
Handout #19 December 31, 2009 Yao-Wen Chang
Name:
Student ID:
Web ID:
Problem 1. (8 pts total) Does either Prims o
Unit 2: Sorting and Order Statistics
Course contents:
Heapsort
Quicksort
Sorting in linear time
Order statistics
Readings:
Chapters 6, 7, 8, 9
Algorithm
Runtime
Best case
Insertion
Unit 2
Average
case
National Taiwan University
Department of Electrical Engineering
Algorithms, Fall 2016
Handout #2
September 22, 2016
Yao-Wen Chang
Homework #1 (due in-class, October 13, 2016)
1. Work on (a) Exercise 2
Algorithms
EE4033; #901/39000
Yao-Wen Chang
[email protected]
http:/cc.ee.ntu.edu.tw/~ywchang
Graduate Institute of Electronics Engineering
Department of Electrical Engineering
National Taiwan Univer
National Taiwan University
Department of Electrical Engineering
Algorithms, Fall 2016
Handout #4
October 9, 2016
Yao-Wen Chang
Homework #2 (due in-class, November 3, 2016)
1. Work on (a) Exercise 6.4-
Unit 8: Coping with NP-Completeness
Course contents:
Complexity classes
Reducibility and NP-completeness proofs
Coping with NP-complete problems
Reading:
Unit 8
Chapter 34
Chapter 35.1, 35.2
Y.-W. Cha
Unit 3: Tree Data Structures
Course contents:
Binary search trees
Red-black trees
Interval trees
Readings:
Unit 3
Chapters 10 (self reading), 12, 13, and 14 (self reading
for Chapter 14)
Y.-W. Chang
1
National Taiwan University
Department of Electrical Engineering
Algorithms, Fall 2016
Handout #7
October 19, 2016
TAs: Zhi-Wen Lin and Yen-Chun Liu
Sample Solutions to Quiz #1
1. Apply lg operation to
National Taiwan University Department of Electrical Engineering Algorithms, Fall 2009
Handout #4 October 8, 2009 Yao-Wen Chang
Name:
Student ID:
Web ID:
Problem 1. (12 pts) For the following functions