Hello guys,i need to write a algorithm which will list all the network configuration with graph connected,which website can I take reference so I can start
Networking problem, Struggle of the algorithm
Networking problem, Struggle of the algorithm
|
Sep 2 2016, 06:17 PM, updated 8y ago
Show posts by this member only | IPv6 | Post
#1
|
Junior Member
604 posts Joined: May 2015 |
Hello guys,i need to write a algorithm which will list all the network configuration with graph connected,which website can I take reference so I can start
|
|
|
|
Sep 2 2016, 07:46 PM
Show posts by this member only | Post
#2
|
Elite
15,425 posts Joined: Mar 2008 |
|
|
Sep 2 2016, 08:21 PM
Show posts by this member only | Post
#3
|
Senior Member
585 posts Joined: Jan 2007 From: Ranau, Sabah |
i dont even understand the question. can you reword it in easier term, perhaps?
|
|
Sep 3 2016, 05:17 PM
Show posts by this member only | IPv6 | Post
#4
|
Junior Member
604 posts Joined: May 2015 |
|
|
Sep 3 2016, 06:44 PM
Show posts by this member only | Post
#5
|
Elite
15,425 posts Joined: Mar 2008 |
QUOTE(mike9407 @ Sep 3 2016, 05:17 PM) QUOTE(kingkingyyk @ Sep 2 2016, 07:46 PM) My lecturer ask me to write my program in graph formThere are 2 ways to represent the neighbouring relationship, namely adjacency matrix and adjacency list. - For matrix form, you need to model the nodes with unique integer ID, mark the booleam matrix [current node][next node]=true. - For adjacency list, you can either model the nodes with unique integer ID or string ID. Each node has a list of neighbouring nodes. ---- [For integer id method] = adjacencyList[currentNode][n] = neighbour id. ---- [For string id method] = hashtable.set(currentNode,neighbouring node list), hashtable.get(currentNode) => neighbouring node list. You can either use an fixed size or dynamic sized array for the list. For visitation of every node, you can use depth first search / breadth first search + "visited" flag, depending on which style you want to show. Time complexity wise, adjacency list is faster as less neighbouring relationship checking is needed. O(V+E) for adjacency list & O(V^2) for adjacency matrix. Still no algorithm is needed up to this extend. Can you share the input data & format provided? This post has been edited by kingkingyyk: Sep 3 2016, 06:50 PM |
|
Sep 3 2016, 07:34 PM
Show posts by this member only | Post
#6
|
Senior Member
2,096 posts Joined: Dec 2011 |
QUOTE(kingkingyyk @ Sep 3 2016, 06:44 PM) Still no algorithm is needed up to this extend. Can you share the input data & format provided? more importantly he needs to show an example of what he means by graph output |
|
Sep 4 2016, 03:45 PM
Show posts by this member only | Post
#7
|
Junior Member
604 posts Joined: May 2015 |
QUOTE(malleus @ Sep 3 2016, 07:34 PM) My lecturer request me write a program that will list all network configurations which has a maximum distance of 3 hops(links) where all nodes are connected to the same graph(network)Do u want me to show the graph picture? |
|
Sep 4 2016, 04:57 PM
Show posts by this member only | Post
#8
|
Senior Member
2,096 posts Joined: Dec 2011 |
QUOTE(mike9407 @ Sep 4 2016, 03:45 PM) My lecturer request me write a program that will list all network configurations which has a maximum distance of 3 hops(links) where all nodes are connected to the same graph(network) as somebody else had already pointed out to you, the algorithm that you need is basically a graph traversal algorithm, where you have the option of either a depth first or breadth first.Do u want me to show the graph picture? But here's where your question becomes confusing. - if all nodes are connected to the same network, then its only a max of 1 hop. distances of more than 1 hop are already on a different network. - what exactly do you mean by network configuration? are you looking for just IP address and network address? or are you looking for more than just that? if more than just that, there's also the issue of security related issues involved, whether you have the permission to integrate those 'nodes' for their network config that you want. - exactly what method are you supposed to be using to find your local adjacent nodes? |
|
|
|
Sep 7 2016, 07:54 AM
Show posts by this member only | Post
#9
|
Junior Member
604 posts Joined: May 2015 |
[quote=kingkingyyk,Sep 3 2016, 06:44 PM]
My lecturer ask me to write my program in graph form [/quote] Graph is a kind of data structure, not algorithm. There are 2 ways to represent the neighbouring relationship, namely adjacency matrix and adjacency list. - For matrix form, you need to model the nodes with unique integer ID, mark the booleam matrix [current node][next node]=true. - For adjacency list, you can either model the nodes with unique integer ID or string ID. Each node has a list of neighbouring nodes. ---- [For integer id method] = adjacencyList[currentNode][n] = neighbour id. ---- [For string id method] = hashtable.set(currentNode,neighbouring node list), hashtable.get(currentNode) => neighbouring node list. You can either use an fixed size or dynamic sized array for the list. For visitation of every node, you can use depth first search / breadth first search + "visited" flag, depending on which style you want to show. Time complexity wise, adjacency list is faster as less neighbouring relationship checking is needed. O(V+E) for adjacency list & O(V^2) for adjacency matrix. Still no algorithm is needed up to this extend. Can you share the input data & format provided? [/quote] Why need hashtable |
|
Sep 7 2016, 08:13 AM
|
Elite
15,425 posts Joined: Mar 2008 |
QUOTE(mike9407 @ Sep 7 2016, 07:54 AM) If you don't use unique integer ID, how are you going to store the list of neighbours in an array? Hashtable helps in doing this job. But that also depends on the input data & operation you want to do. If you are going to apply flood fill / bipartite checking / topological sort / minimum spanning tree (prim's algorithm) / shortest path first (djikstra algorithm) / others graph related algorithms, then you need to store them in such way. P/S : The OSPF routing protocol in routers is using dijikstra algorithm to know which is the next router to direct the packet to. This post has been edited by kingkingyyk: Sep 7 2016, 08:19 AM |
|
Sep 7 2016, 01:42 PM
|
Junior Member
604 posts Joined: May 2015 |
QUOTE(kingkingyyk @ Sep 7 2016, 08:13 AM) If you don't use unique integer ID, how are you going to store the list of neighbours in an array? Hashtable helps in doing this job. First,i need DDS algorithm ?But that also depends on the input data & operation you want to do. If you are going to apply flood fill / bipartite checking / topological sort / minimum spanning tree (prim's algorithm) / shortest path first (djikstra algorithm) / others graph related algorithms, then you need to store them in such way. P/S : The OSPF routing protocol in routers is using dijikstra algorithm to know which is the next router to direct the packet to. |
|
Sep 7 2016, 05:14 PM
|
Junior Member
604 posts Joined: May 2015 |
[quote=mike9407,Sep 7 2016, 07:54 AM]
Graph is a kind of data structure, not algorithm. There are 2 ways to represent the neighbouring relationship, namely adjacency matrix and adjacency list. - For matrix form, you need to model the nodes with unique integer ID, mark the booleam matrix [current node][next node]=true. - For adjacency list, you can either model the nodes with unique integer ID or string ID. Each node has a list of neighbouring nodes. ---- [For integer id method] = adjacencyList[currentNode][n] = neighbour id. ---- [For string id method] = hashtable.set(currentNode,neighbouring node list), hashtable.get(currentNode) => neighbouring node list. You can either use an fixed size or dynamic sized array for the list. For visitation of every node, you can use depth first search / breadth first search + "visited" flag, depending on which style you want to show. Time complexity wise, adjacency list is faster as less neighbouring relationship checking is needed. O(V+E) for adjacency list & O(V^2) for adjacency matrix. Still no algorithm is needed up to this extend. Can you share the input data & format provided? [/quote] Why need hashtable [/quote] 12 13 14 15 23 24 12 13 14 15 23 25 12 13 14 15 23 34 12 13 14 15 23 35 12 13 14 15 23 45 12 13 14 15 24 25 12 13 14 15 24 34 12 13 14 15 24 35 12 13 14 15 24 45 12 13 14 15 25 34 12 13 14 15 25 35 12 13 14 15 25 45 12 13 14 15 34 35 12 13 14 15 34 45 12 13 14 15 35 45 12 13 14 23 24 25 12 13 14 23 24 35 12 13 14 23 24 45 12 13 14 23 25 34 12 13 14 23 25 35 12 13 14 23 25 45 12 13 14 23 34 35 12 13 14 23 34 45 12 13 14 23 35 45 12 13 14 24 25 34 12 13 14 24 25 35 12 13 14 24 25 45 12 13 14 24 34 35 12 13 14 24 34 45 12 13 14 24 35 45 12 13 14 25 34 35 12 13 14 25 34 45 12 13 14 25 35 45 12 13 14 34 35 45 12 13 15 23 24 25 12 13 15 23 24 34 12 13 15 23 24 35 12 13 15 23 24 45 12 13 15 23 25 34 12 13 15 23 25 45 12 13 15 23 34 35 12 13 15 23 34 45 12 13 15 23 35 45 12 13 15 24 25 34 12 13 15 24 25 35 12 13 15 24 25 45 12 13 15 24 34 35 12 13 15 24 34 45 12 13 15 24 35 45 12 13 15 25 34 35 12 13 15 25 34 45 12 13 15 25 35 45 12 13 15 34 35 45 12 13 23 24 25 34 12 13 23 24 25 35 12 13 23 24 25 45 12 13 23 24 34 35 12 13 23 24 34 45 12 13 23 24 35 45 12 13 23 25 34 35 12 13 23 25 34 45 12 13 23 25 35 45 12 13 23 34 35 45 12 13 24 25 34 35 12 13 24 25 34 45 12 13 24 25 35 45 12 13 24 34 35 45 12 13 25 34 35 45 12 14 15 23 24 25 12 14 15 23 24 34 12 14 15 23 24 35 12 14 15 23 24 45 12 14 15 23 25 34 12 14 15 23 25 35 12 14 15 23 25 45 12 14 15 23 34 35 12 14 15 23 34 45 12 14 15 23 35 45 12 14 15 24 25 34 12 14 15 24 25 35 12 14 15 24 34 35 12 14 15 24 34 45 12 14 15 24 35 45 12 14 15 25 34 35 12 14 15 25 34 45 12 14 15 25 35 45 12 14 15 34 35 45 12 14 23 24 25 34 12 14 23 24 25 35 12 14 23 24 25 45 12 14 23 24 34 35 12 14 23 24 34 45 12 14 23 24 35 45 12 14 23 25 34 35 12 14 23 25 34 45 12 14 23 25 35 45 12 14 23 34 35 45 12 14 24 25 34 35 12 14 24 25 34 45 12 14 24 25 35 45 12 14 24 34 35 45 12 14 25 34 35 45 12 15 23 24 25 34 12 15 23 24 25 35 12 15 23 24 25 45 12 15 23 24 34 35 12 15 23 24 34 45 12 15 23 24 35 45 12 15 23 25 34 35 12 15 23 25 34 45 12 15 23 25 35 45 12 15 23 34 35 45 12 15 24 25 34 35 12 15 24 25 34 45 12 15 24 25 35 45 12 15 24 34 35 45 12 15 25 34 35 45 12 23 24 25 34 35 12 23 24 25 34 45 12 23 24 25 35 45 12 23 24 34 35 45 12 23 25 34 35 45 12 24 25 34 35 45 13 14 15 23 24 25 13 14 15 23 24 34 13 14 15 23 24 35 13 14 15 23 24 45 13 14 15 23 25 34 13 14 15 23 25 35 13 14 15 23 25 45 13 14 15 23 34 35 13 14 15 23 34 45 13 14 15 23 35 45 13 14 15 24 25 34 13 14 15 24 25 35 13 14 15 24 25 45 13 14 15 24 34 35 13 14 15 24 34 45 13 14 15 24 35 45 13 14 15 25 34 35 13 14 15 25 34 45 13 14 15 25 35 45 13 14 23 24 25 34 13 14 23 24 25 35 13 14 23 24 25 45 13 14 23 24 34 35 13 14 23 24 34 45 13 14 23 24 35 45 13 14 23 25 34 35 13 14 23 25 34 45 13 14 23 25 35 45 13 14 23 34 35 45 13 14 24 25 34 35 13 14 24 25 34 45 13 14 24 25 35 45 13 14 24 34 35 45 13 14 25 34 35 45 13 15 23 24 25 34 13 15 23 24 25 35 13 15 23 24 25 45 13 15 23 24 34 35 13 15 23 24 34 45 13 15 23 24 35 45 13 15 23 25 34 35 13 15 23 25 34 45 13 15 23 25 35 45 13 15 23 34 35 45 13 15 24 25 34 35 13 15 24 25 34 45 13 15 24 25 35 45 13 15 24 34 35 45 13 15 25 34 35 45 13 23 24 25 34 35 13 23 24 25 34 45 13 23 24 25 35 45 13 23 24 34 35 45 13 23 25 34 35 45 13 24 25 34 35 45 14 15 23 24 25 34 14 15 23 24 25 35 14 15 23 24 25 45 14 15 23 24 34 35 14 15 23 24 34 45 14 15 23 24 35 45 14 15 23 25 34 35 14 15 23 25 34 45 14 15 23 25 35 45 14 15 23 34 35 45 14 15 24 25 34 35 14 15 24 25 34 45 14 15 24 25 35 45 14 15 24 34 35 45 14 15 25 34 35 45 14 23 24 25 34 35 14 23 24 25 34 45 14 23 24 25 35 45 14 23 24 34 35 45 14 23 25 34 35 45 14 24 25 34 35 45 15 23 24 25 34 35 15 23 24 25 34 45 15 23 24 25 35 45 15 23 24 34 35 45 15 23 25 34 35 45 15 24 25 34 35 45 i has input here |
|
Sep 7 2016, 06:05 PM
|
Elite
15,425 posts Joined: Mar 2008 |
Hi, can you explain what is the meaning of your input?
|
|
Sep 12 2016, 04:19 AM
|
Senior Member
4,544 posts Joined: Dec 2004 From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol |
google for tomato firmware, then look for image. tomato is firmware for routers, it has pretty good graphs for all sorts of data.
|
|
|
|
Sep 13 2016, 03:10 PM
|
Junior Member
604 posts Joined: May 2015 |
|
|
Sep 13 2016, 04:22 PM
|
Senior Member
4,544 posts Joined: Dec 2004 From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol |
|
|
Sep 13 2016, 08:11 PM
|
Senior Member
2,096 posts Joined: Dec 2011 |
QUOTE(narf03 @ Sep 13 2016, 04:22 PM) I tot u need reference of graphs or idea. That normally are the more difficult things, for generating graphs, just get api that can do it for you from raw data, do u need real data as well? at this point, I don't think anybody has got much of a clue on how's he's supposed to be doing what. |
|
Sep 14 2016, 03:05 PM
|
Senior Member
4,544 posts Joined: Dec 2004 From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol |
QUOTE(malleus @ Sep 13 2016, 08:11 PM) at this point, I don't think anybody has got much of a clue on how's he's supposed to be doing what. The problem is there are many ways to have things done, each of us maybe suggesting a part of "their own way" of doing things. Unless TS has clear picture which path hes taking, we cant be much of help. |
|
Sep 14 2016, 06:43 PM
|
Senior Member
2,096 posts Joined: Dec 2011 |
QUOTE(narf03 @ Sep 14 2016, 03:05 PM) The problem is there are many ways to have things done, each of us maybe suggesting a part of "their own way" of doing things. Unless TS has clear picture which path hes taking, we cant be much of help. yeah that's what I meant. so far he's not replied to any queries asking for more information on how he's planning to do what, so because of that, its pretty much a wild goose chase not knowing that's needed. |
|
Sep 14 2016, 11:30 PM
|
Junior Member
604 posts Joined: May 2015 |
|
Change to: | 0.0188sec
0.21
5 queries
GZIP Disabled
Time is now: 29th March 2024 - 08:07 AM |