Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
1Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Textbook

Textbook

Ratings: (0)|Views: 45 |Likes:
Published by deflume1

More info:

Published by: deflume1 on Oct 23, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/24/2011

pdf

text

original

 
 Algorithms
Copyrightc
2006 S. Dasgupta, C. H. Papadimitriou, and U. V. VaziraniJuly 18, 2006
 
2
Algorithms
 
Contents
Preface 90 Prologue 11
0.1 Books and algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110.2 Enter Fibonacci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120.3 Big-
O
notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1 Algorithms with numbers 21
1.1 Basic arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.2 Modular arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251.3 Primality testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331.4 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391.5 Universal hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Randomized algorithms: a virtual chapter 392 Divide-and-conquer algorithms 55
2.1 Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552.2 Recurrence relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582.3 Mergesort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602.4 Medians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642.5 Matrix multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662.6 The fast Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3 Decompositions of graphs 91
3.1 Why graphs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 913.2 Depth-rst search in undirected graphs . . . . . . . . . . . . . . . . . . . . . . . . 933.3 Depth-rst search in directed graphs . . . . . . . . . . . . . . . . . . . . . . . . . . 983.4 Strongly connected components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->