Algorithm for pairing a single elimination tournament

6831 byte By bessetteea at 2007-10-1 12:11:13
While I was figuring out an algorithm for pairing players in a single elimination tournament, I searched everywhere to find someone who had already done it. However, I had to do it on my own because either no one has done it (hard to believe) or no one wants to post it. So this is what I came ...

Biometric Image Comparision

156 byte By dhamodharana at 2007-10-1 12:11:24
Hi All How do I compare biometric finger print in J2EE server. Is there any JAVA API exists to compare finger prints.Thanks in advance.

Dynamic Runtime Loading

817 byte By Koeninga at 2007-10-1 12:12:22
Hi to everyone! I'm trying to make a dynamic runtime like this:Class myClass = Class.forName(args[0]);Method myMethod = findMainMethod(myClass); // findMainMethod makes me get the main method of myclassmyMethod.invoke(null,new Object[] {args} );When I use the method "Invoke" I have to ...

Reconstructing a Binary Tree

564 byte By Servant@AKa at 2007-10-1 12:17:11
Hi guys ;I have a BST class .One of its methods is preorder travesal.this method traverse theBinary tree in preorder and prints nodes data to a file.Now what i want to do is to be able to construct the binary tree by reading data from this file : keeping in mind the data nodes were saved to ...

Texas Hold'Em win algorithm

281 byte By CbbLea at 2007-10-1 12:25:24
HiIm making a online poker game and need help to decide which hand won in the end.Lets say all the players cards are stored in a twodimensional array, LinkedList or something similar. Anyone got a good algorithm?I appreciate all help I can get :)

Shortest Path Algorithm. Need help.

894 byte By theGuy1981a at 2007-10-1 12:25:33
Hey, Im having trouble coming up with an algorithm for a shortest path. I have an NxN weighted matrix and need to get from the upper left corner to the lower right corner. The length of the path must be the shortest possible for the number of moves and total weight (ie. a 3X3 matrix would use 4 ...

I need your help analyzing this algorithm

1431 byte By darklord12a at 2007-10-1 12:33:34
I have the following algorithm for evaluating a polynomial and I must find the total number of multiplications and the number of additions made by this algorithm//This algorithm computes the value of polynomial P at a given point x//Input: P[0..n] of the coefficients of a polynomial of degree ...

sound codec in java (adpcm)

406 byte By StefanowitschSa at 2007-10-1 12:38:51
Hi there!I'm currently trying to decode (and later encode) IMA ADPCM. My program runs without any error.The result is recognizable but it has some peaks in it and it's hissing.Is there anyone with some hints where the flaw may be?Or with useful links regarding sound-codecs?I can also mail the ...

reading large log files

455 byte By lilosjavaa at 2007-10-1 12:42:54
Hi... is there anybody that can suggest an idea to implement an efficient algorithm to read large log files.Obviously I have already tried with the BufferedReader... I read every line, parse it etc.But with large text files i get an Out of Memory Error.In addition to this, i also need to ...

Recursion

738 byte By bjorn__029a at 2007-10-1 12:47:13
Hello programmers,I'm from Belgium and have a question about recursion.Maybe (hopefully) you can help me.I have to program 2 functions in java (or C++, whatever).Function1:void Rotate(int T[ ], int N);This function should Rotate the array T[] over 1 step from N elements.before: ...

All combinations of paths in a weighted graph!!

397 byte By warrenba at 2007-10-1 12:50:08
I really need some help!! I'm trying to find all the possible paths between any two given nodes(vertices). I've used recursion and can find one or two paths, but with recursion, the data on the stack doesn't seem to be kept(ie. when iterating through the adjacent edges of some node)Is it ...

creating a graph with java XML parser

323 byte By gionnyDeepa at 2007-10-1 12:51:43
hi allI'd like to create a graph data stucture defining data relation with an xml.Exists anything usefull?What I want is defining bidirectional relation with two or more elements in an xml file.after that i want to create a java data structure that define the graph tree.any ...

Integer.bitCount

454 byte By toshihiroa at 2007-10-1 12:53:06
Public static bitCount(int value){i = i - ((i >>> 1) & 0x55555555);i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);i = (i + (i >>> 4)) & 0x0f0f0f0f;i = i + (i >>> 8);i = i + (i >>> 16);return i & 0x3f; }I would love to have ...

