Programming Contest Syl Lab Us
Programming Contest Syl Lab Us
2.
3.
4.
5.
6.
Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
e. Line Sweep/Plane Sweep algorithms
Area/Perimeter of Union of Rectangles.
O(n) construction of Suffix Trees if provided with Suffix Arrays using Farachs algorithm.
e. Suffix Automata
http://www.algorithmist.com/index.php/Category:String_algorithms
Basic Graphs [beginner].
a. Representation of graphs as adjacency list, adjacency matrix, incidence matrix and edge list and uses of different representations in
different scenarios.
b. Breadth First Search.
problems - TAXI, POTHOLE, IM, QUEST4, MUDDY, EN, CABLETV, STEAD, NETADMIN, COCONUTS, OPTM on SPOJ.
b. Maximum flow using Dinics Algorithm.
problems - http://acm.uva.es/archive/nuevoportal/data/problem.php?p=4039
a.
b.
Cormen chapter on DP
Standard problems (you should really feel comfortable with these types)
http://www.topcoder.com/stat?c=problem_statement&pm=8570&rd=12012&rm=269199&cr=7581406
c.
d.
http://www.topcoder.com/stat?c=problem_statement&pm=5908
e.
http://www.topcoder.com/stat?c=problem_statement&pm=8306
f.
http://www.topcoder.com/stat?c=problem_statement&pm=10765&rd=14183
g.
h.
http://www.topcoder.com/stat?c=problem_statement&pm=10806
http://www.topcoder.com/stat?c=problem_statement&pm=7828
http://www.topcoder.com/stat?c=problem_statement&pm=7316
http://www.topcoder.com/stat?c=problem_statement&pm=2959
http://www.topcoder.com/stat?c=problem_statement&pm=10335
DP on trees
http://www.topcoder.com/stat?c=problem_statement&pm=10800
i.
http://www.topcoder.com/stat?c=problem_statement&pm=7849
DP on probability spaces
http://www.topcoder.com/stat?c=problem_statement&pm=7422
http://www.topcoder.com/stat?c=problem_statement&pm=10737
http://www.topcoder.com/stat?c=problem_solution&rm=266678&rd=10958&pm=8266&cr=7581406
DP with datastructures
http://www.spoj.pl/problems/INCSEQ/
http://www.spoj.pl/problems/INCDSEQ/
http://www.spoj.pl/problems/LIS2/
http://www.topcoder.com/stat?c=problem_statement&pm=1986
j.
http://www.topcoder.com/stat?c=problem_statement&pm=8610
k.
http://codeforces.com/blog/entry/325
8.
http://www.topcoder.com/stat?c=problem_statement&pm=3001
http://www.topcoder.com/stat?c=problem_statement&pm=8605&rd=12012&rm=269199&cr=7581406
http://www.spoj.pl/problems/MUSKET/
7.
http://www.topcoder.com/stat?c=problem_statement&pm=10765&rd=14183
http://www.topcoder.com/stat?c=problem_statement&pm=10902
http://problemclassifier.appspot.com/index.jsp?search=dp&usr=
Greedy.
a. Suggested Reading
Chapter on Greedy algorithms in Cormen.
http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=greedyAlg
b. problems - refer to the topcoder tutorial.
Number Theory.
a. Modulus arithmetic - basic postulates [Including modular linear equations , Continued fraction and Pell's equation]
Suggested Reading 1. Chapter 1 from Number Theory for Computing by SY Yan [ Recommended ]
2. 31.1, 31.3 and 31.4 from Cormen
3. www.topcoder.com/tc?module=Static&d1=tutorials&d2=primeNumbers
Problems
1. http://projecteuler.net/index.php?section=problems&id=64
2. http://projecteuler.net/index.php?section=problems&id=65
3. http://projecteuler.net/index.php?section=problems&id=66
4. http://www.topcoder.com/stat?c=problem_statement&pm=6408&rd=9826
5. http://www.topcoder.com/stat?c=problem_statement&pm=2342
b. Fermat's theorem, Euler Totient theorem ( totient function, order , primitive roots )
Suggested Reading
1. 1.6, 2.2 from Number Theory by SY Yan
2. 31.6 , 31.7 from Cormen
Problems
1. http://projecteuler.net/index.php?section=problems&id=70
2. http://www.spoj.pl/problems/NDIVPHI/
c. Chinese remainder theorem
Suggested Reading
1. 31.5 from Cormen
2. 1.6 from Number Theory by SY Yan
Problems
1. Project Euler 271
2. http://www.topcoder.com/stat?c=problem_statement&pm=10551&rd=13903
d. Primality tests
Deterministic O(sqrt(n) ) approach
Suggested Reading
1. 31.2 Cormen
Suggested Reading
1. 2.3 from Number Theory SY Yan
2. 31.9 Cormen
Problems 1. http://www.topcoder.com/stat?c=problem_statement&pm=2986&rd=5862
2. http://www.spoj.pl/problems/DIVSUM2/
3. http://www.topcoder.com/stat?c=problem_statement&pm=4481&rd=6538
i. Stirling numbers
j. Wilson theorem
http://www.codechef.com/wiki/tutorial-number-theory
http://www.algorithmist.com/index.php/Category:Number_Theory
Problems on Number Theory
http://www.algorithmist.com/index.php/Category:Number_Theory
http://problemclassifier.appspot.com/index.jsp?search=number&usr=
Math (Probability, Counting, Game Theory, Group Theory, Generating functions, Permutation Cycles, Linear Algebra)
a. Probability.
Syllabus
Suggested Readings
1. Cormen appendix C (very basic)
2. Topcoder probabilty tutorial http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=probabilities
3. http://en.wikipedia.org/wiki/Random_variable
4. http://en.wikipedia.org/wiki/Expected_value
5. William Feller, An introduction to probability theory and its applications
m.
9.
Counting
Syllabus
Inclusion-exclusion
1. Suggested readings
a. http://en.wikipedia.org/wiki/Inclusionexclusion_principle
2. Suggested problems
a. http://www.topcoder.com/stat?c=problem_statement&pm=4463&rd=6536
b. http://www.topcoder.com/stat?c=problem_statement&pm=10238
Special numbers
1. Suggested reading - Stirling, eurlerian, harmonic, bernoulli, fibonnacci numbers
a. http://en.wikipedia.org/wiki/Stirling_number
b. http://en.wikipedia.org/wiki/Eulerian_numbers
c. http://en.wikipedia.org/wiki/Harmonic_series_(mathematics)
d. http://en.wikipedia.org/wiki/Bernoulli_number
e. http://en.wikipedia.org/wiki/Fibonnaci_numbers
f. Concrete mathematics by Knuth
2. Suggested problems
a. http://www.topcoder.com/stat?c=problem_statement&pm=1643
b. http://www.topcoder.com/stat?c=problem_statement&pm=8202&rd=11125
c. http://www.topcoder.com/stat?c=problem_statement&pm=8725
d. http://www.topcoder.com/stat?c=problem_statement&pm=2292&rd=10709
Hackenbush
1. Suggested readings
a. http://en.wikipedia.org/wiki/Hackenbush
b. http://www.ams.org/samplings/feature-column/fcarc-partizan1
2. Suggested problems
a. http://www.cs.caltech.edu/ipsc/problems/g.html
b. http://www.spoj.pl/problems/PT07A/
b.
d. Linear Algebra
Syllabus
Matrix Operations
1. Addition and subtraction of matrices
a. Suggested Reading
i. Cormen 28.1
2. Multiplication ( Strassen's algorithm ), logarithmic exponentiation
a. Suggested reading
i. Cormen 28.2
ii. Linear Algebra by Kenneth Hoffman Section 1.6
b. Problems
i. http://uva.onlinejudge.org/external/111/11149.html
3. Matrix transformations [ Transpose, Rotation of Matrix, Representing Linear transformations using matrix ]
a. Suggested Reading
i. Linear Algebra By Kenneth Hoffman Section 3.1,3.2,3.4,3.7
b. Problems
i. http://www.topcoder.com/stat?c=problem_statement&pm=6877
ii. JPIX on Spoj
4. Determinant , Rank and Inverse of Matrix [ Gaussean Elimination , Gauss Jordan Elimination]
a. Suggested Reading
i. 28.4 Cormen
ii. Linear Algebra by Kenneth Chapter 1
b. Problems
i. http://www.topcoder.com/stat?c=problem_statement&pm=8174
ii. http://www.topcoder.com/stat?c=problem_statement&pm=6407&rd=9986
iii.http://www.topcoder.com/stat?c=problem_statement&pm=8587
iv. HIGH on Spoj
5. Solving system of linear equations
a. Suggested Reading
i. 28.3 Cormen
ii. Linear Algebra by Kenneth Chapter 1
b. Problems i. http://www.topcoder.com/stat?c=problem_statement&pm=3942&rd=6520
6. Using matrix exponentiation to solve recurrences
a. Suggested Reading
i. http://www.topcoder.com/tc?module=Static&d1=features&d2=010408
b. Problems
i. REC, RABBIT1 , PLHOP on spoj
ii. http://www.topcoder.com/stat?c=problem_statement&pm=6386 , http://www.topcoder.com/stat?
c=problem_statement&pm=7262, http://www.topcoder.com/stat?c=problem_statement&pm=6877
7. Eigen values and Eigen vectors
a. Problems
i. http://www.topcoder.com/stat?c=problem_statement&pm=2423&rd=4780
Polynomials
1. Roots of a polynomial [ Prime factorization of a polynomial, Integer roots of a polynomial, All real roots of a
polynomial ]
a. Problems
i. http://www.topcoder.com/stat?c=problem_statement&pm=8273&rd=10798
ii. POLYEQ , ROOTCIPH on Spoj
2. Lagrange Interpolation
a. Problems
i. http://www.topcoder.com/stat?c=problem_statement&pm=10239
ii. http://www.topcoder.com/stat?c=problem_statement&pm=8725
e. Permutation cycles
Suggested Reading
1. Art of Computer Programming by Knuth Vol. 3
Problems
1. ShuffleMethod, Permutation and WordGame on topcoder.
f. Group Theory
Suggested Reading
1. Herbert Wilf's generating functionology
2. Robert Sedgewick and Flajoulet's Combinatorial analysis
10. Data Structures.
i. Basic
a. Arrays/Stacks/Queues :
Problems
1. https://www.spoj.pl/problems/STPAR/
2. https://www.spoj.pl/problems/SHOP/
3. https://www.spoj.pl/problems/WATER/
Reading:
1. CLRS: section 10.1
2. http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=dataStructures
b. Singly/Doubly Linked List :
Problems
1. https://www.spoj.pl/problems/POSTERS/
Problems
1. https://www.spoj.pl/problems/HASHIT/
2. https://www.spoj.pl/problems/CUCKOO/
Problems
1. https://www.spoj.pl/problems/CTRICK/
e. Binary/nary Trees
Reading
1. CLRS: section 10.4
2. CLRS: Chapter 12
3. Mark Allen Weies Chapter 4
4. http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=binarySearchRedBlack
f. Heaps
Problems
1. https://www.spoj.pl/problems/PRO/
2. https://www.spoj.pl/problems/EXPEDI/
Problems
1. https://www.spoj.pl/problems/MORSE/
2. https://www.spoj.pl/problems/EMOTICON/
Reading
b. Interval trees / Segment Trees
Problems
1. https://www.spoj.pl/problems/ORDERS/
2. https://www.spoj.pl/problems/FREQUENT/
Reading
c. Fenwick(Binary Indexed) trees
Problems
1. https://www.spoj.pl/problems/MATSUM/
Reading: http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees
d. Disjoint data structures
Problems
1. https://www.spoj.pl/problems/BLINNET/
2. https://www.spoj.pl/problems/CHAIN/
Reading:
1.
http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=disjointDataStructure
2. Mark Allen Weies Chapter 8
e. Range minimum Query(RMQ)
Problems
1. https://www.spoj.pl/problems/GSS1/
Reading http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=lowestCommonAncestor
f. Customized interval/segment trees (Augmented DS)
Problems
1. https://www.spoj.pl/problems/GSS3/
2. https://www.spoj.pl/problems/RRSCHED/
Problems
1. https://www.spoj.pl/problems/ORDERS/
Reading
problems ->
1. N queens problems
2. Knights Tour
3. Sudoku Problem
4. Tiling Problem.
5. 15 puzzle.
b. Dancing Links and Algorithm X given by Knuth - [Advanced]
problems 1. http://www.spoj.pl/problems/KPPOLY/
2. http://www.codechef.com/DEC09/problems/K1/
3. http://www.topcoder.com/stat?c=problem_statement&pm=4705&rd=7993
4. http://www.topcoder.com/stat?c=problem_statement&pm=7741&rd=10671
5. http://www.topcoder.com/stat?c=problem_statement&pm=6464&rd=9994
6. http://www.topcoder.com/stat?c=problem_statement&pm=3501&rd=6529
7. http://www.topcoder.com/stat?c=problem_statement&pm=4567&rd=6539
e. Meet in the middle [Intermediate].
problems 1. http://www.spoj.pl/problems/MAXISET/
2. http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2868
f. Hill Climbing [Advanced].
g. Regular Iteration to reach a fixed point [Advanced].