algorithm

Evaluating execution flow for visual programming languages

I'm reading about visual programming languages these days. So I've thought up two "paradigms". In both of them, you have one start point, and several end points. Now, you could either begin at the start point or move in reverse from the end points (the order of end points is known). Beginning from the start point feels weird, because y...

String searching algorithms in Java

Hi all! I am doing string matching with big amount of data. EDIT: I am matching words contained in a big list with some ontology text files. I take each file from ontology, and search for a match between the third String of each file line and any word from the list. I made a mistake in overseeing the fact that what I need to do is no...

difference between hamiltonian path and euler path

Can some one tell me the difference between Hamiltonian path and euler path. Both seems similar! Thanks & Regards, Mousey ...

Extending Sugiyama's Layout Algorithm for block with more than one input

I'm messing around with using Sugiyama's directed graph layout algorithm to generate nice plots of verilog circuits. The problem I'm having is that the layout algorithm assumes that each block (or vertex) has only one input or output edge. But real circuits can have blocks that have multiple input and output connections, which ideally re...

Help with connected outlines

I'm making a vector drawing application. I use this algorithm to generate outlines. This algorthm works well, except it does not close the outline as seen here: I'm not sure what I should do to ensure that it always closes the outline. I tried inserting the last vertex at position[0] in the std::vector but this did not help. DOUBLEPO...

Finding the vector between 2 vectors (2D)

Lets say for example I have the following 2 vectors: *B *A The vector I would want would be C *C *B *A What I'm trying to do is generate square outlines. I use 2d slurp: where v0 would be A and v2 would be B. Right now I use sslerp2D to make round edges but I also want regular square edges hence why I want to...

SQL based data diff: longest common subsequence

I'm looking for research papers or writings in applying Longest Common Subsquence algorithm to SQL tables for obtaining a data diff view. Other sugestions on how to resolve a table diff problem are also welcomed. The challenge being that SQL tables have this nasty habit of geting rather BIG and applying straightforward algorithms designe...

ID3 algorithm for corner detection C#

How would the FAST corner detection algorithm be implemented in C#? Here is what I understand about it. It uses the ID3 algorithm to generate candidate pixels to be analysed for corner detection, then places raster circles of a 3 pixel radius around these candidate spots. The circle production is fine, but I cannot yet understand the ID3...

Distorting a polygon (Like Photoshop's distort) (Perspective Transformation)

In Photoshop there is a tool that allows the selection to be "Distorted". This allows easy shadow creation among other things. How could this sort of distortion be applied for a polygon (a bunch of points)? Thanks ...

Red Black Tree for Sorting

The worst-case running time of insertion on a red-black tree is O(lg n) and if I perform a in-order walk on the tree, I essentially visit each node, so the total worst-case runtime to print the sorted collection would be O(n lg n) I am curious, why are red-black trees not preferred for sorting over quick sort (whose average-case running...

how to test a perfect optimise algorith

when we write any algorithm is there any way to test is it optimised? ...

Algorithm books

Possible Duplicate: What book to use to learn Algorithms and Data Structures ? Someone can suggest me a good book on advanced algorithms and advanced programming techniques? ...

Array of undefinite length..

how to find a random element in a sorted array of unknown length. ...

How to find two disjoint spanning trees of an undirected graph

Is there any applicable approach to find two disjoint spanning trees of an undirected graph or to check if a certain graph has two disjoint spanning trees ...

Selecting k sub-posets

I ran into the following algorithmic problem while experimenting with classification algorithms. Elements are classified into a polyhierarchy, what I understand to be a poset with a single root. I have to solve the following problem, which looks a lot like the set cover problem. I uploaded my Latex-ed problem description here. Devising...

Perspective and Bilinear transformations

I'm making a vector drawing application and noticed that Anti Grain Geometry have an example that does exactly what I want. http://www.antigrain.com/demo/index.html then below there is an example on perspective for Win32. I don't understand their cpp file. Based on this example. If I have a bunch of verticies to form an object, like thei...

How to count the number of occurences of urls and hyperlinks in a Ruby string?

Say a user submits this comment on a blog: @SO - Great community, but we've also seen some great communities at Stack Overflow. At the same time Google's Gmail (http://gmail.com) is a great example of a community with endless bounds. I'm just wondering if anyone will really go toe-to-toe with something like http://www.t...

How can I change this raycasting algorithm to not go diagonally?

// Arg0 - Map, Arg1 - X, Arg2 - Y, Arg3 - Distance, Arg4 - MaxDistance var xx,yy,dist, x1, y1, dir, maxdist, obj, res, map; map = argument0 x1 = argument1 y1 = argument2 dir = argument3 maxdist = argument4 dist = 0 do { dist+=1 xx = x1+round(lengthdir_x(dist,dir)) yy = y1+round(lengthdir_y(dist,dir)) }...

A particular problem with btree insertion.

I have been playing with the very cool btree applet at slady.net. I'm having trouble understanding a particular behavior. Take a look at this starting state: This particular state was arrived at by inserting the following sequence: 10, 15, 30, 16, 70, 1, 9, 27, 45, 50, 55. My question is regarding what happens to the [45, ] node whe...

what's bubble sort good at?

Possible Duplicate: What is a bubble sort good for? I'am sure every algorithm has its advantage and disadvantage, so how about buble sort compared to other sorting algorithm? (ofcourse I hope the answer is other than "easy to learn") ...