Introduction to Algorithms, Third Edition



Download 4,84 Mb.
Pdf ko'rish
bet388/618
Sana07.04.2022
Hajmi4,84 Mb.
#534272
1   ...   384   385   386   387   388   389   390   391   ...   618
Bog'liq
Introduction-to-algorithms-3rd-edition

22.1-3
The
transpose
of a directed graph
G
D
.V; E/
is the graph
G
T
D
.V; E
T
/
, where
E
T
D f
.; u/
2
V
V
W
.u; /
2
E
g
. Thus,
G
T
is
G
with all its edges reversed.
Describe efficient algorithms for computing
G
T
from
G
, for both the adjacency-
list and adjacency-matrix representations of
G
. Analyze the running times of your
algorithms.


22.1
Representations of graphs
593
22.1-4
Given an adjacency-list representation of a multigraph
G
D
.V; E/
, describe an
O.V
C
E/
-time algorithm to compute the adjacency-list representation of the
“equivalent” undirected graph
G
0
D
.V; E
0
/
, where
E
0
consists of the edges in
E
with all multiple edges between two vertices replaced by a single edge and with all
self-loops removed.
22.1-5
The
square
of a directed graph
G
D
.V; E/
is the graph
G
2
D
.V; E
2
/
such that
.u; /
2
E
2
if and only
G
contains a path with at most two edges between
u
and
.
Describe efficient algorithms for computing
G
2
from
G
for both the adjacency-
list and adjacency-matrix representations of
G
. Analyze the running times of your
algorithms.
22.1-6
Most graph algorithms that take an adjacency-matrix representation as input re-
quire time
.V
2
/
, but there are some exceptions. Show how to determine whether
a directed graph
G
contains a
universal sink
—a vertex with in-degree
j
V

1
and
out-degree
0
—in time
O.V /
, given an adjacency matrix for
G
.

Download 4,84 Mb.

Do'stlaringiz bilan baham:
1   ...   384   385   386   387   388   389   390   391   ...   618




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish