Home Page Icon
Home Page
Table of Contents for
Algorithms For Dummies, 2nd Edition
Close
Algorithms For Dummies, 2nd Edition
by John Paul Mueller, Luca Massaron
Algorithms For Dummies, 2nd Edition
Cover
Title Page
Copyright
Introduction
Part 1: Getting Started with Algorithms
Part 2: Understanding the Need to Sort and Search
Part 3: Exploring the World of Graphs
Part 4: Wrangling Big Data
Part 5: Challenging Difficult Problems
Part 6: The Part of Tens
Index
About the Authors
Advertisement Page
Connect with Dummies
End User License Agreement
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Title Page
Next
Next Chapter
Introduction
Algorithms For Dummies®
To view this book's Cheat Sheet, simply go to
www.dummies.com
and search for “Algorithms For Dummies Cheat Sheet” in the Search box.
Table of Contents
Cover
Title Page
Copyright
Introduction
About This Book
Foolish Assumptions
Icons Used in This Book
Beyond the Book
Where to Go from Here
Part 1: Getting Started with Algorithms
Chapter 1: Introducing Algorithms
Describing Algorithms
Using Computers to Solve Problems
Distinguishing between Issues and Solutions
Structuring Data to Obtain a Solution
Chapter 2: Considering Algorithm Design
Starting to Solve a Problem
Dividing and Conquering
Learning that Greed Can Be Good
Computing Costs and Following Heuristics
Evaluating Algorithms
Chapter 3: Working with Google Colab
Defining Google Colab
Working with Notebooks
Performing Common Tasks
Using Hardware Acceleration
Executing the Code
Getting Help
Chapter 4: Performing Essential Data Manipulations Using Python
Performing Calculations Using Vectors and Matrixes
Creating Combinations the Right Way
Getting the Desired Results Using Recursion
Performing Tasks More Quickly
Chapter 5: Developing a Matrix Computation Class
Avoiding the Use of NumPy
Understanding Why Using a Class is Important
Building the Basic Class
Manipulating the Matrix
Part 2: Understanding the Need to Sort and Search
Chapter 6: Structuring Data
Determining the Need for Structure
Stacking and Piling Data in Order
Working with Trees
Representing Relations in a Graph
Chapter 7: Arranging and Searching Data
Sorting Data Using Merge Sort and Quick Sort
Using Search Trees and the Heap
Relying on Hashing
Part 3: Exploring the World of Graphs
Chapter 8: Understanding Graph Basics
Explaining the Importance of Networks
Defining How to Draw a Graph
Measuring Graph Functionality
Putting a Graph in Numeric Format
Chapter 9: Reconnecting the Dots
Traversing a Graph Efficiently
Sorting the Graph Elements
Reducing to a Minimum Spanning Tree
Finding the Shortest Route
Chapter 10: Discovering Graph Secrets
Envisioning Social Networks as Graphs
Navigating a Graph
Chapter 11: Getting the Right Web page
Finding the World in a Search Engine
Explaining the PageRank Algorithm
Implementing PageRank
Going Beyond the PageRank Paradigm
Part 4: Wrangling Big Data
Chapter 12: Managing Big Data
Transforming Power into Data
Streaming Flows of Data
Sketching an Answer from Stream Data
Chapter 13: Parallelizing Operations
Managing Immense Amounts of Data
Working Out Algorithms for MapReduce
Chapter 14: Compressing and Concealing Data
Making Data Smaller
Hiding Your Secrets with Cryptography
Part 5: Challenging Difficult Problems
Chapter 15: Working with Greedy Algorithms
Deciding When It Is Better to Be Greedy
Finding Out How Greedy Can Be Useful
Chapter 16: Relying on Dynamic Programming
Explaining Dynamic Programming
Discovering the Best Dynamic Recipes
Chapter 17: Using Randomized Algorithms
Defining How Randomization Works
Putting Randomness into your Logic
Chapter 18: Performing Local Search
Understanding Local Search
Presenting local search tricks
Solving Satisfiability of Boolean Circuits
Chapter 19: Employing Linear Programming
Using Linear Functions as a Tool
Using Linear Programming in Practice
Chapter 20: Considering Heuristics
Differentiating Heuristics
Routing Robots Using Heuristics
Explaining Path Finding Algorithms
Part 6: The Part of Tens
Chapter 21: Ten Algorithms That Are Changing the World
Using Sort Routines
Looking for Things with Search Routines
Shaking Things Up with Random Numbers
Performing Data Compression
Keeping Data Secret
Changing the Data Domain
Analyzing Links
Spotting Data Patterns
Dealing with Automation and Automatic Responses
Creating Unique Identifiers
Chapter 22: Ten Algorithmic Problems Yet to Solve
Solving Problems Quickly
Solving 3SUM Problems More Efficiently
Making Matrix Multiplication Faster
Determining Whether an Application Will End
Creating and Using One-Way Functions
Multiplying Really Large Numbers
Dividing a Resource Equally
Reducing Edit Distance Calculation Time
Playing the Parity Game
Understanding Spatial Issues
Index
About the Authors
Advertisement Page
Connect with Dummies
End User License Agreement
List of Illustrations
Chapter 2
FIGURE 2-1: Complexity of an algorithm in case of best, average, and worst inpu...
Chapter 3
FIGURE 3-1: Using Colab commands makes configuring your Notebook easy.
FIGURE 3-2: The Settings dialog box helps you configure the Colab IDE.
FIGURE 3-3: Customize shortcut keys for speed of access to commands.
FIGURE 3-4: Colab lets you compare two files to see how they differ.
FIGURE 3-5: Create a new Python 3 Notebook.
FIGURE 3-6: Use this dialog box to open existing notebooks.
FIGURE 3-7: When using GitHub, you must provide the location of the source code...
FIGURE 3-8: Using GitHub means storing your data in a repository.
FIGURE 3-9: Colab code cells contain a few extras not found in Notebook.
FIGURE 3-10: Use the GUI to make formatting your text easier.
Chapter 4
FIGURE 4-1: In the recursion process, a function continuously calls itself unti...
Chapter 6
FIGURE 6-1: A tree in Python looks much like the physical alternative.
FIGURE 6-2: Graph nodes can connect to each other in myriad ways.
Chapter 7
FIGURE 7-1: The arrangement of keys when using a BST.
FIGURE 7-2: The arrangement of keys when using a binary heap.
Chapter 8
FIGURE 8-1: Presenting a simple undirected graph.
FIGURE 8-2: Creating the directed version of the same graph.
FIGURE 8-3: A mixed graph shows a mix of directed and undirected subgraphs.
FIGURE 8-4: Using a weighted graph to make things more realistic.
FIGURE 8-5: Seeing what a graph contains makes it easier to understand.
FIGURE 8-6: Plotting the graph can help you see degree centrality with greater ...
Chapter 9
FIGURE 9-1: Representing the example graph by NetworkX.
FIGURE 9-2: The example graph becomes weighted.
FIGURE 9-3: The example graph becomes weighted and directed.
FIGURE 9-4: Negative edges are added to the example graph.
FIGURE 9-5: A negative cycle in a graph can create problems for some algorithms...
Chapter 10
FIGURE 10-1: A graph showing the network clusters of relationships among friend...
FIGURE 10-2: Communities often contain cliques that can prove useful for SNA.
FIGURE 10-3: A sample graph used for navigation purposes.
Chapter 11
FIGURE 11-1: A strongly connected network.
FIGURE 11-2: A network with a dead end in node 2.
FIGURE 11-3: A network with a spider trap in nodes 4, 5, and 6.
Chapter 12
FIGURE 12-1: Stuffing more and more transistors into a CPU.
FIGURE 12-2: How sampling from a bucket works.
FIGURE 12-3: An example of windowing a stream of DNA data.
FIGURE 12-4: Adding a single element to a bit vector.
FIGURE 12-5: Adding a second element can cause collisions.
FIGURE 12-6: Locating an element and determining that it exists means searching...
FIGURE 12-7: Testing membership of a website using a Bloom filter.
FIGURE 12-8: Counting only leading zeros.
FIGURE 12-9: How values are updated in a Count-Min Sketch.
Chapter 13
FIGURE 13-1: Associative and commutative properties allow parallelism.
FIGURE 13-2: A schema representing a computing cluster.
FIGURE 13-3: Mapping a list of numbers by a square function.
FIGURE 13-4: Reducing a list of numbers to its sum.
FIGURE 13-5: An overview of the complete MapReduce computation.
Chapter 14
FIGURE 14-1: A Huffman tree and its symbolic table of conversion.
Chapter 15
FIGURE 15-1: The sets of P, NP, NP-complete and NP-hard problems.
FIGURE 15-2: From a balanced tree (left) to an unbalanced tree (right).
Chapter 16
FIGURE 16-1: Cities represented as nodes in a weighted graph.
FIGURE 16-2: Transforming Saturday into Sunday.
FIGURE 16-3: Highlighting what transformations are applied.
Chapter 17
FIGURE 17-1: A histogram of a normal distribution.
FIGURE 17-2: A histogram of a uniform distribution.
FIGURE 17-3: Displaying the results of a Monte Carlo simulation.
FIGURE 17-4: Displaying the results of a Monte Carlo simulation on quick select...
FIGURE 17-5: Displaying Monte Carlo simulations as input grows.
Chapter 18
FIGURE 18-1: Switching ending trips in a TSP problem may bring better results.
FIGURE 18-2: Local search explores the landscape by hill climbing.
FIGURE 18-3: An 8-queen puzzle solved.
FIGURE 18-4: Symbols and truth tables of logic operators
AND
,
OR
, and
NOT
.
FIGURE 18-5: The number of unsatisfiable clauses decreases after random adjustm...
FIGURE 18-6: Execution is speedier because the starting point is better.
Chapter 19
FIGURE 19-1: Looking where the objective function is going to touch the feasibl...
FIGURE 19-2: Wondering which vertex is the right one.
Chapter 20
FIGURE 20-1: A and B are points on a map’s coordinates.
FIGURE 20-2: A maze representing a topological map with obstacles.
FIGURE 20-3: An intricate maze to be solved by heuristics.
Guide
Cover
Title Page
Copyright
Table of Contents
Begin Reading
Index
About the Authors
Pages
i
ii
1
2
3
4
5
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
431
432
433
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset