It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Say, you have a Newton Method algorithms with 2 parameters of interest(a,b).
And I would like to plot their domain of convergence with x-axis = a, y-axis = b. Is there a really fast and simple to do this??? Any suggestions?
My algorithm will basically converge for some values of a & b. If I input (a,b), it will return (the number of iterations , value of a that it converge to, value of b that it converge to). Right now, I am thinking of setting up a for loop within another for loop, which run through all possible values of b first holding a fixed, and all possible values that a will converge holding b fixed.
However, my trouble is: how to identify whether a & b is converging or not. And is there a better way than using nested for loops????
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
By following this thread
I have created a radar chart. Can anyone suggest me how to add a legend to this graph?
Here's a generic legend to get you started. You can alter it to suit your particular needs:
legend(-2,0,
legend=c("V1","V2"),
pch=c(15,16),
col=c("blue","red"),
lty=c(1,2))
The first two arguments are the location of the legend, in terms of the plot's (x,y) coordinates. Check the help for more details on the various arguments to the legend function.
I think you're getting negative votes because you essentially asked others to do your work for you. In the future, try out a few things first to see if you can get at least a partial answer. Then, in your question, explain what you've tried and what, specifically, you're trying to accomplish.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
We have been asked to do 5 or 6 iterations of particle swarm optimisation by hand for homework, but i don't really understand how and we were given no examples.
Would it be possible for someone to do the first run through for me so I can see how it works?
Explanations as each step would be fantastic.
Consider an illustrative example of a particle swarm optimisation system composed of three particles and Vmax = 10. To facilitate calculation, we will ignore the fact that r1 and r2 are random numbers and fix them to 0.5 for this exercise. The space of solutions is the two dimensional real valued space R2 and the current state of the swarm is as follows:
Position of particles: x1 = (5,5); x2 = (8,3); x3 = (6,7);
Individual best positions: x∗1 = (5,5); x∗2 = (7,3); x∗3 = (5,6);
Social best position: x∗ = (5,5);
Velocities: v1 = (2,2); v2 = (3,3); v3 = (4,4).
"I don't really understand how and we were given no examples". Let me add a little bit of critique to this sentence. If you're not given any examples it probably means you should be looking for examples for yourself. Have you even put "particle swarm optimization" into Google and look at some of the results? Do you expect everything in your study to be given to you?
There are many resources that explain the working of particle swarm optimization such as wikipedia, Google Scholar, Scholarpedia, or a dedicated website to PSO. The original paper is from Kennedy and Eberhart 1995 and is the top result in the scholar search. Also there are frameworks where PSO is implemented and where you can look at how it works like HeuristicLab. It's an opportunity to explore this topic.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Tiles = {
{0,0,0,0,0,0,0,0,0,0},
{0,2,2,2,2,2,2,2,2,0},
{0,3,0,0,2,4,2,2,2,0},
{0,0,2,0,0,0,2,2,2,0},
{0,0,2,2,2,0,2,2,2,0},
{0,0,0,0,2,0,2,2,2,0},
{0,0,2,2,2,0,2,2,2,0},
{0,0,0,0,0,0,0,0,0,0}
}
0 is not clickable, other is clickable, otherways 0 is walkable an other is not, weh i click Tiles[3][2] (number 3) then Tiles[3][6] (number 4), i want to connect that 2 tile through walkable tile, the problem is i dont need a shortest solution, instead i need solution that have 2 or less corner (turning), i have spent 3 days to imagine and googling the algorithm, but no luck, can someone give me a clue or article about that, and i use lua but other language is still i appreciate.
Transform your grid into a graph using the following rules:
Every walkable tile in the grid corresponds to a node in the graph.
Two nodes are connected (with weight 1) in the graph if they are in the same row or column in the grid and every tile between them in the grid is walkable.
The shortest path in the graph corresponds to the path with fewest corners in the grid.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
i assume that we have 2 labeled graphs G and T and the algorithm determine if G a subgraph of T and the corresponding vertices in the main graphT and the subgraph G should have same label
That problem is called "subgraph isomorphism" and it is NP-complete (and so likely to be hard). Do you need a general solution for this, or just for a particular graph G? The second case is much easier. There is some general information about algorithms here. There is a version of one of the algorithms (actually, for a more general problem) in the Boost Graph Library (see documentation here).
A general answer for a general question: the problem you want to solve is known as 'subgraph isomorphism.' Have a look here for further references: http://en.wikipedia.org/wiki/Subgraph_isomorphism_problem .