Home arrow static arrow Java Programming [Archive] - Help with possibly noobish question
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Help with possibly noobish question
This topic has 18 replies on 2 pages.    1 | 2 | Next »

Posts:150
Registered: 18/12/02
Help with possibly noobish question  
Jul 31, 2004 1:43 PM



 
Hello,

I need to make some complex graph structures such that this format will not do

1: 2 ->4
2: 4 ->2

I have several additions to each node to take care of that is the main problem.
each node has aarity which I could hold as a separate array to be accessed for each object instance of a node

Part 1:
The problem is that i have to know which node is connected to which arity element and then I have to search for the free elements and label their indexes with characters. I think I can solve this

Part 2:
The second problem is maybe a little worse as I have to translate certain groups graphs to something like this and then connect them to any graph as needed. Will i need to make a separate object for this purpose??

.................. n input wires connected
???????????????????????????????????
Wires maped to edges from graph
___________________________________
.................. n output wires wires connected


Part 3:
To compound this I have to find a way to implement a menu selector to choose random graphs or parts of graphs for a Genetic Algorithm. Selection is not the problem here its is mapping the structures into a chromosone which is causing me the problem.

Part 4:
Each connection has the graphs triggers different application specific rules that cause the graph to reduce or change connections.

Any help on strategies for these problems would greatly be appreciated

kind regards

Prashant
 

Posts:150
Registered: 18/12/02
Re: Help with possibly noobish question  
Aug 1, 2004 1:42 PM (reply 1 of 18)



 
some help would really be appreciated here
 

Posts:8,813
Registered: 10/4/00
Re: Help with possibly noobish question  
Aug 1, 2004 2:30 PM (reply 2 of 18)



 
You seem to be assuming that everyone has knowledge of what it is you are trying to accomplish. You have stated some problems, but no goal, and the problems you listed seem to be extremely high level. Taken together, the answers could be a good basis for a thesis and would require many hours of work. Are you trying to get your thesis written on the Java forums? And while we are on the subject of Java, I don't see a single question about Java in your post. I also don't see a single line of code. There are lots of people here who would probably help with something unrelated to Java, but you need to do some of the footwork yourself and not just dump the problems you are having on the forums.

If you want a format for a 'complex graph structure', it's not going to be enough to tell us which 'format will not do'. Someone is going to need to know the constraints which make a format which 'will do'. Hopefully no one is dumb enough to keep guessing about 'graph formats' until they whatever it is you are looking for. If your question is about 'graph formats', restrict your question to that. Describe your problem and tell us what you have tried and why it didn't work. Most of all, we are going to need to know what you are trying to accomplish. We cannot read your mind.

Once you have the theorectical question out of the way, you might try writing the smallest Java program you can which demonstrates your 'complex graph structures' and describe the problem you are having with it. This will allow people to understand the concepts you have in your project just by running the code.

In the end, your work remains your work.
 

Posts:266
Registered: 9/29/02
Re: Help with possibly noobish question  
Aug 1, 2004 2:53 PM (reply 3 of 18)



 
Well, I googled it and I couldn't find anything.

-Wiley
 

Posts:8,813
Registered: 10/4/00
Re: Help with possibly noobish question  
Aug 1, 2004 2:58 PM (reply 4 of 18)



 
Well, I googled it and I couldn't find anything.

-Wiley

I'm impressed. What did you google? Do you understand what he wants? Is it just me?
 

Posts:37,103
Registered: 3/30/99
Re: Help with possibly noobish question  
Aug 1, 2004 3:01 PM (reply 5 of 18)



 
No, bbrriittnneeyy, It's not just you. I have no clue what he's talking about. I can't tell if it's poor communication or a very specialized problem domain. I'm guessing a little of both, but more of the former.
 

Posts:8,813
Registered: 10/4/00
Re: Help with possibly noobish question  
Aug 1, 2004 3:16 PM (reply 6 of 18)



 
Oh well... I guess I'm in good company. I keep looking forward to the time when the world is so incomprehensible that the highlight of my day is drooling on myself.
 

Posts:37,103
Registered: 3/30/99
Re: Help with possibly noobish question  
Aug 1, 2004 3:18 PM (reply 7 of 18)



 
It's not all it's cracked up to be--trust me.
 

Posts:5,965
Registered: 5/17/03
Re: Help with possibly noobish question  
Aug 1, 2004 4:39 PM (reply 8 of 18)



 
Piece of cake. Just start with a simple graph and then make it more complex on a need to have basis!
 

Posts:80
Registered: 12/7/98
Re: Help with possibly noobish question  
Aug 1, 2004 4:45 PM (reply 9 of 18)



 
Sounds like someone's COLLEGE ASSIGNMENT ?

Due tomorrow ?
 

Posts:150
Registered: 18/12/02
Re: Help with possibly noobish question  
Aug 5, 2004 10:27 AM (reply 10 of 18)



 
Hello all and thanks for the replies positive or not. Sorry if I offended you bbritta. I guess its not such and easy question after all.