Algorithm exam revision

400 byte By Meshuggaha at 2007-10-1 13:02:23
To be fair maths was never my strongest subject. I've got an exam on Algorithms coming up and I'm pretty sure I'll be asked for the time complexity (using big-O notation) for a Java code fragment.For example one question in my past paper is:count = 0;for (int i -0; i < 4 * n; ...

byte array to Integer array needs speed up

920 byte By Devvalda at 2007-10-1 13:02:54
Hello!I need to translate a byte array to an integer array as fast as possible. Every chunk of three bytes in the bytearray represents an Integer value. Here's in code what I want to do:public static Integer[] byteArrayToIntegerArray(byte[] b){Integer[] retval = new Integer[b.length / ...

How to make action on each word in the label?

1329 byte By haroonfoada at 2007-10-1 13:13:25
I have a label in the frame I want to make mouse event if the user click on the first word . and onther action if he pressed on the word and so on?I make mouseListener but I do not how to implement this thing.This is the code.import java.awt.event.*;import java.awt.*;import javax.swing.*;public ...

ocr

237 byte By Kmr9hofr6a at 2007-10-1 13:23:01
HiI want to implement a optical character recognition program, but don`t know how to start.The program should be able to read an image that shows a word and returns the word as a string.Can you help me please?

sorts algorithms

1497 byte By LeslieH1974a at 2007-10-1 13:28:39
hi all, im trying to run two sorts: insertion & bubble sort against an array to see which runs better. what i've come up with so far for my insertion sort is:for (int x= 0; x< sampleArray.length; x++) {for (int k = x; k > 0; k--) {if (sampleArray[k-1] > sampleArray[k]) {int swap = ...

Algorithmic question

158 byte By nETbKAa at 2007-10-1 13:33:15
Directed graph is called "bycicle" if it contains at leat two disjoint cycles. What algorith will answer that question in O(|V|+|E|) ?Thank you.

NLP English query

272 byte By potiyana at 2007-10-1 13:38:02
I have to implement a query module in java which will support plain english text queries like " who are the employees of this company? " I do not have any experience in NLP. Please help me, how should I approach this problem.Thanks,Deepu

rank sort algorithm

123 byte By java_001a at 2007-10-1 13:53:31
hi,help me out!!1please any one give me the code of rank sort alogrithmThanx and Regards

Reg Licensing A software

321 byte By VMurugana at 2007-10-1 13:55:45
Hi,I would like to develop a licensing software for an application created using swings.Is it possible to create a licensing software using java.If so can u give detailed description and the way in which i have to proceed.Also how to do the installation of Java ...

Directed Graph Problem

435 byte By Li_Xia_Era at 2007-10-1 14:19:44
What I want to achive is when given a directed graph, find out if there is one node that can reach every other node and if there is one node that can be reached by every other. Time complexity should be O(n+m).I'm into finding all strongly connected parts in the graph and then check the ...

Java Regular Expression

316 byte By Kitha at 2007-10-1 14:36:20
Hi All, Please answer my question , i will explain it with example. String txt = "nithEOoREOR nitho EOR";From this string i need to extractnithEOoRI need to get this from the group() of Matcher.simply i need a pattern which get chacters before EORThanks, ...

it seems a simple algorithim but it trickey

789 byte By tamkaga at 2007-10-1 14:50:29
I have a an array of strings, which I want to convert it elements to particular values. Here is an example:original_array:__13 3_23_2_2 4 3 4_14_54_5_1 5 5_26 desired_array122_12_1_1 3 3_13_23_2_1 44_15it will be clearer if you would align the two array next to each otherto explain further, ...

What is Algorithms...

355 byte By PassionOfTheChrista at 2007-10-1 14:51:05
Hi all i have just started studying algorithms....Algorithmic mathematics provide a language for talking about program behaviourPerformance often draws the line between what is feasible and what is impossiblePerformance is yhe currency of Computingthese statements sound hazey to ...

A problem about the compression of directed graphs

1780 byte By mercury1231a at 2007-10-1 14:56:37
Right now I encountered a problem in my research that is about graph compressing (or contraction, etc.). I've searched in various ways for existing techniques on this problem and found nothing. I've been trying to figure out this problem by myself. However I would also like to seek some ...

Long FingerPrint using MessageDigest:-SHA1

1984 byte By kentkenta at 2007-10-1 15:20:29
Hi-yaI need a fingerprint algorithmn for files, and it would be convenient if it could fit in a long.I have implemented this algorithmn with MessageDigest:-SHA1. The general idea was that I would get the message digest of the array of bytes of the file then I would take the first 8 bytes and ...

Extracting five unique objects randomly from a list

172 byte By NewIngenua at 2007-10-1 15:39:01
Hi,The subject is pretty clear I guess.I am looking for an efficient algorithm to extract randomly five objects from a list.Thanks.David.

HashTable using vector

1086 byte By SeanDaDukea at 2007-10-1 15:46:02
I'm working on an assignment at Uni. I have to develop two implementations for Sets. I used hashTable for one and was able to write it all up and it works very well. I have used a Vector as an underlying storage array for the hash table (please forgive the layman/incorrect terms I'm using) ...

Need help in my compression program!!

4196 byte By _Bongo_a at 2007-10-1 15:53:33
Hi guys...i'm tryin to do a simplified version of winzip and was taking this chance to learn the compression packages..However,when i try to zip up the selected files using the interface,the program would produce a error...Pls help!!Guys..i realli need help!!import javax.media.*; import ...

anagrams

4179 byte By RogerTheRabbita at 2007-10-1 15:59:37
hi all!this is my first post here and i'm new with java.my problem is that I have this algorithm for generate anagrams for a word.it works great with words containing 4 or 5 letters but if the word have more than that it gets extremly slow :(the code:public class Anagrama { private String ...

Approximation "hash" for keys

1797 byte By gilroittoa at 2007-10-1 16:12:18
I wonder if there is any memory and time efficient way to achieve a approximation "hash" algorithm that produces a hash that roughly represents any key.KeyKey might be byte[] or char[] or similar.HashHash is best represented by a fixed type, e.g. int.Hash function has the following properties:* ...

Travelling Salesman Problem

52 byte By Java_Heavena at 2007-10-1 16:23:19
Has anyone written a TSP application in Java?

Optimized Time table generator algorithm

1350 byte By cifroesa at 2007-10-1 16:27:15
Hi,I want to do a time table generator program for my school. I have to follow some rules:There can't be classes in the same room at the same time. A teacher can't give more than 1 class at the same time. Classes should be assigned to allowed rooms only (lab-classes versus theory classes). ...

Cloud of Points Tree /Nearest Neighbor

2412 byte By Servant@AKa at 2007-10-1 16:28:52
Hi guys;I'm using a binary tree to construct a tree of two dimensional points .here is how i construct the tree :the tree is constructed by successive subdivision of the Plan by semi-Lines accross a given point.the first subdivision is done by say a horizantal line across a given point.the ...

Time complexity of suffix tree

130 byte By hiJavaa at 2007-10-1 16:32:46
Hi,Not sure about the time complexity of naive alogorithm. What is the best, avg, worst case? When will each happen?

i need to extract cities from a given document

754 byte By natoskiiia at 2007-10-1 16:37:29
hi all,i have stored the cities' names in the database so that i can use these records in extracting cities from any given document.what's the best way to do so?1- The simplest way is to get each single record(city name) and check whether it exists in this document or not, but this will take ...

Geo-data algorithms

303 byte By factor_dana at 2007-10-1 16:54:11
right now I have three files, a .shp , .dbf, and a .shx file that I need to convert into a JPG and I am having trouble finding anything on the Sun site or anything searching the web. Does anyone have any ideas on what I could do or where I could find some algorithms for ...

code completion

120 byte By vikashranjana at 2007-10-1 16:57:30
hi everyone . i am working on an editor using swing. i want to implementcode completion in it. please help

Matrix determinants

195 byte By bennisona at 2007-10-1 17:04:14
Hi, does anyone know of any working algorithms in Java that can compute the determinant of a matrix of arbitrary size?Thanks in advance for any help you can give.Tom Bennison

split a list in x parts (all possible combinations)

380 byte By UvAa at 2007-10-1 17:07:32
Dear all,suppose i have a list [1,2,3,4,5,6,7,8] and i want to split this list in 3 parts of all combinations. I will get:[1] [2] [3,4,5,6,7,8,9][1] [2,3] [4,5,6,7,8,9][1] [2,3,4] [5,6,7,8,9][1] [2,3,4,5] [6,7,8,9] etc..[1,2,3,4,5,6,7] [8] [9]Can anyone give me advice to tackle this ...

Help me, I have a picture. The picture paint a animal

281 byte By namson0382a at 2007-10-1 17:07:45
The picture have 2 basic colours(White and black). White is background.Black describe Animal. I try to use scan line algotithms and border fill to fill color into animal but it doesn't effect.Help me how to fill color into animal which not effect background ?

Bytework

446 byte By robbix.the.bobbixa at 2007-10-1 17:11:10
Could anyone help clear up some of the specifics on individual bytes and how they represent larger data types. For instance, if I have a byte[], how do I turn that into a short, int or long? How do I account for endianness and signedness?This question comes from maniuplating audio data where a ...

DCT of JAI for a not regular image

938 byte By ukmagicowa at 2007-10-1 17:17:04
Hi, I am new here. I am so glad to see so many talents in this forum. I am doing something in java using JAI, and I want to use the dct api such as // Load the source image.RenderedImage src = (RenderedImage)JAI.create("fileload", fileName);// Calculate a DCT image from the source ...

Lamport's Bakery Algorithm

979 byte By mdb47a at 2007-10-1 17:24:47
Several years ago, I took an OS course that discussed Lamport's Bakery Algorithm. It's described here http://nob.cs.ucdavis.edu/classes/ecs150-1999-02/sync-bakery.html (and google can provide many others). To this day, I still do not understand why the choosing[] array enables the algorithm ...

Need help for parsing html tables

2040 byte By rkma at 2007-10-1 17:27:30
Dear ppl,As you know the html file consists of tables which can contain nested tables like<table><tr><td> <table> <!-- this table is a logical table --><tr> <td>milk</td> <td><!--following table is cosmetic and is made invisible ...

An algo for creating numeric unque numbers

510 byte By Pankaj.Sanghia at 2007-10-1 17:29:02
I am creating a client application which would be used to load some data in the Oracle database residing at a central server. This client application needs to generate unique id(that can be only long values) for populating the database.How should we generate this unique id. I think that the ...

Shortest Path Algorithm with Djikstra

1054 byte By howsena at 2007-10-1 17:31:51
Hi all,im developing a shortest path searching techniques by using Djikstra's algorithm. My search space is very huge and it is about 100,000 nodes or we can call it Vertex. I store all the nodes and weight of edges in MySql as follows:From|To|PathCostA B2B A2A D9DA 9BC 7CB 7BE 5EB 5CD 5DC ...

TreeMap over Arrays

894 byte By AlexLamSLa at 2007-10-1 17:38:45
Have been working on my project which has a fairly large TreeMap<Point, Pixel> on it; it is often that subMap(Point, Point) would be called.Then in the process of profiling my code, I decided to write an ArrayMap<K extends Comparable><K>, V> which basically uses ...