Items tagged with graph

Feed

Hello,

I am trying to write a procedure to see, which (di)-graphs are isomorphic (here represented by there 3*3 adjecency-matrices). When I try the procedure for all 3*3-matrices with entries in {0,1} (there are 512 of them), I get the following error:
"Error, (in GraphTheory:-IsIsomorphic) invalid subscript selector"

Can you possibly say, what I am doing wrong? My code is the following:

getIso3 := proc(liste)
  local i,k,M1,c,d:
  c := 0:
  M1 := [[liste[1]]]:
  for i from 2 to numelems(liste) do
    for k from 1 to numelems(M1) do
        if IsIsomorphic(Digraph([a,b,c], liste[i]),Digraph([a,b,c],M1[k][1])) then
          M1[k] := [op(M1[k]), liste[i]]:
          c := 1:
        end if:
    end do:
    if c=0 then
      M1 := [op(M1), [liste[i]]]:
    else
      c := 0:
    end if:   end do: 
  return(M1):
end proc:

 

My input is a list (JJ) of 512 3*3 matrices constructed the following way :

all9Perm := proc(list)
  local P,i,m,n,A:
  P := list:
  for i from 0 to 9 do
    m:= i:  n:= 9-i:
    A := combinat:-permute([1$n, 0$m]):
    P := [op(P), op(1..numelems(A),A)]:
  od:
  return(P):
end proc:
K := []:
L := all9Perm(K):
listoflistsToListofmatrices := proc(liste)
  local M,i:
  M := []:
  for i from 1 to numelems(liste) do
      M := [op(M), Matrix([
          [ liste[i][1] , liste[i][2] , liste[i][3] ],
          [ liste[i][4] , liste[i][5] , liste[i][6] ],
          [ liste[i][7] , liste[i][8] , liste[i][9] ]])
          ]:
  end do:
  return(M):
end proc:
JJ := listoflistsToListofmatrices(L):

 

When I run this procedure on some of the 512 matrices it does work, but it crashes somewhere around matrix 350. I have try so split the list of the 512 matrices, and I am able to run the procedure on these splits, but this is very inconvenient :-)

I hope you can help me. Also if this can be done in an easier way - I am new to programming and recieve help with a smile.

Yours, Tomas.

I have to calculate a sort of trend line, but I don't know how it works with maple.
I tried with Excel.

Do you think the method is right? How can I replicate it on maple?

Thanks in advance

Dear sir

 

In my ode problem i do not know that how to set range (eta) from -2 to 2 please can  you help me.

how can i generate graph families(all possible set )with given number of vertices?(just vertices ,not given edge set)

for instance : how can i write a procedure about with 4-vertices all graphs ,5-vertices,..and so on

please hellp me

I am a beginner with Maplesoft.

I have a data file with several devices IDs and links between these devices (more than 5000 links). For representing a network in Maple, I am aware that the GraphTheory package should be used. The vertices and edges are to be defined and the graph to be displayed.

The examples that I have looked at do not have such a large number of links. With more than 5000 links in the data file, I am not sure how to proceed further.

Any help or pointers would be highly appreciated.

Hello,

 

I got two problems creating a 3d-plot. First, as the title mentions, I want to cut out a distinct interval from my 3d-Plot.

For example when the graph is displayd from -y_max to y_max but I just want it to be shown from -y_max to -5 and from 5 to y_max again.

I also got a second question:

Another thing I want to do with this graph is redefining this axis with a parameter which is directly dependant from it.

Like for example I want to redefine the "y" axis with a" k" axis with k=y*2, so that in the end I have th

Hello I'm having trouble create Konigsberg Graph on Maple. Here's the picture. Sorry if it's not clear enough. Thanks!

 

https://www.google.co.id/url?sa=i&source=images&cd=&ved=&url=https%3A%2F%2Fmvngu.wordpress.com%2F2011%2F03%2F26%2Fsimple-graphs-bridges-of-konigsberg-and-directed-graphs%2F&psig=AFQjCNFP-tdRTqi-VapOJZ-TLPdA1ndSgQ&ust=1456326114883065&rct=j

Does any one know if you can extract the linear graph from a Maple Sim model?  And by linear graph I mean the alternative to a a bond graph, not a type of plot.

Hello,

My code records the values I need, however, I need to implement a modulo of 2*Pi on my result for theta. But this leads to a graph with no plots and I'm not sure how to fix it. Any help is greatly aprreciated! Thank you in advance!

Kind regards,

Gam

with(plots):

a := 1.501*10^9:

Th := sqrt(4*Pi^2*a^3/(G*(Mh+Msat))):

