ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Aug 2017 07:01:29 +0200solve memory problem in my programhttps://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/in this program I have memory error
#The program is:
sage: G=SL(3,GF(3))
sage: G.order()
sage: element=G
sage: Z=G.center()
sage: A=matrix(G.order())
sage: for i in range( G.order()):
for j in range(G.order()):
if element[i]*element[j]<>element[j]*element[i]:
A[i,j]=1
sage: graph=Graph(A);graph
#graph memory error
pleace, we can help me for my resarch.Thu, 17 Aug 2017 04:25:35 +0200https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/Comment by dan_fulea for <p>in this program I have memory error </p>
<h1>The program is:</h1>
<p>sage: G=SL(3,GF(3))
sage: G.order()
sage: element=G
sage: Z=G.center()
sage: A=matrix(G.order())</p>
<p>sage: for i in range( G.order()):
for j in range(G.order()):
if element[i]<em>element[j]<>element[j]</em>element[i]:
A[i,j]=1
sage: graph=Graph(A);graph</p>
<h1>graph memory error</h1>
<p>pleace, we can help me for my resarch.</p>
https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38569#post-id-38569Something like
sage: G = SL( 3, GF(2) )
sage: A = matrix( G.order(), [ ZZ( bool( g*h == h*g ) ) for g in G for h in G ] )
sage: X = Graph( A )
sage: X
Looped graph on 168 vertices
sage: X
works without problems. The $168\times 168$ matrix could be initiated, there are no questions from my side.
But in the second i have to initialize a $5616\times 5616$ matrix there is a fair question why we do such a thing (as a first step of many others). Having it after some hours or days, (after we buy a new bigger computer,) does not mean we can compute now everything / anything with it. It is still a big graph and the same number of processors have to work in and with it.
Which is the research intention?
Often, it is simpler to answer the mathematical question.Fri, 18 Aug 2017 23:08:40 +0200https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38569#post-id-38569Comment by Duaa for <p>in this program I have memory error </p>
<h1>The program is:</h1>
<p>sage: G=SL(3,GF(3))
sage: G.order()
sage: element=G
sage: Z=G.center()
sage: A=matrix(G.order())</p>
<p>sage: for i in range( G.order()):
for j in range(G.order()):
if element[i]<em>element[j]<>element[j]</em>element[i]:
A[i,j]=1
sage: graph=Graph(A);graph</p>
<h1>graph memory error</h1>
<p>pleace, we can help me for my resarch.</p>
https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38598#post-id-38598Thank you .
but I need to fined some properties of the non_commuting graph of the group SL(3,q) like independent number, vertex chromatic number and so on. So I am interesting of this graph.Sun, 20 Aug 2017 18:49:27 +0200https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38598#post-id-38598Comment by dan_fulea for <p>in this program I have memory error </p>
<h1>The program is:</h1>
<p>sage: G=SL(3,GF(3))
sage: G.order()
sage: element=G
sage: Z=G.center()
sage: A=matrix(G.order())</p>
<p>sage: for i in range( G.order()):
for j in range(G.order()):
if element[i]<em>element[j]<>element[j]</em>element[i]:
A[i,j]=1
sage: graph=Graph(A);graph</p>
<h1>graph memory error</h1>
<p>pleace, we can help me for my resarch.</p>
https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38663#post-id-38663OK, let's get the independent number, thus illustrating that we do not have to "go through the impossible" (building the graph) to solve the problem, but use the **group structure** and have a quick, structural solution. (Just try the graph way for `SL(3,GF(2))` - no memory problem.)
For a group $G$ a maximal independent set for the non-commutativity graph is a maximal commuting subset. If $A$ is commuting in $G$, then the group generated by $A$ is "equal or better". So we want a commutative subgroup of $G$ having maximal order. Just type:
G = SL(3,GF(3))
G1 = G.as_matrix_group()
G2 = G1.as_permutation_group()
G2.subgroups?
G2.conjugacy_classes_subgroups?
So:
sage: max( [ H.order() for H in G2.conjugacy_classes_subgroups() if H.is_commutative() ] )
13Sat, 26 Aug 2017 07:01:29 +0200https://ask.sagemath.org/question/38550/solve-memory-problem-in-my-program/?comment=38663#post-id-38663