Discussion Regarding the run time of new algorithm

154 views
Skip to first unread message

Suraj Modi

unread,
Mar 13, 2020, 9:53:30 AM3/13/20
to sage-gsoc
Thanks, everyone,
After going through [d1][d2][d3] papers and implementation, Previous sage implemented algorithms work still faster than the new algorithm and also the performance. The new algorithm works for directed sparse graphs but its performance is comparable to previous algorithms.
                                                                                                                                 

example.pngI am trying to optimize the algorithm and in my implementation, I have displayed some extra information. Looking for further suggestions and a path to follow to optimize further.Thanks and Regards, Suraj Modi

David Coudert

unread,
Mar 13, 2020, 10:04:29 AM3/13/20
to sage-gsoc
can you try for instance with

sage: G = DiGraph(2)

sage: while not G.is_strongly_connected():

....:     G = digraphs.RandomDirectedGNP(1000, 0.008)

Suraj Modi

unread,
Mar 13, 2020, 10:11:04 AM3/13/20
to sage-gsoc

giveninstance.png

Thanks for reply sir for the given instance 

David Coudert

unread,
Mar 13, 2020, 10:17:36 AM3/13/20
to sage-gsoc
So you are faster in this case. You should run more tests on various sparse graphs.

Suraj Modi

unread,
Mar 13, 2020, 10:21:53 AM3/13/20
to sage-gsoc
Thank you, sir
can you kindly give me some edge-case test cases so that I could test them?

David Coudert

unread,
Mar 13, 2020, 10:33:32 AM3/13/20
to sage-gsoc
you can test digraphs.DeBruijn(..)   digraphs.GeneralizedDeBruijn(..)  digraphs.ImaseItoh(...)    
and also symmetric versions of undirected graphs like DiGraph(graphs.RandomBarabasiAlbert(...))

Suraj Modi

unread,
Mar 14, 2020, 3:10:36 PM3/14/20
to sage-gsoc
Thank you, sir, for suggestions
I have run the example test cases given in the comment section of the graph generators
and here is the output sir can you please guide me what to do next

DeBruijn&GenDeBruijn.png

ImaseItoh.png

David Coudert

unread,
Mar 14, 2020, 3:35:07 PM3/14/20
to sage-gsoc
You have tested only for these values ?

Suraj Modi

unread,
Mar 15, 2020, 2:43:23 AM3/15/20
to sage-gsoc

ImaseItoh_10^6&GenDebruijn_10^6.png

DeBruijn&GenDeBruijn.png

GenDebruijn.png

ImaseItoh.png

debruijn.png

Thank you sir,
I have tested on multiple inputs even on the total of edges of graph of 10^6
Here is the output ,sir please guide me what to do next

David Coudert

unread,
Mar 16, 2020, 4:13:58 AM3/16/20
to sage-gsoc
First, instead of adding multiple screenshots, you could simply gather the results in an array.

It seems that your implementation is faster than previous algorithm. Which are the conditions of your code ? is it working for directed ? weighted ? graphs with multi edges ? loops ? etc.

Suraj Modi

unread,
Mar 26, 2020, 9:59:11 AM3/26/20
to sage-gsoc
On Monday, March 16, 2020 at 1:43:58 PM UTC+5:30, David Coudert wrote:
> First, instead of adding multiple screenshots, you could simply gather the results in an array.
>
>
> It seems that your implementation is faster than previous algorithm. Which are the conditions of your code ? is it working for directed ? weighted ? graphs with multi edges ? loops ? etc.
>
>
>
> Le dimanche 15 mars 2020 07:43:23 UTC+1, Suraj Modi a écrit :
>
>
>
>
>
> Thank you sir,
> I have tested on multiple inputs even on the total of edges of graph of 10^6
> Here is the output ,sir please guide me what to do next
>
>
>
> On Sunday, March 15, 2020 at 1:05:07 AM UTC+5:30, David Coudert wrote:
> You have tested only for these values ?
>
>
> Le samedi 14 mars 2020 20:10:36 UTC+1, Suraj Modi a écrit :
> Thank you, sir, for suggestions
> I have run the example test cases given in the comment section of the graph generators
> and here is the output sir can you please guide me what to do next
>
>
>
>
> On Friday, March 13, 2020 at 8:03:32 PM UTC+5:30, David Coudert wrote:
> you can test digraphs.DeBruijn(..)   digraphs.GeneralizedDeBruijn(..)  digraphs.ImaseItoh(...)    
> and also symmetric versions of undirected graphs like DiGraph(graphs.RandomBarabasiAlbert(...))
>
>
> Le vendredi 13 mars 2020 15:21:53 UTC+1, Suraj Modi a écrit :
> Thank you, sir
> can you kindly give me some edge-case test cases so that I could test them?

Sir I have already uploaded my draft for review,kindly have give some time to provide your valuable feed back , waiting to hear from you soon.

David Coudert

unread,
Mar 26, 2020, 10:13:51 AM3/26/20
to sage-gsoc
which ticket number ?

Suraj Modi

unread,
Mar 26, 2020, 10:39:39 AM3/26/20
to sage...@googlegroups.com
Ticket number 29336

--
You received this message because you are subscribed to the Google Groups "sage-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-gsoc+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-gsoc/71c3c76a-e4e7-4fe7-bdbf-18a179668129%40googlegroups.com.

David Coudert

unread,
Mar 26, 2020, 10:53:46 AM3/26/20
to sage-gsoc
I already answered in https://trac.sagemath.org/ticket/29336

First, your commit 
- contains files from your personal directory that should not be here like `generic_graph (copy).py`, `graph_generators_pyx (copy).pyx`, `sample/lol.tsv`, etc.
- modifies a file that should not be touched like `digraph_generators.py`,
=> Please clean the branch first

Second: You cannot copy/paste the code of another author like that. The right way is to make an experimental package for sagemath with an interface.
Ticket number 29336

To unsubscribe from this group and stop receiving emails from it, send an email to sage...@googlegroups.com.

Suraj Modi

unread,
Mar 30, 2020, 7:08:38 AM3/30/20
to sage...@googlegroups.com
As told I have cleaned the ticket and has made an experimental package and changes have been pushed to git trac and with ticket number #29336
 Sir, I have already uploaded my draft for review, kindly have given some time to provide your valuable feedback, waiting to hear from you soon.

To unsubscribe from this group and stop receiving emails from it, send an email to sage-gsoc+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-gsoc/4eb7bc57-f870-4f4a-bada-540a7bb1d88c%40googlegroups.com.


--
SURAJ KUMAR MODI
B.TECH IN CSE
NIT DURGAPUR
8101384117
Reply all
Reply to author
Forward
0 new messages