Skip to Content
Parallel Computing for Data Science
book

Parallel Computing for Data Science

by Norman Matloff
November 2015
Intermediate to advanced
328 pages
10h 12m
English
CRC Press
Content preview from Parallel Computing for Data Science
266 CHAPTER 12. MATRIX OPERATIONS
But this says that
R
(2)
27
= b(a
21
a
17
+ a
22
a
27
+ a
23
a
37
+ ...) (12.20)
The key point is that the argument to b() here is (A
2
)
27
, demonstrating
(12.19).
So, the original graph connectivity problem reduces to a matrix power
problem. We simply compute A
n1
(and then apply b()).
12.6.2 The “Log Trick”
Moreover, we can save computation there as well, by using the “log trick.”
Say we want the 16
th
power of some matrix B. We can square it, yielding
B
2
, then square that, yielding B
4
. Two more squarings then give us B
8
and B
16
. That would be only four matrix-multiply operations, instead of
15. In general, for power 2
m
, we need m steps. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Hands-On Machine Learning with scikit-learn and Scientific Python Toolkits

Hands-On Machine Learning with scikit-learn and Scientific Python Toolkits

Tarek Amr
Distributed Computing with Python

Distributed Computing with Python

Francesco Pierfederici

Publisher Resources

ISBN: 9781466587014