What is Java?
Java
Originally for intelligent consumer-electronic
devices
Then used for creating Web pages with
dynamic content
Now also used to:
Develop large-scale enterprise applications
Enha
Fragmentation Attack on Wireless Network
Amar B. Patel, Mohammed F. Mokbel and Shushan Zhao
School of Computer Science, University of Windsor, Canada
cfw_mokbel, patel11v, [email protected]
Abstrac
Greedy Algorithms
Divide and Conquer
Binary Search
Problems
Greedy, Divide and Conquer
League of Programmers
ACA, IIT Kanpur
October 5, 2013
League of Programmers
Greedy, Divide and Conquer
Greedy Alg
Graph Theory - I
Todays Plan
Introduction
Special Graphs
Various Representations
Depth First Search
Solve a problem from GCJ
Breadth First Search
Solve a problem from SPOJ
Dijkstras Algorithm
Its Good to Be Greedy
(well.sometimes)
When can we be greedy ?
- Greedy algorithms are generally used in optimization
problems
- There is an optimal substructure to the problem
- We do at each step wh
Aim and Clarications
Common Problems
Parsing a problem
Standard Template Library
Using Bitwise
Problems
Introductory Lecture
Topics: basics, resources, stl, bitwise tricks
League of Programmers
ACA, I
Segment Trees
Longest Non Decreasing Subsequence
(Revisited)
1
2
5
2
8
6
3
6
9
7
4
4
5
6
6
Length of LNDS ending at ith Loc
1
2
3
3
4
This runs in O(n2). Can we do better?
Challenge: Given a value of
Graphs
League of Programmers
ACA, IIT Kanpur
League of Programmers
Graphs
Outline
League of Programmers
Graphs
Basics
What are Graphs?
League of Programmers
Graphs
Basics
What are Graphs?
An abstract
Maths
Probability
Problems
Maths
League of Programmers
ACA, IIT Kanpur
October 22, 2012
League of Programmers
Maths
Outline
1
Maths
2
Probability
3
Problems
Maths
Probability
Problems
League of Progra
Game theory
Impartial Games
Two-person games with perfect information
No chance moves
A win-or-lose outcome
Impartial games
Set of moves available from any given position is
the same for both players
Essential Tools
Segment Trees
Segment trees for Rooted Trees
Problems
Segment Trees
League of Programmers
ACA, IIT Kanpur
League of Programmers
Segment Trees
Outline
Essential Tools
Segment Trees
Segm
Dynamic Programming
Problems
Dynamic Programming
League of Programmers
ACA, IIT Kanpur
October 22, 2012
League of Programmers
Dynamic Programming
Outline
Dynamic Programming
Problems
1
Dynamic Program
Dynamic Programming
Maximum Sum Sub-Array
Given an array
31
-41
59
26
-53
58
97
-93
-23
84
Each sub-array has a sum. What is the maximum such sum possible.
Maximum Sum for any sub Array ending at ith
Maths for Programming Contests
Basics
Number Represenation in varius bases
Basic operations
Divisibility
Reading long long long numbers
Basic math functions like factorial
http:/www.spoj.pl/problems/F
Dynamic Programming - II
Integer Knapsack Problem
http:/en.wikipedia.org/wiki/Knapsack_problem
Subset Sum Problem
Given a set of n numbers ai sum up to M, and any K
M, whether there is a subset of
clarifications
Introduction to Programming contests
Standard Template Library
Bitwise Magic
Introductory Lecture
Topics: basics,resources,stl,bitwise tricks,gdb
League of Programmers
IIT Kanpur
Septem
Some basic GUI
components.
Component
Description
JLabel
Displays uneditable text or icons.
JTextField
Enables user to enter data from the keyboard. Can also be used to
display editable or uneditable
2794
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS,
VOL. 25,
NO. 11,
NOVEMBER 2014
Chameleon Hashing for Secure and
Privacy-Preserving Vehicular
Communications
Song Guo, Senior Member, IEEE, D