vs140580

495 Reputation

8 Badges

4 years, 124 days

MaplePrimes Activity


These are questions asked by vs140580

I am trying to give an input to an R program from an output the edge set of maple code 

Now how to Build a function which takes a list of edge sets as inputs and returns a list on the below format

Show I want for one edge set of the list

Now I have edge set of a Graph G say {{1,2},{2,3},{3,4},{4,5}}

Now want to pick the first values of each index make one set 

from<-c(1,2,3,4)

Similiarly first values of each index make one more set 

to<-c(2,3,4,5)

Then I want to form a list [from<-c(1,2,3,4),to<-c(2,3,4,5),ft <- cbind(from, to),Graph1<-ftM2graphNEL(ft)]

Now it will take second graph in the Edge list say {{1, 2}, {1, 7}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}}

It will append to the previous list like

[from<-c(1,2,3,4),to<-c(2,3,4,5),ft <- cbind(from, to),Graph1<-ftM2graphNEL(ft),from<-c(1,1,2,3,4,5,6),to<-c(2,7,3,4,5,6,7),ft <- cbind(from, to),Graph2<-ftM2graphNEL(ft)]

This time Graph1 is changed to Graph2 to be observed.

Like that it will need  increase graph number based on the number of edge sets in the list of edges.

To be done all edge sets in list

As then I can copy the entire contents in the list and paste in R so that i can run 

As I can have 100 or more graphs done in maple doing for each of them manually typing may be difficult.

Kind help please

Your help will be surely Acknowledged 

Kind help

A toy code i simply tried for graph attached

But I have errors some come with double quotes can something be done if possible please guide

Kind help

As with 100 of lines it will easy to copy paste 

If the contents of the list can be written to txt file it would be helful 

please help

toy_try.mw

I have tried something to my knoewledge please help

Give a list of Graphs say G now how to write a function to MakeUnique the list that is improve Isomophic graphs duplicate only.

And to get a list which tells which tell which graphs where Isomophic to which one's for my by the index position of the graph in the list G of graphs.

Writing For loops , checking each are which are Isomorphic and finding them is ok.

Looking for a simple code.

The Dominating set defination and Minimal dominating set definations given below

Code to generate the above.

A Function  F such that given the Graph G and vertex v as input the function should return me the number  of minimal dominating sets in the graph G contating the vertex v.

The logic to code seems to be above me Kind help some one please.

As manually doing is not that easy kind help.

I will surely acknowlege,

Kind help

I have list of lists I looking to Shuffle the entire List of lists in a very very non-sequencial manner everthing thing fully shuffled.

I tried but I am unable to find the right way.

Attached a code I tried

Code like below

toy_shuffle.mw

Inside a big running for loop 

If a particular condition is satisfied I want loop to pause until i again press the enter key again 

As if the condition is satisfied I want to note down the output results printed on screen when that condition is satisfied.

previously C I used to use like getch() for it to wait

Kind help please.

I dont want  breakpoint it will simply call the debugger so only.

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