[algogeeks] Re: Finding the repeated element

2011-11-24 Thread kunzmilan
On 24 lis, 09:09, kumar raja rajkumar.cs...@gmail.com wrote: @kunzmilan : i did not get  u, once explain with example... On 23 November 2011 23:47, kunzmilan kunzmi...@atlas.cz wrote: Matrix M 0 1 0 0 1 0 1 0 0 multiplied with M(T) 0 0 1 1 1 0 0 0 0 gives 1 0 0 0 2 0 0 0 0. On its diagonal

[algogeeks] Re: Finding the repeated element

2011-11-23 Thread kunzmilan
repeats. kunzmilan -- 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+unsubscr...@googlegroups.com. For more options, visit

[algogeeks] Re: Divide 2 nos. without DIVISON

2011-05-22 Thread kunzmilan
, and repeat adding zeroes, if necessary. kunzmilan -- 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+unsubscr...@googlegroups.com

[algogeeks] Re: unique number in an array

2010-06-14 Thread kunzmilan
Write the array as a vector string S, eg (1,0,0,0...) (0,0,1,0...) (0,0,0,1...) etc. Find the quadratic form S^T.S. On its diagonal, occurences of all numbers are counted. kunzmilan On 13 čvn, 20:44, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote: give an algo to find a unique number in an array

[algogeeks] Re: An interview question

2009-12-23 Thread kunzmilan
for it. The adjacency matrix A shows all paths between vertices of lenghts 1. Its powers A^n shows all paths between vertices ij of length n. kunzmilan -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge

[algogeeks] Re: How to find number of Cycles in a Graph...

2009-11-06 Thread kunzmilan
. kunzmilan -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.

[algogeeks] Re: 100!

2009-10-15 Thread kunzmilan
On 10 říj, 21:54, vicky mehta...@gmail.com wrote: find some of all the digits in number-100! Any n!, n 100, has at least 22 zeroes on its end. kunzmilan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm

[algogeeks] Re: Traversing a binary tree from bottom to top

2009-10-03 Thread kunzmilan
it? There exists the Pruefer algorithm for trees, based on their pruning, expressing trees as strings of symbols. It is valid also for binary trees. kunzmilan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group

[algogeeks] Re: find triangle in a graph

2009-09-06 Thread kunzmilan
On 6 zář, 11:28, ankur aggarwal ankur.mast@gmail.com wrote:  google question : find triangle in a graph Given an undirected graph, design a O(V+E) algo to detect whether there is a triangle in the graph ot not. This problem can be solved by finding polynomial of the graph. kunzmilan

[algogeeks] Re: how to select a set of strings that are most dissimilar?

2009-04-10 Thread kunzmilan
, they should correspond to negative binomial distribution. kunzmilan --~--~-~--~~~---~--~~ 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] Re: Enumerating trees

2008-05-17 Thread kunzmilan
Wiener. And it is known as Wiener number. In chemistry, more important that the number of binary trees is their total length, sum of distances between vertices. kunzmilan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[algogeeks] Re: Plannar graph

2008-04-04 Thread kunzmilan
be linear, planar, and generally n-dimensional. Even graphs have this property. K(4) can be a square with both diagonals, a triangle with axes ending in its center, and as a tetrahedron. These forms have different distance matrices with different eigenvalues. kunzmilan

[algogeeks] Re: Plannar graph

2008-03-25 Thread kunzmilan
. Newertheless, as tetrahedron, it is not planar. To both forms, different distance matrices belong. kunzmilan --~--~-~--~~~---~--~~ 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: Plannar graph

2008-03-24 Thread kunzmilan
On 17 Bře, 10:38, sp1 [EMAIL PROTECTED] wrote: How to test an given graph is plannar? The answer gives its distance matrix. When distances between vertices of the graph are squared, the distance matrix of a plannar graph has only 4 nonzero eigenvalues. kunzmilan

[algogeeks] Re: factorial

2008-02-13 Thread kunzmilan
On 13 Ún, 03:17, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: how will u find the number of digits in the factorial of a number without finding the factorial?? Try Stirling formula. Rougly nlogn. kunzmilan --~--~-~--~~~---~--~~ You received this message because

[algogeeks] Re: Testing if 3 points form a triangle

2007-06-17 Thread kunzmilan
On Jun 4, 10:56 pm, Feng [EMAIL PROTECTED] wrote: Hi Kunzmilan, thanks for your idea of using distance matrices. But one of my friends came up with a seemly counter-example: Take 3 collinear points in 2D: (0,0), (1,0), (2,0). The distance matrix is: 0 1 4 1 0 1 4 1 0, whose eigenvalues

[algogeeks] Re: Derangements

2006-09-22 Thread kunzmilan
Write permutations as matrices, e.g. (0,1,0,0) (0,0,1,0) (0,0,0,1) (1,0,0,0). You need only one operation to get 1,2,3,4. kunzmilan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post