Welcome Guest ( Log In | Register )

4 Pages  1 2 3 > » Bottom

Outline · [ Standard ] · Linear+

 Networking problem, Struggle of the algorithm

views
     
TSmike9407
post Sep 2 2016, 06:17 PM, updated 8y ago

On my way
****
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
kingkingyyk
post Sep 2 2016, 07:46 PM

10k Club
Group Icon
Elite
15,425 posts

Joined: Mar 2008
QUOTE(mike9407 @ Sep 2 2016, 06:17 PM)
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
*
No algorithm is needed. What you need is just the result of tracert. unsure.gif
scar_face008
post Sep 2 2016, 08:21 PM

opis boi
****
Senior Member
585 posts

Joined: Jan 2007
From: Ranau, Sabah


i dont even understand the question. can you reword it in easier term, perhaps?
TSmike9407
post Sep 3 2016, 05:17 PM

On my way
****
Junior Member
604 posts

Joined: May 2015
[quote=kingkingyyk,Sep 2 2016, 07:46 PM]
No algorithm is needed. What you need is just the result of tracert. unsure.gif
*

[/quote
My lecturer ask me to write my program in graph form
kingkingyyk
post Sep 3 2016, 06:44 PM

10k Club
Group Icon
Elite
15,425 posts

Joined: Mar 2008
QUOTE(mike9407 @ Sep 3 2016, 05:17 PM)
QUOTE(kingkingyyk @ Sep 2 2016, 07:46 PM)

No algorithm is needed. What you need is just the result of tracert.  unsure.gif
*
My lecturer ask me to write my program in graph form
*
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. rolleyes.gif Can you share the input data & format provided?

This post has been edited by kingkingyyk: Sep 3 2016, 06:50 PM
malleus
post Sep 3 2016, 07:34 PM

Look at all my stars!!
*******
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.  rolleyes.gif Can you share the input data & format provided?
more importantly he needs to show an example of what he means by graph output
TSmike9407
post Sep 4 2016, 03:45 PM

On my way
****
Junior Member
604 posts

Joined: May 2015
QUOTE(malleus @ Sep 3 2016, 07:34 PM)
more importantly he needs to show an example of what he means by graph output
*
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?
malleus
post Sep 4 2016, 04:57 PM

Look at all my stars!!
*******
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)
Do u want me to show the graph picture?
*
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.

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?

TSmike9407
post Sep 7 2016, 07:54 AM

On my way
****
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. rolleyes.gif Can you share the input data & format provided?
*

[/quote]
Why need hashtable
kingkingyyk
post Sep 7 2016, 08:13 AM

10k Club
Group Icon
Elite
15,425 posts

Joined: Mar 2008
QUOTE(mike9407 @ Sep 7 2016, 07:54 AM)
Why need hashtable
*
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. biggrin.gif

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. smile.gif

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
TSmike9407
post Sep 7 2016, 01:42 PM

On my way
****
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. biggrin.gif

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. smile.gif

P/S : The OSPF routing protocol in routers is using dijikstra algorithm to know which is the next router to direct the packet to.
*
First,i need DDS algorithm ?
TSmike9407
post Sep 7 2016, 05:14 PM

On my way
****
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. rolleyes.gif 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
kingkingyyk
post Sep 7 2016, 06:05 PM

10k Club
Group Icon
Elite
15,425 posts

Joined: Mar 2008
Hi, can you explain what is the meaning of your input?
narf03
post Sep 12 2016, 04:19 AM

Look at all my stars!!
*******
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.
TSmike9407
post Sep 13 2016, 03:10 PM

On my way
****
Junior Member
604 posts

Joined: May 2015
QUOTE(narf03 @ Sep 12 2016, 04:19 AM)
google for tomato firmware, then look for image. tomato is firmware for routers, it has pretty good graphs for all sorts of data.
*
I need coding la
narf03
post Sep 13 2016, 04:22 PM

Look at all my stars!!
*******
Senior Member
4,544 posts

Joined: Dec 2004
From: Metro Prima, Kuala Lumpur, Malaysia, Earth, Sol


QUOTE(mike9407 @ Sep 13 2016, 03:10 PM)
I need coding la
*
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?
malleus
post Sep 13 2016, 08:11 PM

Look at all my stars!!
*******
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.
narf03
post Sep 14 2016, 03:05 PM

Look at all my stars!!
*******
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.
malleus
post Sep 14 2016, 06:43 PM

Look at all my stars!!
*******
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.
TSmike9407
post Sep 14 2016, 11:30 PM

On my way
****
Junior Member
604 posts

Joined: May 2015
QUOTE(malleus @ Sep 14 2016, 06:43 PM)
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.
*
Let me show u the graphical view

4 Pages  1 2 3 > » Top
 

Change to:
| Lo-Fi Version
0.0188sec    0.21    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 08:07 AM