[algogeeks] Re: nonverticle lines in plane

2006-03-08 Thread beelzebub
At x=0, we can find the visible line using O(n) calculations. WLOG, let line 0 be that line. Find intersection point of line 0 with every other line. The one with the lowest x-value is the first one that line 0 intersects with. This takes O(n) ops. Note that any line if visible, becomes invi after

[algogeeks] Re: need help help n help!!!

2006-03-08 Thread ajay mishra
@stefan  , ur idea seems correct to me.On 3/8/06, SPX2 <[EMAIL PROTECTED]> wrote: -- Ajay kr. Mishrahttp://ajay.mishra19.googlepages.comIIT KGP --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.

[algogeeks] Re: Place for discussing innovative software projects?

2006-03-08 Thread adak
Many projects have their own websites, and forums. Sourceforge.net and others like it, are good places to start, though. Adak --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to thi

[algogeeks] Re: WOW!!! see the real image of muhammad

2006-03-08 Thread adak
You can't possibly see the real image of Mohammad - or Jesus, or Moses, or Buddha, etc. There simply were no photographs, made, for any of them. No accurate drawings or paintings either that I have heard of. All of these came about afterward. Usually, a very long time after he and his immediate f

[algogeeks] Re: Place for discussing innovative software projects?

2006-03-08 Thread manu jose
THat is a good idea, just as he told everyone is not interested in all areas. U can be specific abt the idea .On 3/9/06, SPX2 < [EMAIL PROTECTED]> wrote:Be serious...what innovative software are you talking about,give examples.And ppl now are interested in furthere development of existingsoftware..

[algogeeks] Re: Place for discussing innovative software projects?

2006-03-08 Thread SPX2
Be serious...what innovative software are you talking about,give examples.And ppl now are interested in furthere development of existing software...no innovative stuff whatsoever.But if you want you can propose an ideea and if ppl like it mayb they'll join u in developing it --~--~-~--~-

[algogeeks] Re: may be greedy approach

2006-03-08 Thread SPX2
its actually called backtracking --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to

[algogeeks] Re: may be greedy approach

2006-03-08 Thread C Erler
For each student, form a bitstring of all the students whose shifts overlap this student's shift. Find the minimum number of such bitstrings needed such that their bitwise-or has all ones. You can then use a breadth-first search to determine the smallest subset. Try all combinations of one bits

[algogeeks] Re: optimal assignnment of program to tapes.

2006-03-08 Thread Karthik Singaram L
This is the problem of dividing a set into two such that the sum of their differences is minimum.This can be solved using dynamic programming as follows: algo: 1. Create an array of size L say Arr[L] and initialize to zeroes 2. Put Arr[0]=1 3. For each program Pi   Scan the array Arr from t

[algogeeks] Re: may be greedy approach

2006-03-08 Thread gcet
anybody have suggestion for above problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, sen

[algogeeks] Place for discussing innovative software projects?

2006-03-08 Thread Booted Cat
Hi algorithm geeks, Do you create innovative software projects? And in which online place do you discuss such projects with other innovative software developers? Best Regards, Yao Ziyuan --~--~-~--~~~---~--~~ You received this message because you are subscribed

[algogeeks] Re: nonverticle lines in plane

2006-03-08 Thread SPX2
the problem is strictly reffering to the slope of the lines,meaning the ratio ai/bi for line i. Hokay.So if we sort these lines first concerning thei're slope and then considering orientation. Actually if we denote with tetha=arctan(slope) we have 2 cases tetha between 0 and pi/2 orientation to

[algogeeks] Re: need help help n help!!!

2006-03-08 Thread SPX2
ajay what do you think of what i wrote ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send

[algogeeks] Re: XML Document Matching

2006-03-08 Thread SPX2
maybe some indexed structures associated to the big xml... you should search for algorithms on trees because in essence that is what a xml is,a tree --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

[algogeeks] Re: difference

2006-03-08 Thread Mattia Merzi
On 3/8/06, ajay mishra <[EMAIL PROTECTED]> wrote: > @mattia > i agree with u, its not a algo specific query as the group name suggests, > though here is what "Mr. Man Page" said IMHO it's a question that should not be sent to any mailing list: if you know what a malloc() is, it means that you ar

[algogeeks] Re: swap

2006-03-08 Thread manu jose
THat is correct . .On 3/8/06, Dhyanesh <[EMAIL PROTECTED]> wrote: Although perfectly valid, the first and third are subject to integer overflow. The second one is the safest of all. On 3/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: -- Manu Jose,mob :09844467453E-mail : [EMAIL PROTECTED]

[algogeeks] Re: difference

2006-03-08 Thread ajay mishra
@mattia  i agree with u, its not a algo specific query as the group name suggests, though here is what "Mr. Man Page" saidcalloc()  allocates memory for an array of nmemb elements of size bytes   each and returns a pointer to the allocated memory.  The memory is  set    to zero. malloc()  a

[algogeeks] Re: swap

