R: largest.cliques bug when graph is directed

Bug #1073800 reported by Gábor Csárdi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
igraph
Fix Released
High
Gábor Csárdi

Bug Description

Christos Hatzis <christos.hatzis@***> reported this:

There is a problem with the largest clique computation in the recent version
of igraph.

library(igraph)
adj <- matrix(1, nrow=11, ncol=11) - diag(11)
g <- graph.adjacency(adj)
largest.cliques(g)
# [[1]]
# [1] 10 8 1
#
# [[2]]
# [1] 9 7 1
#
# [[3]]
# [1] 8 7 1
#
# Warning message:
# In largest.cliques(g) :
# At cliques.c:958 :directionality of edges is ignored for directed graphs

>> sessionInfo()
> R version 2.15.2 (2012-10-26)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
> States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] igraph_0.6-3
>
> ----------------------------------------------------------
>
> An older version of igraph gave the correct answer
>
>> library(igraph)
>> adj <- matrix(1, nrow=11, ncol=11) - diag(11)
>> g <- graph.adjacency(adj)
>> largest.cliques(g)
> [[1]]
> [1] 0 1 2 3 4 5 6 7 8 9 10
>
> Warning message:
> In largest.cliques(g) :
> At cliques.c:801 :directionality of edges is ignored for directed graphs
>
>> sessionInfo()
> R version 2.12.2 (2011-02-25)
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
> States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] igraph_0.5.5-3

Related branches

Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Fixed in revisions #2992 (0.6-main) and #3036 (0.7-main).

Changed in igraph:
status: Confirmed → Fix Committed
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote :

Although it might be worth checking the other clique finding functions as well.....

Changed in igraph:
status: Fix Committed → Fix Released
Revision history for this message
Gábor Csárdi (gabor.csardi) wrote : Continue on github

The development of igraph has moved to github, so please do not comment on this bug here. You are of course welcome to comment on github, here:
https://github.com/igraph/igraph/issues/122

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.