Help with possibly noobish question

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

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 placed
class 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 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

Similar Messages

  • HT5787 How do you get help with your security questions if you forget your answers?

    How do you get help with your security questions if you forget your answers?

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (97108)

  • HT5699 The country I am living in is not on the Apple Contact Support list and I need help with my security questions.

    I am currently living in Tunisia but it's not on the Apple Contact Support list. I need help with my security questions which I cannot remember the answers. There is no link to send a reset email. What do I do?

    Click here and ask the iTunes Store staff for assistance.
    (114040)

  • HT5312 i need help with the security questions is there some way to get you to remind me what they were from e-mail or other wise

    I need help with the security Questions is there some way to get you to remember them by e-mail of other wise

    Read the HT5312 page that you posted from, it has instructions for how to reset them i.e. if you have a rescue email address set up on your account then steps 1 to 5 half-way down that page should give you a reset link.
    If you don't have a rescue email address then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • I need help with my security questions/answer?

    I forgot my security questions answer

    The Three Best Alternatives for Security Questions and Rescue Mail
        1. Use Apple's Express Lane.
              Go to https://expresslane.apple.com ; click 'See all products and services' at the
              bottom of the page. In the next page click 'More Products and Services, then
              'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
              ID security questions' and click 'Continue'. Please be patient waiting for the return
              phone call. It will come in time depending on how heavily the servers are being hit.
         2.  Call Apple Support in your country: Customer Service: Contacting Apple for support or
              Apple ID- Contacting Apple for help with Apple ID account security. Ask to speak to
              Account Security.
         3.  Rescue email address and how to reset Apple ID security questions.
    How to Manage your Apple ID: Manage My Apple ID

  • Urgent help with quick translation questions

    Hello,
    I am somewhat new to Java. I have a translation to hand in in a few hours (French to English). Argh! I have questions on how I worded some parts of the translation (and also if I understood it right). Could you, great developers, please take a look and see if what I wrote makes sense? I've put *** around the words I wasn't sure about. If it sounds strange or is just plain wrong, please let know. I also separated two terms with a slash, when I was in doubt of which one was the best.
    Many thanks in advance.
    1) Tips- Always ***derive*** the exceptions java.lang.Exception and java.lang.RuntimeException.
    Since these exceptions have an excessively broad meaning, ***the calling layers will not know how to
    distinguish the message sent from the other exceptions that may also be passed to them.***
    2) The use of the finally block does not require a catch block. Therefore, exceptions may be passed back to the
    calling layers, while effectively freeing resources ***attributed*** locally
    3) TIPS- Declare the order for SQL ***statements/elements*** in the constant declaration section (private static final).
    Although this recommendation slightly hinders reading, it can have a significant impact on performance. In fact, since
    the layers of access to data are ***low level access***, their optimization may be readily felt from the user’s
    perspective.
    4) Use “inlining.”
    Inlining is a technique used by the Java compiler. Whenever possible, during compilation, the compiler
    copies the body of a method in place of its call, rather than executing a ***memory jump to the method***.
    In the example below, the "inline" code will run twice as fast as the ***method call***
    5)tips - ***Reset the references to large objects such as arrays to null.***
    Null in Java represents a reference which has not been ***set/established.*** After using a variable with a
    large size, it must be ***reassigned a null value.*** This allows the garbage collector to quickly ***recycle the
    memory allocated*** for the variable
    6) TIPS Limit the indexed access to arrays.
    Access to an array element is costly in terms of performance because it is necessary to invoke a verification
    that ***the index was not exceeded.***
    7) tips- Avoid the use of the “Double-Checked Locking” mechanism.
    This code does not always work in a multi-threaded environment. The run-time behavior ***even depends on
    compilers.*** Thus, use the following ***singleton implementation:***
    8) Presumably, this implementation is less efficient than the previous one, since it seems to perform ***a prior
    initialization (as opposed to an initialization on demand)***. In fact, at runtime, the initialization block of a
    (static) class is called when the keyword MonSingleton appears, whether there is a call to getInstance() or
    not. However, since ***this is a singleton***, any occurrence of the keyword will be immediately followed by a
    call to getInstance(). ***Prior or on demand initializations*** are therefore equivalent.
    If, however, a more complex initialization must take place during the actual call to getInstance, ***a standard
    synchronization mechanism may be implemented, subsequently:***
    9) Use the min and max values defined in the java.lang package classes that encapsulate the
    primitive numeric types.
    To compare an attribute or variable of primitive type integer or real (byte, short, int, long, float or double) to
    ***an extreme value of this type***, use the predefined constants and not the values themselves.
    Vera

    1) Tips- Always ***derive*** the exceptions java.lang.Exception and java.lang.RuntimeException.***inherit from***
    ***the calling layers will not know how to
    distinguish the message sent from the other exceptions that may also be passed to them.***That's OK.
    while effectively freeing resources ***attributed*** locally***allocated*** locally.
    3) TIPS- Declare the order for SQL ***statements/elements*** in the constant declaration section (private static final).***statements***, but go back to the author. There is no such thing as a 'constant declaration section' in Java.
    Although this recommendation slightly hinders reading, it can have a significant impact on performance. In fact, since
    the layers of access to data are ***low level access***, their optimization may be readily felt from the user’s
    perspective.Again refer to the author. This isn't true. It will make hardly any difference to the performance. It is more important from a style perspective.
    4) Use “inlining.”
    Inlining is a technique used by the Java compiler. Whenever possible, during compilation, the compiler
    copies the body of a method in place of its call, rather than executing a ***memory jump to the method***.
    In the example below, the "inline" code will run twice as fast as the ***method call***Refer to the author. This entire paragraph is completely untrue. There is no such thing as 'inlining' in Java, or rather there is no way to obey the instruction given to 'use it'. The compiler will or won't inline of its own accord, nothing you can do about it.
    5)tips - ***Reset the references to large objects such as arrays to null.***Correct, but refer to the author. This is generally considered bad practice, not good.
    Null in Java represents a reference which has not been ***set/established.******Initialized***
    After using a variable with a
    large size, it must be ***reassigned a null value.*** This allows the garbage collector to quickly ***recycle the
    memory allocated*** for the variableAgain refer author. Correct scoping of variables is a much better solution than this.
    ***the index was not exceeded.******the index was not out of range***
    The run-time behavior ***even depends on compilers.***Probably a correct translation but the statement is incorrect. Refer to the author. It does not depend on the compiler. It depends on the version of the JVM specification that is being adhered to by the implementation.
    Thus, use the following ***singleton implementation:***Correct.
    it seems to perform ***a prior initialization (as opposed to an initialization on demand)***.I would change 'prior' to 'automatic pre-'.
    ***this is a singleton***That's OK.
    ***Prior or on demand initializations***Change 'prior' to 'automatic'.
    ***a standard
    synchronization mechanism may be implemented, subsequently:***I think this is nonsense. I would need to see the entire paragraph.
    ***an extreme value of this type******this type's minimum or maximum values***
    I would say your author is more in need of a technical reviewer than a translator at this stage. There are far too serious technical errors in this short sample for comfort. The text isn't publishable as is.

  • Can someone help with some quick questions?

    If someone has the time it would really help if I had the
    answers to the following questions. I appreciate they may be
    obvious or mundane to some but I am trying to set up a network at a
    primary school. I've searched the forum for answers with no luck.
    1. Where does Contribute save the settings of a provided key?
    2. Can the file(s) that contains those settings be copied
    over for other users to use?
    Thanks in anticipation

    Thanks for your reply. I'm actually using the software in a
    primary school and would like to use the stc key and thus the
    settings it creates and save them into a profile that each pupil
    user would then load up automatically. I would like to avoid them
    having to enter the details each time. It appears to work as the
    ntuser.dat file has been updated.

  • Need help with the classic question: iMac or MacPro?

    HI all,
    I have been tossing this questions for a little while now, high end iMac or low end MacPro? So if I can request your patience, please allow me to rattle this lot off and see if you can help.
    My current spec is:
    • MacPro 1,1
    • 2 x 2.66 Dual Core Xeon
    • I have 2 screens, 24"
    • All 4 internal bays have HDs, 1 is designated for TimeMachine.
    • 2 external HDs, 1 for iTunes and misc, 1 for boot HD backup.
    The software I run are mostly the Adobe CS suites, some 3d, some audio, and soon some FCPX.
    I have had the computer for about 4 years now, and although it has served me very well it is getting tired etc. I am a long-term tower computer fan, but I can't ignore the question.
    So, I have been thinking of either:
    • Going for the high-end iMac, and consolidate much of my internal HDs into an external RAID system.
    or
    • Getting the low-end MacPro, with the 3.2ghz Nehalem chip upgrade, and basically keep the same 'style' of system I have now.
    The
    What would you recommend? My concern is of course related to price, and bang for the buck, but more than that - longevity for the upcoming years. Pretty much now is the time when I will be updating, and I expect to keep whatever system for the next few years.
    I don't see my uses for the Mac to be too much different from what is listed above. I have not installed anything other than additional HDs and RAM into my current Mac - so in that respect expandability isn't too much of an issue.
    The price is similar enough to be comparable.
    In case you wonder, the current MacPro has been earmarked for use in another task, which is likely to include usage of the screens... Hence in somerespects, this is a "starting from scratch" situation...
    Thoughts?
    Many thanks,
    Aaron

    Forgot to mention Aperture. Lot's of photos.

  • Need Help with Comprehensive Interview Questions  Weblogic server admin

    Hi
    I would like to thank everybody in advance
    I am beginner with weblogic server administration and i would greatly appreciate if someone share the comprehensive interview Questions
    PLEASE HELP ME
    Regards
    Schelako

    Hi Schelako,
    You will get many links regarding weblogic Interview questions on Google.
    For basic Weblogic interview questions and answer you can follow the below links
    http://www.coolinterview.com/type.asp?iType=469
    https://sites.google.com/site/weblogicadminsite/weblogic-issues/weblogic-interview/wla-interview-questions
    https://sites.google.com/site/weblogicadminsite/weblogic-issues/weblogic-interview/WLA-Interview-Questions--2
    https://sites.google.com/site/weblogicadminsite/weblogic-issues/weblogic-interview/weblogic-administrator-interview-questions-3
    As you said "I am beginner with weblogic server administration"
    It would be better if you start Oracle doc's for Weblogic Administration
    Regards
    Fabian

  • New user needs help with Email account questions

    Good day - I have been a 10-year user of Blackberrys (Curve, Bold, and earlier models). Just received a new Q10 for work. Enterprise Outlook synched up and I am getting all emails, calendar, and contact information as in the past. All good with this. Here are my questions I cannot find answers to anywhere:
    1) How can I insert a "signature" with emails I compose from Q10?
    2) How can I delete all emails on Q10, rather than one at a time?
    3) How do I set the Q10 to only delete from phone and not network. In other words I only want to delete emails from the Q10 device and not my PC.
    Appreciate any help. Thank you,
    Chris

    #3 is even easier
    Go to Hub settings, then display and actions and drag down, you'll see the option 'delete'.
    Regards.
    Blackberry! Here, now, forever!

  • HELP!! i need help with the security question reset

    i clicked send reset to ********@me.com but @me.com doesnt work anymore so how do i change my email for the security questions!?!?!

    Reset Security Questions
    Frequently asked questions about Apple ID
    Manage My Apple ID
    Or you can email iTunes Support at iTunes Store Support.
    If all else fails:
      1. Go to: Apple Express Lane;
      2. Under Product Categories choose iTunes;
      3. Then choose iTunes Store;
      4. Then choose Account Management;
      5. Now choose iTunes Store Security and answer the bullet questions, then click
          Continue;
      6. Sign in with your Apple ID and press Continue;
      7. Under Contact Options fill out the information and advise iTunes that you would
          like your security/challenge questions reset;
      8. Click Send/Continue.
    You should get a response within 24 hours by email.
    In the event you are unsuccessful then contact AppleCare - Contacting Apple for support and service.
    Another user had success doing the following:
    I got some help from an apple assistant on the phone. It is kind of round about way to get in.
    Here is what he said to do and it is working for me...
      a. on the device that is asking you for the security questions go to "settings", > "store" >
          tap the Apple ID and choose view"Apple ID" and sign in.
      b. Tap on payment information and add a credit/debit card of your preference then select
          "done", in the upper right corner
      c. sign out and back into iTunes on the device by going to "settings"> "store" > tap the
          Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you
          should be asked to verify your security code for the credit /debit card and NOT the
          security questions.
      d. At this time you can remove the card by going back in to edit the payment info and
          selecting "none" as the card type then saving the changes by selecting "done". You
          should now be able to use your iTunes store credit without answering the security
          questions.
    It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
    Good Luck friends!

  • Need Help with a Java Question Plz

    Hi
    Could someone help me out with this please?
    I need to know the difference between the two String methods equals and equalsIgnoreCase
    Thanks

    The former tests if the Strings are equal, the latter tests if they're equal, but ignores case...
    I.e. "A".equalsIgnoreCase("a") returns true, among other things...

  • Help with possibly dead ipod .... any hope?

    While listening to my Ipod, it suddenly sounded like it was dying - the music slowed down - like when a cassette tape gets twisted or runs out of battery life. The screen froze. I know it was fully charged - the previous day I charged it until it indicated that I could disconnect - and the green battery icon was near full before it seized up. I tried reset to no avail. The screen went blank Plugged into to PC to try and charge, but screen stays blank and the pc doesn't recognize it.
    Is there any hope for my ipod?
    (I'm in India - there are no service centers listed on the Apple web page)
    Any help from fellow Ipod users would be greatly appreciated.
    Steve
    Ipod 5th Gen Video 30G Windows XP
    Ipod 5th Gen Video 30G Windows XP
    Ipod 5th Gen Video 30G   Windows XP  

    Hi John,
    Thanks for the link. There may be some hope - as it seems that I might just have to keep trying. I did try plugging it into the pc to charge, but no response. I read somewhere that I have to wait 30 minutes or so for it to get enough charge to be recognized - assuming that it's the battery.
    Do you have any insight as to why the song that was playing just slowly died - slowed down and sounded warped - could this be what happens with a disk drive when the battery goes? Maybe then all I need to do is charge it...
    Thanks again,
    Steve
    Ipod 5th Gen Video 30G Windows XP

  • URL: newbie needs help with simple programming question!

    Hi everyone,
    Please direct me to a FAQ or other resource, or help me with this problem:
    I want to create a text field (or similar container) that contains both ordinary text AND a URL/hyperlink in it. For example, the following text might appear in the text field:
    "I have many _pictures_ from my vacation"
    where the word "pictures" is actually a hyperlink to a web site, and the other portions of the string are simple text.
    All advice and help is appreciated!
    -Dennis Reda
    [email protected]

    Well here is one way you code do it but if you do alittle research on them links above it will explain how this code works.Well it will explain how jeditorpane and hyperlinklistener work
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    import java.net.*;
    public class b extends javax.swing.JApplet implements HyperlinkListener  {
       JEditorPane field = new JEditorPane();
      public b() {
        Container pane = getContentPane();
        FlowLayout flo = new FlowLayout();
        pane.setLayout(flo);
        field.setPreferredSize(new Dimension(200, 25));
        field.setEditable(false);
        pane.add(field);
        setContentPane(pane);
         String gg1 = "<html><body>I have many_<a    href='http://www.home.com'>pictures</a>_from my vacation</body></html>";
         field.addHyperlinkListener(this);
         field.setContentType("text/html");
         field.setText(gg1);
      public void hyperlinkUpdate(HyperlinkEvent e) {
         if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          try{
            URL url = new URL("http://www.msn.com");
            getAppletContext().showDocument(url,"_self"); 
            }catch(Exception r) {};
      public void init()  {
         b c = new b();
    ps hope this helped                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Get some help with some java questions

    Parameters are formal arguments passed to:
    methods, constructors, events handlers and objects or all?
    What arithmetic operator can be used with characters?
    If you pass an argument to a math method that is not a number, it returns?
    If anyone could give me some insight on these questions or tell me where I could read up on them I would appreciate it

    How To Ask Questions The Smart Way

Maybe you are looking for

  • Linking I-tunes library to external drive

    I have managed to successfully relocate my i-tunes library onto an external drive, having followed instructions in the i-tunes for Dummies book. (my laptop internal hard drive was full). However, i-tunes has not linked itself to the external i-tunes

  • Doing Calculations in a css webpage using java

    Hi I run a small website for ex members of an RAF Squadron. We would like to offer items for sale on the site but do not want to go down the route of a shopping trolly scenario where by we have to deal with electronic cash payments. To this end I hav

  • Problem to print Purchase Order created in RFC module function

    Hi I created a specific RFC function module for using in a BSP application. In this specific function module, I have created a Purchase Order (PO) thanks to the standard module "BAPI_PO_CREATE". The PO is well created but I don't manage to print imme

  • GL : after journal import currency conversion type change to User

    Hi I have following data in GL_Interface table User_currency_conversion-type = 'Corporate' Currency_conversion_date = '9/21/2008' ( Get from Gl_Daily_rates) Currency_conversion_rate = Null As per GL_Daily_Rates the conversion_rate is 1.5 for this cur

  • External battery for my 3GS.

    Iphone 3Gs does not recognize my backup battery charger.  I have an external battery from Brookstone that charges my phone when I cannot connect to the wall.  The phone no longer recognizes my charger.