2006-03-08 Thread Dhyanesh
Although perfectly valid, the first and third are subject to integer overflow. The second one is the safest of all.On 3/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

[algogeeks] Re: largest Number Smaller Than Given Number

2006-03-08 Thread Dhyanesh
Yes that is how it works. It gives previous lexicographic order.On 3/8/06, SPX2 <[EMAIL PROTECTED] > wrote:Dhyanesh im not very sure about previous permuatationThe question is. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[algogeeks] Re: swap

2006-03-08 Thread zavandi
On 3/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I could find only 3 > > 1) a= a+b;b=a-b;a=a-b; > 2) a= a^b;b=a^b;a=a^b; > 3) a= a*b;b=a/b;a=a/b; > > Did anyone get the fourth option Probably this one: a=a-b; b=a+b; a=b-a; --~--~-~--~~~---~--~~ You rec

[algogeeks] Re: swap

2006-03-08 Thread [EMAIL PROTECTED]
I could find only 3 1) a= a+b;b=a-b;a=a-b; 2) a= a^b;b=a^b;a=a^b; 3) a= a*b;b=a/b;a=a/b; Did anyone get the fourth option --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this gr

[algogeeks] Re: difference

2006-03-08 Thread Mattia Merzi
On 3/8/06, anil kumar N R <[EMAIL PROTECTED]> wrote: > hi friends, > can any one tell me what's the difference between malloc > and calloc? two people: "Mr. Man Page" and "Mr. Google". bye ! mattia. --~--~-~--~~~---~--~~ You received this messag

[algogeeks] swap

2006-03-08 Thread anil kumar N R
tell me the four methods for swapping two numbers without a third variable? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To

[algogeeks] difference

2006-03-08 Thread anil kumar N R
hi friends, can any one tell me what's the difference between malloc and calloc? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@

[algogeeks] Re: euicvalence tester...!!!!

2006-03-08 Thread Rana
It seems to be Union/Find problem. Google for "union find algorithm" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubs

[algogeeks] Re: XML Document Matching

2006-03-08 Thread Rana
May be online parsers rather than dom parsers will help.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from

[algogeeks] nonverticle lines in plane

2006-03-08 Thread gcet
hey duys...one more prob Given n nonverticle lines in the plane, labeled L1,,Ln with the ith line specified by the equation y = ai*x + bi. Assume that no three of the lines all meet at a single point. we say line Li is uppermost at a given x-coordinate x0 if its y-coordinate at x0 is grea

[algogeeks] optimal assignnment of program to tapes.

2006-03-08 Thread gcet
hey guys one more problem ...if anybody want to think on it.. Q. Assume that n program are to be stored on two tapes. let li be the length of tape need to store the ith program. Assume that sigma(li)< L, Where L is length of each tape. A programa can be stored on either of two tapes.if S1 is the s

[algogeeks] Re: significant inversion pairs

2006-03-08 Thread gcet
thank you for ur reply ajay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMA

[algogeeks] problem about MATROID...

2006-03-08 Thread gcet
hi all... new problem if wanna try..sorry about many problems Q. consider the system of seven points and seven lines (six line segment and one circle) shown in fig below.define the indepedence system M=(E,t) where E={a,b,c,d,e,f,g} and a subset S of E is in t if one of the following is true.

[algogeeks] Re: C++ question.

2006-03-08 Thread Arun
hi pramod, thanks for the direction. i didnt know abt function objects before.definitely helped me. On 3/2/06, pramod <[EMAIL PROTECTED]> wrote: you can have function objects, i.e., objects which behave likefunctions with overloading the () operator. Define a base class like"base_functor" and for e

[algogeeks] XML Document Matching

2006-03-08 Thread Varun Sharma \(Noida\)
Hi all, I need to match various attributes in 2 xml documents using come custom rules . These xml documents are really huge and have a very complex hierarchy. At present I am picking up attributes using xpath and then applying my rule objects in a chain to the selected attributes from both th

[algogeeks] Re: significant inversion pairs

2006-03-08 Thread ajay mishra
Check the attached source file i sent , it will work with a slight modification.On 3/8/06, gcet <[EMAIL PROTECTED] > wrote:hi all,try thisif u can help meQ.given a sequence of n distinct numbers a1,a2,.,an , a pair (ai,aj) is known as significant inversion if i2aj. give O(n lg n)algorithm t

[algogeeks] euicvalence tester...!!!!

2006-03-08 Thread gcet
hi all, please share ur ideas...if u have time :) 3. let a machine known as, equivalence tester, can determine whether two bank card correspond to the same account by taking two cards at a time as input and outputting whether they are equivalent. give an algorithm which invokes equivalence tester

[algogeeks] significant inversion pairs

2006-03-08 Thread gcet
hi all, try thisif u can help me Q. given a sequence of n distinct numbers a1,a2,.,an , a pair (ai,aj) is known as significant inversion if i2aj. give O(n lg n) algorithm to count the number of significant inversions in the given sequence thank you for ur time... sorry for reposting --