Well its not due tomorrow and I am doing some research into a wierd topic so you guys are along the right lines. The topic I am researching is non-determinstic interaction nets. I don't know too many people doing this. Interaction Nets invented by a guy named Yves Lafont and you can google this and the topic I am researching.

All the code written thus far exists in C and is very hard to interpret as it uses a Lex and Yacc parser to implement the creation of tokens and syntax rules of the Interaction Nets programming language.

Basically its a high level visual graph programming language however it can also be used on low level based on interpretation. Thus the need for graph data structures. Essentially I have to modify this programming language for non-determinism and demonstrate this in a Genetic Algorithm. The latter would be no problem if I could get the data structure sorted. People familiar with Lamda calculus, Linear Logic and Process Calculus might have seen this in some research papers.

However I have not had a very good theoretical background so finding the data structures to map the complexity of the graphs is a little problematic. I will outline my idea and what I have done a little clearer below.

So far I have broken the prob into smaller steps as suggested by someone, I hope the pseudo code helps a little more.

class Symbol{  convertASCIItoINt( char value) : return int  getChar() : return char checkAvailability() : return boolean;} //each Symbol is assigned to a free port and is traditionally input.//several instances of this obj are used to class Port  implements Symbol{  initialisePort( num);   checkFreePorts( ) : return boolean;  setPortSymbol (port [num])  private ports [ num ];  setEndPortAsSpecial( ports [ num ]) // each node has a special port called principal port } // each node has a set of port and each port can have a label as a string class Node{ setNodeSymbol()  getnodeSymbol() public Port node_obj [ port_num ]; setSpecialSymbol( string)  {  //destructor to delete node connected to  //duplicator to create a copy of cell value  //constructor create a copy of the cell } getSpecialSymbol() : return string symbol; checkSpecialSymbol(node_obj [ port_num ]): return string symbol;} //so far as a typical graph goes i think its acceptable to connect the nodes in an vector with //a list at each element although this is not shown below.class Net{  connecNodes( node_obj [ port_num], node_obj [ port_num] )  checkDeadlock(): return boolean; //check for cycles  public Node net_obj [ node_num ];  checkConnected( node_obj [ port_num], node_obj [ port_num] ): return boolean}//this is where the execution engine will be placedclass InteractionRules{ ruleTrigger( ) {  Node n = new n  n.checkSpecialSymbol()   // its here where things get complicated with the data structure as according to the rules I have to delete   // add or copy a value of a particular node in a Net  }   determineReduction()  {    //if (ports [ num ] = num )    // a reduction occurs according to the rule in the method above ruleTrigger();    //at this point the relevant nodes will be removed and new nodes will be added according to the rules  } }   storeCopyofOriginalNet()  {    //needed to rollback if rules are infeasable or deadlock occurs. } } 


I desperately still need help to complete the data structure I have also considered manipulating the complex associations between the sets as multimaps and maps

Sorry if I am not clear I am trying my best to explain something I have had little background wiki/./and almost no help in as I am creating the special rules as I go along such as keeping an copy of a net / graph before modifying it in the Genetic Algorithm.

Kind Regards and Best Wishes

Prashant

 

Posts:957
Registered: 3/31/04
Re: Help with possibly noobish question  
Aug 5, 2004 10:57 AM (reply 11 of 18)



 
vague and yet complicated
your question is

i suggest keeping an x and y variable so you can plot a certain symbol.
then when you pass through a list of your symbols, plot a line from x,y of s1 to x,y of s2.
you dig?

then u can incorporate any logic rules you want into the program.
 

Posts:266
Registered: 9/29/02
Re: Help with possibly noobish question  
Aug 5, 2004 11:24 AM (reply 12 of 18)



 
Interaction Nets invented by a guy named Yves Lafont and you can google this and the topic I am researching.

I'll google that right away so I can figure out what your doing before i dive into understanding your question.

Thanks! It's my day off and I should have plenty of time!
-Wiley
 

Posts:5,965
Registered: 5/17/03
Re: Help with possibly noobish question  
Aug 5, 2004 12:17 PM (reply 13 of 18)



 
I've found a thesis here (third from top in postscript format)

http://www.cs.ualberta.ca/~you/Research/past-theses.html

Chapter 2.1 contains a definition of both the nodes and the interaction rules.
 

Posts:150
Registered: 18/12/02
Re: Help with possibly noobish question  
Aug 5, 2004 12:27 PM (reply 14 of 18)



 
Hello Ulrika

Thank you for taking the time to find that but unfortunately I have already sunk a month into trying to understand the latter chapters of that document. I have the basic concepts in my head of how it all works but am having problems so am gonna try to write some more code before I post again.

The best way out of a problem like this is trial and error.

kind regards

Prashant
 
This topic has 18 replies on 2 pages.    1 | 2 | Next »