Different algorithms in Java

What are the different algorithms in Java? Can someone list me each and its uses?

Genetic Algorithm Method to Count Elephants:
Have lots of babies. Wait till they're sixteen and
throw them into Africa telling them to count
elephants. After 1 year, have a family reunion and
ask them to tell you how many they saw. Kill all the
ones that didn't count as many as some threshold.
Have the surviors have lots of kids, with each other.
Have them repeat the process. Keep it up and it'll
l converge to the right number, as long as they don't
die from a horrible genetic disease.
A. I don't think I can have babies. No uterus found. Pls advise.
B. Your fitness function doesn't guarantee that your babies are counting unique elephants. Its not much help if your kids count the same elephant 1 billion times.

Similar Messages

  • RSPOR_SETUP  = Different ABAP and Java support packages.

    Hi all,
    We have an ECC 6.0 system with abap+java stacks. When we run the RSPOR_SETUP report we get this error:
    Different ABAP and Java support packages. Combination of support packages invalid
    And with some more clicking we find this:
    6. Compare version information of Java support package (com.sap.ip.bi classes) with ABAP support package (SAP BI)
       ABAP Support Package:                  13
       Java Support Package:                   0
    On the Java stack we see (among others) these components:
    sap.com        BI-IBC        7.00 SP12 (1000.7.00.12.0.20070509050058)
    sap.com        BI_MMR        7.00 SP12 (1000.7.00.12.0.20070507084106)
    sap.com        BI_UDI        7.00 SP12 (1000.7.00.12.0.20070507084125)
    sap.com        BI-BASE-S        7.00 SP12 (1000.7.00.12.11.20080324092518)
    sap.com        BI-WDALV        7.00 SP12 (1000.7.00.12.1.20071105133039)
    sap.com        BI-REPPLAN        7.00 SP12 (1000.7.00.12.3.20080104101916)
    So I believe all components are correctly installed.
    What are we doing wrong?

    Hello.
    Please be aware, that report RSPOR_SETUP should NOT be used with a Netweaver 04s system. This report has been replaced by the support desk tool. I request you to run the support desk tool as per note 937697 to check if there are any configuration issues in your system.You can resolve any red traffic lights that might be reported by the tool by following the corresponding actions suggested.
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

  • Data Structures and Algorithms in java book

    Hi guys,
    I want to know a good book which is good for Data Structures and Algorithms in java. I am good at Core java but a beginner for Data Structures in Java. I am a little poor in Data Structures concepts.
    Following are the books I have found on the net. Could you help me the choose the best outta them.
    1. Data Structures and Algorithms in Java - Mitchell Waite
    2. Data Structures in Java - Sandra Anderson
    3. Fundamentals of OOP and Data Structures in Java - Richard Weiner & Lewis J. Pinson
    4. Object Oriented Data Structures Using Java - Nell Dale, Daniel T. Joyce, Chip Weems

    lieni wrote:
    I good data structures book doesn't have to be language-specific.Thx DrLazlo, my speachYes.
    The OP wrote:
    I have access to these books and dont know which one to start with.What I meant is that you shouldn't narrow your search to insist that the book you choose have "Java" in the title.

  • Classify and cluster documents with algorithm in java

    Hello everybody,
    I want to classify and cluster, let's say, 100 documents which are on the Intranet.
    I was thinking of including an algorithm in java who can do this.
    But i have no clue where to start of where to begin.
    Please give me some advice or maybe an example ;),
    Greetings,
    Thijs Leusink
    [email protected]

    I was thinking of including an algorithm in java who
    can do this.
    But i have no clue where to start of where to begin.Two steps:
    1. Find an algorithm that can do what you want.
    2. Write it in Java.
    Start with the first step: if you haven't done that yet, I don't think we can help you here. Possibly you could use Google to find an algorithm.
    Then go on to the next step: if you don't even know how to begin writing a Java program then there is a collection of introductory tutorials here:
    http://java.sun.com/docs/books/tutorial/
    If you are having problems after that, come back here and ask a specific question.

  • Quasi Newton Optimization Algorithm in Java

    I need to implement Quasi Newton Optimization Algorithm in Java, I�ve found it in C. Can anyone help me to find this in Java?

    Plagiarise in British English. Plagiarize in American English.
    These forums are used internationally, so either is reasonable.
    Don't correct other people's spelling unless you're really sure of your ground.

  • Duplicating wincrypt algorithm in JAVA

    Here is the background on this project: I am creating an automated licensing system for a company that sells telco products. Until now, they have been manually generating the activation keys using an exe program developed in house.
    I have been hired to remove some of the manual interaction required from the employees, one of which is to automatically generate these activation keys. I emailed the developer of their exe about the algorithm he was using to generate the activation keys (based on serial number and hardware ID) because I need to duplicate that server-side. He said it probably wouldn't be possible because his program relies on wincrypt.
    So my question is this: Is there any way at all to duplicate the wincrypt algorithm in JAVA? because i dont need that system to based on WINCRYPT, and using wincrypt.h will bound the user to have that file. I need to duplicate the wincrypt functionality exactly. Being off by even a little bit would render the script useless as it would generate invalid keys...
    If anyone has any insight, I would love to hear it.
    Sarwat
    Edited by: Curgol on Jun 25, 2009 6:54 AM

    Curgol wrote:
    So you are saying that by using JCA/JCE i can have the same functionality that is being provided by wincrypt ?? i can implement the same encryption and decryption algorithm without being dependent on wincrypt.h and associated files ??
    I know JCA/JCE packages provides encryption/decryption tools, but the problem is that i dont have any idea how wincrypt encrypt files, have it's cpp files though, but can the wincrypt functionality impolemented in JAVA ??.
    Wincrypt from Microsoft is a library of hundreds of encryption related functions. The JCE defines an interface that providers provide implementations for. Just about everything in Wincrypt is available though one or more of the JCE providers.
    There is no one encryption method provided by Wincrypt. If you are trying to match in Java an existing cryptographic process implemented using Wincrypt then you need to know exactly which of the Wincrypt algorithms (cipher, block mode, padding, key generation etc etc etc) is being used. Without this knowledge you are stuffed.

  • How is the java.lang.StringBuffer class different from the java.lang.String

    How is the java.lang.StringBuffer class different from the java.lang.String class?....

    Read the API.
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
    "Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings."
    Although when possible you should use StringBuilder instead of StringBuffer.
    Always read the API at the very least before asking questions in the forums. Ideally you should do some google searching and poke around for an answer too. Otherwise you will get people barking at you.
    Drake

  • Is a Java Virtual Machine different from the Java Runtime Environment?

    Ok I have heard people say they are running a java virtual machine, but how is that different from the Java Runtime Environment you install on any computer to run Java? Also if it is different what is the purpose of it and using commands like this:
    -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC

    I've noticed lately that at certain web pages a window
    titled "Install on Demand" pops up and says that I
    need to download "Java virtual machine." When I press
    on the download button another window pops up that
    says it was unable to download and that I should try
    again or go to Windows Update to install the
    component. When I do the Windows Update, at the
    Windows Update website it states that there are no
    updates available for my computer at this time. What
    should I do?
    Thank you in advance.I am having the same problem. I downloaded the JVM download from the sun homepage... and I still can't use digichat applet.. anyone have a fix?
    >
    >

  • Announce: Generic Algorithms for Java, 0.3 release

    The latest release of jga: Generic Algorithms for Java is now available at
    http://jga.sf.net/
    Included in this release are a collection of algorithms adapted from STL that operate over generic collections and iterations. What's included are the algorithms that do not attempt to modify the collection/iteration that they're given: in other words, all of the find/search/count algorithms. Also included are the complete set of functors and predicates that were present in the last release, with a few modifications for easier use.
    The library is released under the LGPL, and includes the source for the library, the test framework, and a non-genericized version of the test framework that verifies that the library may be used without having the generic environment available.

    A (similar, it seems) parameterized collections library for JSR-14 Java.I had looked at JUtil some time ago, and I'm not sure of the similarity: JUtil looks to provide a number of interesting (if somewhat specialized) collections. JGA provides functors & predicates, and STL-ish algorithms that operate on collections and iterators. Looks to me to be more complimentary than similar.
    Mr. Ananian/Astaire's site is also the source of SinjDoc, the javadoc tool that I used to generate the javadoc at jga.sf.net, and with which I replaced the munge4doc.pl and mungedoclist.pl scripts that I had previously used and posted on this forum.

  • El Gamal Algorithm and Java problem

    I was trying to implement the El Gamal algorithm in java, but the problem is with the last part. I'm not getting the value of Message but according to algorithm i should get the value of message. Can anyone please tell me what did i do wrong?
    theory says, msg = x * (z^a)modInverse(p);
    import java.math.BigInteger;
    import java.math.*;
    import java.util.*;
    class ElGamel
         public static void main(String[] args)
              BigInteger p = new BigInteger("7747");
              BigInteger q = new BigInteger("3853");
              BigInteger a = new BigInteger("773");
              BigInteger k = new BigInteger("1193");
              BigInteger msg = new BigInteger("39");
              BigInteger y = new BigInteger("0");
              BigInteger x = new BigInteger("0");
              BigInteger z = new BigInteger("0");
              BigInteger temp = new BigInteger("0");
              BigInteger t2 = new BigInteger("0");
              int t1 = 0;
              y = q.modPow(a,p);
              System.out.println("Y is "+y);
              x = q.modPow(k,p);
              System.out.println("X is "+x);
              t1 = k.intValue();
              z = (msg.multiply(y.pow(t1))).mod(p);
              System.out.println("Z is "+z);
              t1 = a.intValue();
              x = x.pow(t1);
              temp = x.modInverse(p);
              msg = z.multiply(temp);
              System.out.println("Message is "+msg);
    }

    Reposting your code with markup. In future please use [code] tags, as you can see the effect it has on legibility: import java.math.BigInteger;
    import java.math.*;
    import java.util.*;
    class ElGamel
        public static void main(String[] args)
            BigInteger p = new BigInteger("7747");
            BigInteger q = new BigInteger("3853");
            BigInteger a = new BigInteger("773");
            BigInteger k = new BigInteger("1193");
            BigInteger msg = new BigInteger("39");
            BigInteger y = new BigInteger("0");
            BigInteger x = new BigInteger("0");
            BigInteger z = new BigInteger("0");
            BigInteger temp = new BigInteger("0");
            BigInteger t2 = new BigInteger("0");
            int t1 = 0;
            y = q.modPow(a,p);
            System.out.println("Y is "+y);
            x = q.modPow(k,p);
            System.out.println("X is "+x);
            t1 = k.intValue();
            z = (msg.multiply(y.pow(t1))).mod(p);
            System.out.println("Z is "+z);
            t1 = a.intValue();
            x = x.pow(t1);
            temp = x.modInverse(p);
            msg = z.multiply(temp);
            System.out.println("Message is "+msg);
    }

  • Ok to use different versions of java?

    Hello,
    I installed jdk1.4.2_05 a while ago. I have since downloaded a jar file that requires java 5. Would it be ok to download and install this latest version and still have 1.4.02_05 running also?i,e, is it ok to have run different versions of java on the one machine. Would there be any conflicts etc?

    It's quite common to have multiple versions of Java on the same machine. Obviously you shouldn't install them in the same folder structure though.
    /j2sdk1.4.2_03 - contains version 1.4.2_03
    /j2sdkblah.blah - contains version blah.blah

  • Search Algorithm in Java

    Hey Guys,
    I have written a crude search algorithm which extracts 4 fields from a database table into the String type of Java. Then this String object is tokenized and then within these tokens I search for the text the user has used.
    Once, I faced this problem that one of the String pulled from the DB was so huge that I got the OutOfMemory exception. Simple stating it, the text was so big that my system could not store all that text in one String object.
    I resolved this by adding more heap to java by doing:
    java -Xmx512M MySearchClass
    Now I am afraid that if there is another HUGE text in the DB , I can still run out of memory.
    Do I just need to get MORE RAM to my system and allot really huge heap space, such as 4 GB or so , so that if need be, the JVM can use it ?
    Suppose I get a server machine with 4 GB RAM, at some stage I'd still have an upper limit on the amount of text I can extract from the DB, right ?
    Is there any other way to stream the text from DB and then search ? Remember that I am tokenizing the text in the algorithm, so I think I can't use a buffer, or can I ?
    thanks a ton !
    -AZ

    These are SQL queries. I use SQL queries to pull out the text in the DB and then store it in a String object. The problem is that the text in DB can get so huge that the String object cannot hold it anymore due to memory limits. The JVM gets assigned a heap size and the size of the String object can get really big to exceed the heap size.
    I used : java -Xmx512M MySearchClass
    That assigned 512MB to the JVM so I haven't encountered the OutOfMemory exception so far. But my guess is that for some other data set, the String can be so big that even 512MB might not be enough.
    This search algorithm will be deployed on a server class machine with about 4 GB RAM. So we can give JVM 4GB heap space to use. But its a limitation again , right ?
    These text in DB are extracted from PDF files.

  • JPG to JBIG Algorithm in JAVA

    Hi!
    I need to do the jpg to jbg compresion. (http://www.jpeg.org/jbig/)
    This is a bi-level fax compresion. I don't find any solution for it...
    I was looking at Markus Kuhn source code in c (http://www.cl.cam.ac.uk/~mgk25/jbigkit/), but I'm still in school and I don't have the knowledge to rewrite it into Java...
    I need to make an applet for that conversation (i get a jpg picture), I'm trying with IMageMagick (http://www.yeo.id.au/jmagick/) and servlet right now (not pure programing solution ;))
    Is there some other algorithms?? Perhaps in java (without native code)?
    Thanks!

    Take a look at the ImageIO stuff in java 1.4 and later.
    This is a pluggable framework for loading and saving images. By default it can load and save jpeg and tiff (which has a
    fax compression mode I believe).
    If not then you can obtain thrid party plugins for the framework that support your format (or you can write your own).
    If you wish to perform tasks such as colour conversion (convert the image to binary for example) then you may want to
    look at JAI. However that is probably overkill. You can perform many simple image processing tasks using Java 2D.
    matfud

  • Standard Algorithms in Java

    Hello everone,
    does someone of you know a collection of standard algorithms programmed in Java where you can download the examples
    (a kind of library or documentation)
    We are trying to standardize our code (e.g. complex loops and conditions) and this would be a great help!
    thanks a lot
    Julian

    hi,
    sorry for the misty question.
    I searched of the solution of quite common programming
    problems .
    meant to find something like that but it should be a little
    bit more complex:
    http://www.acknowledge.co.uk/snippets/java/docs/
    thank you
    Julian

  • Developing a Payroll System with NSD - A simpler algorithm in Java?

    Hi,
    I've been trying to develop a payroll system but I'm having some challenges on "trapping" the Night Shift Differential for all shifts.
    I'm from the Philippines and our NSD starts from 10pm - 6am by law.
    This payroll system is supposed to accept any shifts: day or night; 8-hour shifts, more or less than 8-hour shifts... making it dynamic in a sense.
    I've tried to evaluate each possible shift by start time and end time against the NSD's start time and end time. The result is a lot of "if-else" statements and some deep nesting.
    I'd like to know if there's a simpler algorithm for this in Java to "trap" the NSD from 10pm - 6am no matter what shift that "intersects" with it? Just so to have lesser complexity and better maintainability.
    Thanks.

    morphian wrote:
    abillconsl wrote:
    morphian wrote:
    Not yet. I'm still working on the codes for computations.Where's the data? If it is not in a database, then where is it?I'm using test cases.Okay ... where was I going with my line of questioning? ... It is just this - if you know where your data is coming from and what form it is in, it can make a difference in how you proceed.
    If you are working on Payroll data, nowdays it makes sense to imagine some relational DB containing the data. If that is the case, then knowing the structure of that data is absolutely paramount.
    For example - I really can't imagine doing this with times of day. In a well conceived DB structure, employees would likely be assigned some employee classification, based on a coding structure of some kind ... NS, DS, FT, PT ... etc. This might be broken down further by other classifications such as Primary vs Secondary job, salaried vs hourly workers, earning codes, whatever.
    So rather than working with times, you'd find the classifications of your employees and them perhaps add their hours or whatnot.
    So you see, it makes all the difference.
    ~Bill

Maybe you are looking for