HyperionOrbit := proc (`θIC`, `ωIC`, n) local a, Mh, Msat, G, e, beta, M, Eqns, ICs, soln; option remember; global `ωH`, Th; a := 1.501*10^9; Mh := 5.5855*10^18; Msat := 5.6832*10^26; G := 6.67259/10^11; e := .232; beta := .89; M := Mh+Msat; Eqns := diff(theta(t), t) = omega(t), diff(omega(t), t) = -G*Msat*beta^2*(xH(t)*sin(theta(t))-yH(t)*cos(theta(t)))*(xH(t)*cos(theta(t))+yH(t)*sin(theta(t)))/(xH(t)^2+yH(t)^2)^2.5, diff(xH(t), t) = vxH(t), diff(vxH(t), t) = -G*M*xH(t)/(xH(t)^2+yH(t)^2)^(3/2), diff(yH(t), t) = vyH(t), diff(vyH(t), t) = -G*M*yH(t)/(xH(t)^2+yH(t)^2)^(3/2); ICs := xH(0) = a*(1+e), yH(0) = 0, vxH(0) = 0, vyH(0) = sqrt(G*M*(1-e)/(a*(1+e))), theta(0) = `θIC`, omega(0) = `ωIC`; soln := dsolve({Eqns, ICs}, numeric, maxfun = 0, output = array([seq(i, i = 0 .. n*Th, Th)])); plots:-odeplot(soln, [modp(theta(t), 2*Pi), omega(t)/`ωH`], 0 .. n*Th, labels = ["θ(t)","ω(t)/ωH"], axes = boxed, style = plottools:-point, size = [.25, .75]) end proc:

plots:-display(HyperionOrbit(.5, 1.8*`ωH`, 10));

Download Poincare_section_Boyd_plot_fixing_theta.mw

bia Man

Hello maple experts,

please is there any other way of solving this problem Wht.mw

Some complained that the graphs do not satisfy the boundary conditions smoothly.

Thanks.

VIM.3.mwHi,How do I make a graph and error table for exact and by using this method i.e VIM 

Hi, Everyone.

I'm trying to figure out how to make a graph (actually a "line") change color based on certain criteria so I can create a Maple Application.

I've figured out the following, which indicates the sign of the graph by the color, but it's way more complicated than it ought to be.

It's also not robust as I need it to be, this happens to depend on the zeros occuring at integer values.  I could deal with that on a case by case basis, but not for something automatically.

I'm at a loss; maybe I'm not Googling the right things... maybe Maple can't do this (although I'd heard color tools were being added in Maple 16).

Does anyone have any suggestions?

Thanks In Advance!

Joseph

In the following worksheet, I can evaluate S(32), but not S(31). As a result, I can't use any value that depends on S(31) (or any i<31), for example, the graph is incomplete. How can I get Maple to evaluate S(31)?

restart

sigma := 167:

t := proc (i) options operator, arrow; exp(-(1/2)*i^2/sigma^2) end proc:

S := proc (l) options operator, arrow; 1+2*(sum(t(i), i = l .. infinity)) end proc:

evalf(S(32))

356.9784188

(1)

evalf(S(31))

1.+2.*(sum(exp(-(1/55778)*i^2), i = 31 .. infinity))

(2)

Expected result of evalf(S(31)):

evalf(S(32)+2*t(31))

358.9442559

(3)

plot(S(y), y = 20 .. 50)

 

``


All told, S(i) fails for i in [0..31], i = 115,116, and 221. S(i) succeeds for all other i < 3500.

Download test.mw

 


> restart;
> with*plots;
> Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2 = 0; 

> N := 1;

> blt := 10;
> Eq2 := (diff(theta(eta), eta, eta))/Pr+f(eta)*(diff(theta(eta), eta)) = 0; 
> bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(blt) = 0;
> bcs2 := (D(theta))(0) = -N*(1+theta(0)), theta(blt) = 0;
> L := [2.5, 3, 5, 7, 10];
> for k to 5 do R := dsolve(eval({Eq1, Eq2, bcs1, bcs2}, Pr = L[k]), [f(eta), theta(eta)], numeric, output = listprocedure); X1 || k := rhs(R[3]); X2 || k := rhs(R[4]); Y1 || k := rhs(R[5]); Y2 || k := -rhs(R[6]) end do;

 

 how I will draw the graph for Pr against theta   for Pr=2.5 until 7  taking rest of the parameter fix

 

Dear  i want to plot the graphs for different values of R[2,5,6.5]   here is the codes: Either ido loop or array i have to use or other procedure 

The graph display should be at R=2, one graph, R=5 another and R=6.5 

onemore graph

 

restart:
with(DEtools):
eta:=1+k*x+epsilon*sin(2*Pi*x):
A1(x):=-exp(-alpha*x)*J^2*R/(2*eta^3+6*xi*J^2*eta^2):

psi0:=A1(x)*y^3:
psi:=delta*psi0:
V:=-diff(psi,x):
delta:=0.1:
epsilon:=0.01:
alpha:=1:
xi:=0.001:
k:=0.1:
As:= [0, 2, 4]:
x:=0.2
plot([seq]([eval(V, J= A), y, y= 0..eval(eta, J= A)], A= As),title=" velocity at R=2.0 ",labels= ["v", "y"],color= [green, red, blue], linestyle= [solid, dash, dot],legend= [seq](J = A, A= As), axes=boxed);

 

 

 

 

 

 

1 2 3 4 5 6 7 Last Page 1 of 46