phd students class nine. use a table? algorithmaverageworst case bubble sortn2n2 n2n2...

33
PhD students Class nine

Upload: lewis-hill

Post on 11-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

PhD students

Class nine

Page 2: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Our last class

Anything I have not covered?

Questions about English?

Page 3: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

After course

Send me your papers Full edit needs form & prof's signature

Ask questions, ask for help or advice No form needed

Page 4: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

FOLDOC Free Online Dictionary of Computing http://foldoc.org/

Slashdot Computer news site http://slashdot.org

Things you should use

Page 5: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

You can use

Stuff on FTP site: ftp.cs.sjtu.edu.cn, port 990 Directory: sandy/Course I will probably add to this

Contact me: Office 3-518 Email [email protected]

Page 6: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Next week – Test!

Format: Several short pieces of writing

Some choice – n of m topics With n >= 3, m <= 10 Not sure exactly yet

Page 7: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Test design intent

Hard to fail

Hard to get a high mark

Hard to prepare for – unknown topics

Technical topics, but not advanced

Page 8: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Just you & the test

No notes

No computer

Do not use cell phone

Do not copy

Test is designed to be hard to fail

Caught cheating = Guaranteed failure!

Page 9: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Good paper for review

The Most Common Habits from more than 200 English Papers written by Graduate Chinese Engineering Students

Felicia Brittman

One FTP site:

sandy/Course/About English/

Mistakes in English Writing.pdf

Page 10: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Your most obvious errors

Articles!

A native speaker six-year-old gets them all right

A French or German speaker gets most right

For Chinese & Japanese & others, they are hard

Reference for review: http://www.rpi.edu/dept/llc/writecenter/web/esl.html

Page 11: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Two categories of noun

Countable – must be singular or plural

One rabbit, several rabbits, 23 women, …

If singular, it must have a determiner

A cat, the cat, my cat, that cat, no cat, …

Uncountable – truth, justice, love, … bread, ...

Page 12: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Key article rule

Every singular noun must have a determiner Any of: An article: a/an/the Possessive: my, his, her, our, their, your Possessive: Fred's, his father's, the CPU's, … Demonstrative: this, that Quantitative: one, any, no, some

Page 13: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

One article rule

Every singular noun must have a determiner Any of: An article: a/an/the Possessive: my, his, her, our, their, your Possessive: Fred's, his father's, the CPU's, … Demonstrative: this, that Quantitative: one, any, no, some

Page 14: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Often “a” or “an” for 1st use

We propose an algorithm for … a new algorithm for … a more efficient algorithm for …

We give a solution for … We suggest a new method for ...

Page 15: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

We propose a new algorithm for …

This algorithm … The algorithm … It … … executes in O(n) time.

This algorithm … Our algorithm … … is more efficient than ...

Page 16: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Sometimes +-”the” in different use

We use Hamming distance to measure … Hamming distance is defined as … Hamming weight is defined as ... The Hamming distance between a and b is the

number of bits where they are different or, equivalently, the Hamming weight of their XOR.

The Hamming weight of a word is the number of bits which are one.

Page 17: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Interesting programming problem

Write a fast routine to find Hamming weight

“The NSA instruction” – codebreakers use it

MIT have a good one – no loops, no tables In X Window system source ones()

Page 18: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Nice reference for bit hacking

http://graphics.stanford.edu/~seander/bithacks.html

Includes seven Hamming weight solutions Best is 12 instructions for 32-bit word

Page 19: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Watch the verb “be”

Ta hen mei She is beautiful

The quicksort algorithm is efficient Sequential search is slow Multi-core CPUs are powerful

Page 20: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Fix this:

RSA public key encryption algorithm very inefficient. RSA public key encryption algorithm require large-integer exponentiation.

Page 21: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Fixed version:

The RSA public key encryption algorithm is very inefficient. RSA public key encryption algorithm It requires large-integer exponentiation.

Page 22: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Papers get accepted if ...

Either they are interesting

Or they are important

Ideally both, but either one will do

Page 23: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

K.I.S.S.

Keep it simple, stupid

Use graphs Use lists

Use tables

Page 24: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Use a list?

Maximum spread measures …

Ms = ….

N is the number of objective dimensions; max_d and min_d are the maximum and the minimum dimension for the discovered Pareto front; max_t and min_t are the maximum and the minimum dimension for the true Pareto front. Its range is [0,1] and the larger, the better. 0 means only one solution is obtained and the algorithm has terminated prematurely, whereas 1 means the discovered Pareto front totally covers the true Pareto front.

Page 25: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Make it easy to read

Maximum spread measures …

Ms = ….

Where:N is the number of objective dimensionsmax_d and min_d are the maximum and the minimum

dimension for the discovered Pareto frontmax_t and min_t are the maximum and the minimum dimension for the true Pareto front.

Its range is [0,1] and the larger, the better. 0 means only one solution is obtained and the algorithm has terminated prematurely, whereas 1 means the discovered Pareto front totally covers the true Pareto front.

Page 26: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Your paper needs a thesis

A new method for ...

that is {faster|more general|more flexible|...}

A proof that ...

An experiment that shows ...

Page 27: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Your paper needs a thesis

A new method for ...

that is {faster|more general|more flexible|...}

A proof that ...

An experiment that shows ...

Page 28: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

State the thesis in three places

In the abstract

In the introduction – often near the end

In the conclusion – often near the start

Page 29: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

State the thesis in three places

In the abstract

In the introduction – often near the end

In the conclusion – often near the start

Page 30: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Organise paper around the thesis

Choose background material

– Skip anything not relevant to thesis

Give evidence:

– Test whatever you can

– Prove whatever you can

Consider objections, try to answer them

Page 31: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

From Euclid (circa 300 BC)

Number of primes is infinite = There is no largest prrime

Method: reductio ad absurdum Assume p is largest prime Find a larger one

Page 32: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

Exercise:

Write the abstract for Euclid's paper

Page 33: PhD students Class nine. Use a table? AlgorithmAverageWorst case Bubble sortn2n2 n2n2 Quicksortn*log(n) n2n2

If you solve a classic problem

Prove P = NP or P ~= NP Goldbach conjecture Fermat's Last Theorem (already proved) Reimann hypothesis Polynomial-time factoring

Write your abstract