Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'A problem about mathematica' topicStudent Support Forum > General > "A problem about mathematica"

Next Comment >Help | Reply To Topic
Author Comment/Response
Arcanis
04/20/08 06:38am

Hi, everyone.
I'm now having a class on data structure. And
i tried to compare
BreadthFirstTravelsal with DepthFirstTravelsal,
so i just using the following command:


Table[{Timing[BreadthFirstTravelsal[RandomInteger[1, {k, k}]];],
Timing[DepthFirstTravelsal[RandomInteger[1, {k, k}]];],
Timing[BreadthFirstTravelsal[RandomInteger[1, {k, k}]];] -
Timing[DepthFirstTravelsal[RandomInteger[1, {k, k}]];]},
{k, 1, 1000, 20}]

Then i got a list containg these elements:
{{1.17961*10^-16, Null}, {1.17961*10^-16, Null}, {-0.016, 0}}
{{1.04083*10^-16, Null}, {0.015, Null}, {0., 0}}
{{0., Null}, {0., Null}, {-0.016, 0}}
{{0., Null}, {0., Null}, {-0.015, 0}}
{{0.015, Null}, {1.31839*10^-16, Null}, {0., 0}}


How can the results like this?

URL: ,

Subject (listing for 'A problem about mathematica')
Author Date Posted
A problem about mathematica Arcanis 04/20/08 06:38am
Re: A problem about mathematica yehuda ben-s... 04/21/08 09:26am
Re: A problem about mathematica Xavier 04/21/08 12:07pm
Next Comment >Help | Reply To Topic