
278 Design and Analysis of Algorithms
Flat profile: Improved find_r(), 90 nodes, 10 stages:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
50.00 0.06 0.06 89 674.16 674.16 find_r
50.00 0.12 0.06 1 60000.00 60000.00 read_data
0.00 0.12 0.00 1 0.00 60000.00 fgraph
0.00 0.12 0.00 1 0.00 120000.00 main
Because we found that it was not necessary to store the edges[], we could have removed them and also
the portion of read_in() which loads their values.
11.3 EXAMPLE—TRAVELING SALESMAN (TS)
We have seen previously the TS problem, which we tried to solve by exhaustive ...