[algogeeks] String alignment

2006-02-07 Thread Mayur
Dear people, Problem 1.  A) I have a set of strings in the English alphabet. I need to find an arrangement where the strings are arranged one under another - and have the maximum common letters positioned together (looking vertically). e.g. ABCDE, BCAD, DABC, ACDBF. the output would be |    A  

[algogeeks] Re: Arrange Matrices In Order

2006-02-07 Thread siva
This is the solutions that I am able to arrive at. This generates all the permutations in the order required. but takes quite a lot of time for 6th generation. Need to check whether this solution can be optimized more. public class P2D { boolean usedr[][]; boolean usedc[][]; //temp matrix

[algogeeks] Re: Cormen Problem

2006-02-07 Thread Gene
This is a slick problem. Is it homework?

[algogeeks] Cormen Problem

2006-02-07 Thread rohit
Given two sorted arrays of length n, we need an O(lg(n)) algo that finds the median of the array of resulting from the combination of these two arrays. Thanks Rohit

[algogeeks] Re: recursion question

2006-02-07 Thread Gene
> VC7.1, with normal Release settings, will do tail end recursion for Thanks. I have only tried V5 and V6. Neither have I tried the new gcc that uses the single assignment intermediate form. Gene

[algogeeks] Boolean Grid Division into Rectangles, maybe DP-related?

2006-02-07 Thread Mallory Paine
Suppose you have a grid of size R * C of boolean values. What is the most efficient technique for dividing the grid into the smallest number of rectangles that include only false values? Obviously, there can be multiple solutions that solve the problem producing the same minimum number of rectangl

[algogeeks] Re: recursion question

2006-02-07 Thread wade
Gene wrote: > Indeed the C/C++ compilers I've used lately don't eliminate tail > recursion. GCC used to do it, but later versions don't seem to work. > MS Visual C has never worked. On the other hand, all functional > language compilers are similar in this respect to Scheme. They need to > be

[algogeeks] recursion issue

2006-02-07 Thread sam
Hi, Not sure I'm on the right forum for that, but here we go. I have a problem writing an algorithm for doing what I want. I have two simple SQL table that I need to show you in order to explain my problem: [Query] (QueryId, QueryName) [QueryLink] (QueryLinkId, QueryId, LinkedQueryId) Nothing sp

[algogeeks] Re: Arrange Matrices In Order

2006-02-07 Thread Karthik Singaram L
Thats the solution all right!!!

[algogeeks] Re: dynamic programming in tree

2006-02-07 Thread [EMAIL PROTECTED]
hi, could you explain the part -- Since these introduce strict inequalities, so you need rewrite rules for these too. But it all falls out by case analysis. thanks