Click here to Skip to main content
12,353,607 members (69,601 online)

Algorithms

 
GeneralRe: Puzzle 8 Solving with bfs Pin
Alan Balkany26-Sep-12 4:42
memberAlan Balkany26-Sep-12 4:42 
GeneralRe: Puzzle 8 Solving with bfs Pin
mohammadkaab26-Sep-12 5:01
membermohammadkaab26-Sep-12 5:01 
GeneralRe: Puzzle 8 Solving with bfs Pin
Alan Balkany26-Sep-12 5:09
memberAlan Balkany26-Sep-12 5:09 
GeneralRe: Puzzle 8 Solving with bfs Pin
mohammadkaab26-Sep-12 21:36
membermohammadkaab26-Sep-12 21:36 
QuestionBit Interleaver Pin
Skippums24-Sep-12 16:07
memberSkippums24-Sep-12 16:07 
QuestionImage processing Pin
fabio_antonio23-Sep-12 8:25
memberfabio_antonio23-Sep-12 8:25 
AnswerRe: Image processing Pin
Alan Balkany24-Sep-12 4:46
memberAlan Balkany24-Sep-12 4:46 
QuestionChecking the network Pin
en41115-Sep-12 7:24
memberen41115-Sep-12 7:24 
My problem goes something like this. I have a variable of 5 arrays a[5] for storing the 5nodes of a network. The network is randomly formed by the random number generator. I have the time of travel for each paths of the network. All the nodes may not be connected to eachother. The network and the time of travel of each path is as per the user has assigned. Now I have to check the elements of each array and assign the penalty as per the conditions. My main task is to find a network path traveling each node of the network only once such that the node visited is not repeated. Its similar to TSP but the difference is that in TSP has the condition that it is possible to travel from each node to every other node. But for my case the network is pre defined and nodes are not connected to every other nodes in the network.

a) Like if the network stored is 2-2-3-4-5 then I find that a[1]=a[2] so I will have to assign the penalty (type 1 )as the network has a path 2-2 which is not possible as the starting and end of the path is same. At the same time for rest of the paths from node 2 to 3, node 3 to 4, node 4 to 5 I will have to calculate the sum of total time of travel when I finally reach the node 5.

b) Also there is another penalty condition if the path is not a possible path in the network given by user then I will have to assign penaly( type 2) for such kind of condition like if 1-2-4-3-5 is a network to be checked. Here I am supposing that all the paths are possible but the path 4-3 doesn’t exist in the real network provided by the user, So for such cases I will have to calculate the sum of the time of travel for the paths which are possible and also assign the penalty (type 2)

c) There is also a condition that I need the end point of the network as node 5.So in the network generated randomly if the end node is not the node 5 then I will have to assign the penalty (type 3) and at the same time calculated the sum of the rest possible paths. For example the node 3-5-2-1-4 here the end node is 4 so I will have to assign the penalty(type 4)

d) Since I am not allowed to visit the same node twice I will have to assign the (penalty type 4) if the network has repeatition of nodes like if the network is 2-4-3-1-4. Here the node 4 is occurring twice so I will have to assign the penalty(type 4) and also calculate the sum of the time of travel of the other paths.
Considering all the above penalty conditions I will have to check the network s. I am really not being able to use any logic on how do I start. Need some hint on how do I do it.
AnswerlinkRe: Checking the network Pin
YvesDaoust21-Sep-12 0:11
memberYvesDaoust21-Sep-12 0:11 
Questionan optimal elevator-use algorithm Pin
BillWoodruff13-Sep-12 3:38
memberBillWoodruff13-Sep-12 3:38 
AnswerRe: an optimal elevator-use algorithm Pin
Alan Balkany13-Sep-12 4:41
memberAlan Balkany13-Sep-12 4:41 
GeneralRe: an optimal elevator-use algorithm Pin
BillWoodruff19-Sep-12 4:35
memberBillWoodruff19-Sep-12 4:35 
QuestionPlease, poke holes in my cryptographic function... Pin
SixOfTheClock13-Sep-12 0:52
memberSixOfTheClock13-Sep-12 0:52 
QuestionWhat kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 9:18
memberGrooverFromHolland9-Sep-12 9:18 
AnswerRe: What kind of checksum can this be? Pin
Alan N9-Sep-12 11:55
memberAlan N9-Sep-12 11:55 
GeneralRe: What kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 22:15
memberGrooverFromHolland9-Sep-12 22:15 
QuestionLinear Regression Most Efficient algorithm calc Line of Best Fit Pin
A*****4-Sep-12 19:24
memberA*****4-Sep-12 19:24 
AnswerRe: Linear Regression Most Efficient algorithm calc Line of Best Fit Pin
Peter_in_27804-Sep-12 20:17
memberPeter_in_27804-Sep-12 20:17 
QuestionRunning out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 7:52
memberMike-MadBadger3-Sep-12 7:52 
AnswerRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 9:03
memberAndrei Straut3-Sep-12 9:03 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 10:11
memberMike-MadBadger3-Sep-12 10:11 
GeneralRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 10:56
memberAndrei Straut3-Sep-12 10:56 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 11:18
memberMike-MadBadger3-Sep-12 11:18 
GeneralRe: Running out of Memory - Maths Check Pin
harold aptroot3-Sep-12 21:54
memberharold aptroot3-Sep-12 21:54 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger4-Sep-12 0:26
memberMike-MadBadger4-Sep-12 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 27 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid