Search Results

Search found 7220 results on 289 pages for 'graph algorithm'.

Page 3/289 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Graph coloring Algorithm

    - by Amitd
    From wiki In its simplest form, it is a way of coloring the vertices of a graph such that no two adjacent vertices share the same color; this is called a vertex coloring. Similarly, an edge coloring assigns a color to each edge so that no two adjacent edges share the same color, and a face coloring of a planar graph assigns a color to each face or region so that no two faces that share a boundary have the same color. Given 'n' colors and m vertices, how easily can a graph coloring algorithm be implemented? Lan

    Read the article

  • Reasonable Number of Directed Graph Nodes and Edges

    - by opensourcechris
    How many directed graph nodes are typically represented in the browser? I'm working with some large data-sets with nodes and edges more then 400,000. I'm wondering if I am going down a fruitless path trying to represent them in the browser via arbor.js or similar JS libraries. What's the most effective way to allow a large number of users to visualize and browse a large directed graph of up to 500,000 records?

    Read the article

  • Matchmaking algorithm with a set of filters

    - by Yuriy Pogrebnyak
    I'm looking for matchmaking algorithm for 1x1 online game. Players must be matched not by their skill or level, as usual, but by some specific filters. Each player sends request, where he specifies some set of parameters (generally, 2-4 parameters). If some parameter is specified, player can be matched only with those who has sent this parameter with exactly the same value, or those who hasn't specified this parameter. I need this algorithm to be thread-safe and preferably fast. It would be great if it'll work for 3-4 or even more parameters, but also I'm looking for algorithm that works with only one parameter (in my case it's game bet). Also I'd appreciate ideas on how to implement or improve this algorithm on my server platform - ASP.NET. One more problem I'm facing is that finding match can't be executed right after user sends request, because if other user sends request before matching for previous is finished, they won't be matched even is they possibly could. So it seems that match finding should be started on schedule, and I need help on how to optimize it and how to choose time interval for starting new match finding. P.S. I've also posted this question on stackoverflow

    Read the article

  • Optimized graph drawing for the web

    - by Andreas Petersson
    Having seen some suggestions for graphs, I wonder what's the optimum for my problem. I want to render a directed graph to a servlet/picture that is displayed in the browser. There should be some kind of optimization of position. No dependency to Swing would be preferred. Algorithms are not important, since the structure of the graph is determined by business logic. It would be desired to be able add labels to edges as well. it would be optimal if i can serve this as png/svg. Which library/service would you recommend? clarifications: 1) The question is all about Graphs - like Directed Acyclic Graph - NOT - Charts. 2) flot, Google Charts - cannot plot graphs, only charts, or have i missed something? 3) no i do not need interactivity 4) graphviz would be nice, but the grappa java library is quite outdated and is built upon swing/awt. while it may be theoretically possible to render swing to images, it would not be my favorite way to to so in a server-app. 5) it would be fine to use an online service where the images are not hosted locally. edit: added links to Wikipedia to clarify graph/chart term

    Read the article

  • Find all cycles in graph, redux

    - by Shadow
    Hi, I know there are a quite some answers existing on this question. However, I found none of them really bringing it to the point. Some argue that a cycle is (almost) the same as a strongly connected components (s. http://stackoverflow.com/questions/546655/finding-all-cycles-in-graph/549402#549402) , so one could use algorithms designed for that goal. Some argue that finding a cycle can be done via DFS and checking for back-edges (s. boost graph documentation on file dependencies). I now would like to have some suggestions on whether all cycles in a graph can be detected via DFS and checking for back-edges? My opinion is that it indeed could work that way as DFS-VISIT (s. pseudocode of DFS) freshly enters each node that was not yet visited. In that sense, each vertex exhibits a potential start of a cycle. Additionally, as DFS visits each edge once, each edge leading to the starting point of a cycle is also covered. Thus, by using DFS and back-edge checking it should indeed be possible to detect all cycles in a graph. Note that, if cycles with different numbers of participant nodes exist (e.g. triangles, rectangles etc.), additional work has to be done to discriminate the acutal "shape" of each cycle.

    Read the article

  • Searching, Sorting and Graph Algorithms questions

    - by user177883
    Is there a resource that i can find different variations of searching, sorting and graph algorithm questions ? I have studied CLRS and Algorithm Design by Kleinberg. and solved some set of questions. I have also, checked SO for algorithms questions. Curious, if there is a resource you would highly recommend. EDIT: There is also this free ebook with many questions, that i was able to solve some of them.

    Read the article

  • Control diamond square algorithm to generate islands/pangea.

    - by Gabriel A. Zorrilla
    I generated a height map with the diamond square algorithm. The thing is i do not manage to create islands, this is, restrict the height other than water level range to a certain value in the center of the map. I manualy seeded a circle in the middle of the map but the rest of the map still receives heights over the water level. I dont fully understand the Perlin noise algorithm so i'd like to work with my current implementation of the diamond square algorithm which took me 3 days to interpret and code in PHP. :P

    Read the article

  • Designing a social network with CQRS, graph databases and relational databases in mind

    - by Siraj Mansour
    I have done quite an amount of research on the topic so far, but i couldn't come up with a conclusion to make up my mind. I am designing a social network and during my research i stumbled upon graph databases, i found neo4j pretty interesting for user relations and traversing through nodes. I also thought of using a relational database such as MS-SQL or MySQL to store entity data only and depending on neo4j for connections between entities. Of course this means more work in my application to store and pull data in and out of 2 different sources. My first question : Is using this approach (graph + relational) a good approach for designing my social network keeping in mind that users on social networks don't have to in synch with real data by split second ? What are the positives and negatives of this approach ? My Second question : I've been doing some reading on CQRS and as i understood it is mostly useful for collaborative environments, and environments where users see a lot of "stale" data. social networks has shared comments, events, etc .. and many users query or update the same data. Could CQRS be a helpful approach ? Would it give any performance/scalability benefits or non-useful complexity ? Is it fairly applicable with my possible choice of (graph + relational) databases approach mentioned in the question above ? My purpose is to know if the approaches i have mentioned above seem good enough for the business context.

    Read the article

  • word disambiguation algorithm (Lesk algorithm)

    - by anyssnordin
    Hii.. Can anybody help me to find an algorithm in Java code to find synonyms of a search word based on the context and I want to implement the algorithm with WordNet database. For example, "I am running a Java program". From the context, I want to find the synonyms for the word "running", but the synonyms must be suitable according to a context.

    Read the article

  • Finding the shortest path through a digraph that visits all nodes

    - by Boluc Papuccuoglu
    I am trying to find the shortest possible path that visits every node through a graph (a node may be visited more than once, the solution may pick any node as the starting node.). The graph is directed, meaning that being able to travel from node A to node B does not mean one can travel from node B to node A. All distances between nodes are equal. I was able to code a brute force search that found a path of only 27 nodes when I had 27 nodes and each node had a connection to 2 or 1 other node. However, the actual problem that I am trying to solve consists of 256 nodes, with each node connecting to either 4 or 3 other nodes. The brute force algorithm that solved the 27 node graph can produce a 415 node solution (not optimal) within a few seconds, but using the processing power I have at my disposal takes about 6 hours to arrive at a 402 node solution. What approach should I use to arrive at a solution that I can be certain is the optimal one? For example, use an optimizer algorithm to shorten a non-optimal solution? Or somehow adopt a brute force search that discards paths that are not optimal? EDIT: (Copying a comment to an answer here to better clarify the question) To clarify, I am not saying that there is a Hamiltonian path and I need to find it, I am trying to find the shortest path in the 256 node graph that visits each node AT LEAST once. With the 27 node run, I was able to find a Hamiltonian path, which assured me that it was an optimal solution. I want to find a solution for the 256 node graph which is the shortest.

    Read the article

  • Matlab multiple graph types inside one graph

    - by mirekys
    Hi, I have a task to draw electrostatic field between two electrodes( at given sizes and shape ), what i have now is that i draw the electrodes with area plot (area(elect_x,elect_y)) the graph looks like this: ------------------.--- |.. .---. |.. |...| |.. .----....| |.. |........| |.. ---------------------- and now i would need to draw inside this probably a mesh, showing the field. Is there any way to do it, or i´m on a wrong way? Thank you very much for every guide

    Read the article

  • computing "node closure" of graph with removal

    - by Fakrudeen
    Given a directed graph, the goal is to combine the node with the nodes it is pointing to and come up with minimum number of these [lets give the name] super nodes. The catch is once you combine the nodes you can't use those nodes again. [first node as well as all the combined nodes - that is all the members of one super node] The greedy approach would be to pick the node with maximum out degree and combine that node with nodes it is pointing to and remove all of them. Do this every time with the nodes which are not removed yet from graph. The greedy is O(V), but this won't necessarily output minimum number super nodes. So what is the best algorithm to do this?

    Read the article

  • Find a node in a Graph that minimizes the distance between two other nodes

    - by Andrés
    Here is the thing. I have a directed weighted graph G, with V vertices and E edges. Given two nodes in the graph, let's say A, and B, and given the weight of an edge A-B denoted as w(A, B), I need to find a node C so that max(w(A, C), w(B, C)) is minimal among all possibilities. By possibilities I mean all the values C can take. I don't know if it is completely clear, if it's not, I'll try to be more precise. Thanks in advance.

    Read the article

  • Structure of Astar (A*) graph search data in C#

    - by Shawn Mclean
    How do you structure you graphs/nodes in a graph search class? I'm basically creating a NavMesh and need to generate the nodes from 1 polygon to the other. The edge that joins both polygons will be the node. I'll then run A* on these Nodes to calculate the shortest path. I just need to know how to structure my classes and their properties? I know for sure I wont need to create a fully blown undirected graph with nodes and edges.

    Read the article

  • Data structure for bubble shooter game

    - by SundayMonday
    I'm starting to make a bubble shooter game for a mobile OS. Assume this is just the basic "three or more same-color bubbles that touch pop" and all bubbles that are separated from their group fall/pop. What data structures are common for storing the bubbles? I've considered using an undirected, connected graph where each node is a bubble. This seems like it could help answer the question "which bubbles (if any) should fall now?" after some arbitrary bubbles are popped and corresponding nodes are removed from the graph. I think the answer is all bubbles that were just disconnected from the graph should fall. However the graph approach might be overkill so I'm not sure. Another consideration for the data structure is collision detection. Perhaps being able to grab a list of neighboring bubbles in constant time for a particular "bubble slot" is useful. So the collision detection would be something like "moving bubble is closest to slot ij, neighbors of slot ij are bubbles a,b,c, moving bubble is sufficiently close to bubble b hence moving bubble should come to rest in slot ij". A game like this could be probably be made with a relatively crude grid structure as the primary data structure. However it seems like answering "which bubbles (if any) should fall now?" would be trickier with this data structure.

    Read the article

  • Find all complete sub-graphs within a graph

    - by mvid
    Is there a known algorithm or method to find all complete sub-graphs within a graph? I have an undirected, unweighted graph and I need to find all subgraphs within it where each node in the subgraph is connected to each other node in the subgraph. Is there an existing algorithm for this?

    Read the article

  • Algorithm for perfect non-binary graph layout

    - by mariki
    I have a complex non-binary graph model. Each tree node can have multiple children&parents (a node can also have a connection to it's "brother"). A node is represented as square on screen with lines to the connected nodes. For that I want to use Draw2D and GEF libraries. The problem I am facing is the graph layout. I need a nice algorithm that can reposition the square nodes and the connections with minimum intersections and also make it symmetric as possible.

    Read the article

  • Find the shortest path in a graph which visits certain nodes.

    - by dmd
    I have a undirected graph with about 100 nodes and about 200 edges. One node is labelled 'start', one is 'end', and there's about a dozen labelled 'mustpass'. I need to find the shortest path through this graph that starts at 'start', ends at 'end', and passes through all of the 'mustpass' nodes (in any order). ( http://3e.org/local/maize-graph.png / http://3e.org/local/maize-graph.dot.txt is the graph in question - it represents a corn maze in Lancaster, PA)

    Read the article

  • Getting Facebook Posts Permalink from Facebook Graph API Search

    - by Alexia
    I want to use the Facebook Graph API to search the public status updates concerning a keyword. For example, this works great: http://graph.facebook.com/search?q=obama&type=post It shows me all the posts with the word "obama" in it. If the post is a picture, it actually returns a field called "link" which is the permalink to the picture on the actual Facebook website, in the user's profile. Which is exactly what I want, but for pictures. But if the post in question is just a status update, i.e. just text, all it returns is the 3 fields: message, created_time, and updated_time. How do I view this actual status update on www.facebook.com? I realize I can view it on graph.facebook.com in JSON format, but I want to actually be able to show the permalink to the status update, or post. The final result I would like to retrieve might look something like this: http://www.facebook.com/[user id]/posts/[post id] With the [user id] and [post id] fields swapped out with the actual IDs, obviously. TIA!

    Read the article

  • how to elegantly duplicate a graph (neural network)

    - by macias
    I have a graph (network) which consists of layers, which contains nodes (neurons). I would like to write a procedure to duplicate entire graph in most elegant way possible -- i.e. with minimal or no overhead added to the structure of the node or layer. Or yet in other words -- the procedure could be complex, but the complexity should not "leak" to structures. They should be no complex just because they are copyable. I wrote the code in C#, so far it looks like this: neuron has additional field -- copy_of which is pointer the the neuron which base copied from, this is my additional overhead neuron has parameterless method Clone() neuron has method Reconnect() -- which exchanges connection from "source" neuron (parameter) to "target" neuron (parameter) layer has parameterless method Clone() -- it simply call Clone() for all neurons network has parameterless method Clone() -- it calls Clone() for every layer and then it iterates over all neurons and creates mappings neuron=copy_of and then calls Reconnect to exchange all the "wiring" I hope my approach is clear. The question is -- is there more elegant method, I particularly don't like keeping extra pointer in neuron class just in case of being copied! I would like to gather the data in one point (network's Clone) and then dispose it completely (Clone method cannot have an argument though).

    Read the article

  • Measuring how "heavily linked" a node is in a graph

    - by Eduardo León
    I have posted this question at MathOverflow.com as well. I am no mathematician and English is not my first language, so please excuse me if my question is too stupid, it is poorly phrased, or both. I am developing a program that creates timetables. My timetable-creating algorithm, besides creating the timetable, also creates a graph whose nodes represent each class I have already programmed, and whose arcs represent which pairs of classes should not be programmed at the same time, even if they have to be reprogrammed. The more "heavily linked" a node is, the more inflexible its associated class is with respect to being reprogrammed. Sometimes, in the middle of the process, there will be no option but to reprogram a class that has already been programmed. I want my program to be able to choose a class that, if reprogrammed, affects the least possible number of other already-programmed classes. That would mean choosing a node in the graph that is "not very heavily linked", subject to some constraints with respect to which nodes can be chosen. EDIT: The question was... Do you know any algorithm that measures how "heavily linked" a node is?

    Read the article

  • Graph search problem with route restrictions

    - by Darcara
    I want to calculate the most profitable route and I think this is a type of traveling salesman problem. I have a set of nodes that I can visit and a function to calculate cost for traveling between nodes and points for reaching the nodes. The goal is to reach a fixed known score while minimizing the cost. This cost and rewards are not fixed and depend on the nodes visited before. The starting node is fixed. There are some restrictions on how nodes can be visited. Some simplified examples include: Node B can only be visited after A After node C has been visited, D or E can be visited. Visiting at least one is required, visiting both is permissible. Z can only be visited after at least 5 other nodes have been visited Once 50 nodes have been visited, the nodes A-M will no longer reward points Certain nodes can (and probably must) be visited multiple times Currently I can think of only two ways to solve this: a) Genetic Algorithms, with the fitness function calculating the cost/benefit of the generated route b) Dijkstra search through the graph, since the starting node is fixed, although the large number of nodes will probably make that not feasible memory wise. Are there any other ways to determine the best route through the graph? It doesn't need to be perfect, an approximated path is perfectly fine, as long as it's error acceptable. Would TSP-solvers be an option here?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >