⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 expectedoutputpathcalculation.txt

📁 国外的数据结构与算法分析用书
💻 TXT
字号:


 A to the power 1
0 0 0 1 0 
0 0 1 0 0 
0 1 0 0 0 
0 0 1 0 1 
1 1 0 0 0 


A to the power 2
0 0 1 0 1 
0 1 0 0 0 
0 0 1 0 0 
1 2 0 0 0 
0 0 1 1 0 


A to the power 3
1 2 0 0 0 
0 0 1 0 0 
0 1 0 0 0 
0 0 2 1 0 
0 1 1 0 1 


A to the power 4
0 0 2 1 0 
0 1 0 0 0 
0 0 1 0 0 
0 2 1 0 1 
1 2 1 0 0 


A to the power 5
0 2 1 0 1 
0 0 1 0 0 
0 1 0 0 0 
1 2 2 0 0 
0 1 2 1 0 



The adjacency matrix to the power n is

0 2 1 0 1 
0 0 1 0 0 
0 1 0 0 0 
1 2 2 0 0 
0 1 2 1 0 

The Path matrix for a is

1 1 1 1 1 
0 1 1 0 0 
0 1 1 0 0 
1 1 1 1 1 
1 1 1 1 1 


The shortest paths matrix for c is

0 4 4 0 
0 0 0 1 
2 0 0 2 
2 0 2 0 

4 
first :  second 3 fourth 0 
second :  0 
3 :  first 0 
fourth :  0 

The adjacency matrix is 

0 1 1 1 
0 0 0 0 
1 0 0 0 
0 0 0 0 

8 
1 :  2 5 0 
2 :  3 0 
3 :  4 0 
4 :  0 
5 :  7 0 
6 :  5 1 0 
7 :  6 4 0 
8 :  0 

Result of cycle test on 1 is true

Result of cycle test on 2 is false

Result of cycle test on 3 is false

Result of cycle test on 4 is false

Result of cycle test on 5 is true

Result of cycle test on 6 is true

Result of cycle test on 7 is true

Result of cycle test on 8 is false

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -