Graph display

Given the graph, how could I imagine it with an adjacent matrix ?. I have read many lessons, posts, slides, etc., but I can not get around this, I just need a little push.

alt text

+3
source share
3 answers

node , A0, A1, A2,... F5, F6, F7. 48 (8 6 ), 48x48. , false, , , . A0 A1 , A0 A1 ( ).

+4

:

   A0 A1 A2 A3 A4 A5 A6 A7
A0 0  1  0  0  0  0  0  0
A1 1  0  0  0  0  0  0  0
A2 0  0  0  1  0  0  0  0
A3 0  0  1  0  0  0  0  0
A4 0  0  0  0  0  1  0  0
A5 0  0  0  0  1  0  0  0
A6 0  0  0  0  0  0  0  0
A7 0  0  0  0  0  0  0  0

, , , - .

EDIT:

wikipedia .

:

: +)

+5

2 boolean Hor Ver .

Hor Matrix: : 6x9
[X,YZ] [X,Y] [X,Z] .
-1 : [A,01] - true, [F,-10]. [B,23] false.

   -10 01 12 23 34 45 56 67 7-1
A
B
C
D
E
F

Ver Matrix: : 7x8
[XY,Z] [X,Z] [Y,Z] .
Capital o .
: [DE,0] - true, [BC,7]. [CD,0] false.

    0 1 2 3 4 5 6 7

OA
AB
BC
CD
DE
EF
FO
+1
source

Source: https://habr.com/ru/post/1741018/


All Articles