GENERIC TYPES AND THE
JAVA COLLECTIONS
FRAMEWORK
Lecture 15
CS2110 Spring 2013
Generic Types in Java
2
When using a collection (e.g.,
LinkedList, HashSet,
HashMap), we generally have a single
type T o
PROVING THINGS ABOUT
CONCURRENT PROGRAMS
Lecture 24 CS2110 Spring 2013
Overview
2
Two weeks ago we looked at techniques for proving
things about recursive algorithms
We
saw that in general, recursion
KarlMarx
TheGermanIdeology
Part I: Feuerbach.
Opposition of the Materialist and
Idealist Outlook
B. The Illusion of the Epoch
CivilSocietyandtheConceptionofHistory
The form of intercourse determined b
KarlMarx.TheGermanIdeology.1845
Part I: Feuerbach.
Opposition of the Materialist and
Idealist Outlook
A. Idealism and Materialism
TheIllusionsofGermanIdeology
As we hear from German ideologists, Germa
KarlMarx
TheGermanIdeology
Part I: Feuerbach.
Opposition of the Materialist and
Idealist Outlook
D. Proletarians and
Communism
Individuals,Class,andCommunity
In the Middle Ages the citizens in each to
KarlMarx
TheGermanIdeology
Part I: Feuerbach.
Opposition of the Materialist and
Idealist Outlook
C. The Real Basis of Ideology
DivisionofLabour:TownandCountry
[.][1]Fromthefirsttherefollowsthepremiseo
THE PROBLEM OF SOCIAL ORDER:
EGOISM OR AUTONOMY?
Arnout van de Rijt and Michael W. Macy
ABSTRACT
Individual rationality sometimes leads to collectively irrational outcomes,
a fundamental problem in th
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 1 A
z
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 1B
Pro
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 1 A So
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 2 A
Pr
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 1B Sol
Mathematical Writing by Donald E. Knuth, Tracy Larrabee, and Paul M. Roberts This report is based on a course of the same name given at Stanford University during autumn quarter, 1987. Here's the cata
Discrete Structures
CS2800 Fall 2013
Stirling Numbers
October 23, 2013
The text mentions Stirling numbers briey but does not go into them in any depth. However, they are
fascinating numbers with a lot
CS/ENGRD 2110
FALL 2013
Lecture 1: Overview and intro to types
http:/courses.cs.cornell.edu/cs2110/2013fa
Welcome to CS2110!
2
Learning about:
OO, abstract data types, generics, Java Collections,
R
STANDARD ADTS
Lecture 17
CS2110 Spring 2013
Abstract Data Types (ADTs)
2
A method for achieving
abstraction for data
structures and algorithms
ADT = model + operations
Describes what each
operation do
1
PRIORITY QUEUES AND
HEAPS
Lecture 18
CS2110 Spring 2013
The Bag Interface
2
A Bag:
interface Bag<E> cfw_
void insert(E obj);
E extract(); /extract some element
boolean isEmpty();
Examples: Stack, Q
GRAPHS
Lecture 19
CS2110 Spring 2013
Announcements
2
Prelim 2: Two and a half weeks from now
Tuesday,
April16, 7:30-9pm, Statler
Exam conflicts?
We
need to hear about them and can arrange a makeup
I
JQL : The Java Query Language
Slides created by Darren Willis, David J Pearce,
James Noble; used with their permission
Object Querying
JQL is a simple extension for Java.
JQL adds support for Object Q
SORTING AND ASYMPTOTIC
COMPLEXITY
Lecture 14
CS2110 Spring 2013
InsertionSort
2
/sort a[], an array of int
Worst-case: O(n2)
for (int i = 1; i < a.length; i+) cfw_
(reverse-sorted input)
/ Push a[i]
QUANTUM COMPUTING
(AND OTHER SHORTCUTS FOR
SOLVING HARD PROBLEMS)
Lecture 28 CS2110 Spring 2013
The world isnt as simple as it seems!
2
Starting as early as the Greek philosophers, people
have wondere
THREADS AND
CONCURRENCY
Lecture 22 CS2110 Spring 2013
Graphs summary
2
Dijkstra: given a vertex v, finds shortest path from v
to x for each vertex x in the graph
Key
1.
2.
3.
idea: maintain a 5-part
Lecture 13
DFA State Minimization
By now you have probably come across several situations in which you have
observed that some automaton could be simplied either by deleting states
inaccessible from t
Lecture 9
Regular Expressions and Finite Automata
Simplication of Expressions
For small regular expressions, one can often see how to construct an equivalent automaton directly without going through t
A Course in Discrete Structures
Rafael Pass
Wei-Lung Dustin Tseng
Preface
Discrete mathematics deals with objects that come in discrete bundles, e.g.,
1 or 2 babies. In contrast, continuous mathematic
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 2 A So
MIT OpenCourseWare http:/ocw.mit.edu
18.02 Multivariable Calculus
Fall 2007
For information about citing these materials or our Terms of Use, visit: http:/ocw.mit.edu/terms.
18.02 Practice Exam 2 B
Pr
Common Derivatives and Integrals
Derivatives
Basic Properties/Formulas/Rules d ( cf ( x ) ) = cf ( x ) , c is any constant. ( f ( x ) g ( x ) ) = f ( x ) g ( x ) dx dn d ( c ) = 0 , c is any constant.
Calculus Cheat Sheet
Limits
Definitions
Precise Definition : We say lim f ( x ) = L if
Limit at Infinity : We say lim f ( x ) = L if we
x a
x
for every e > 0 there is a d > 0 such that
whenever 0 < x
Trig Cheat Sheet
Definition of the Trig Functions
Right triangle definition
For this definition we assume that
p
0 < q < or 0 < q < 90 .
2
Unit circle definition
For this definition q is any angle.
y