[algogeeks] Re: what is total number of permutation

2007-07-20 Thread TheTravellingSalesman
I find the question to be quiet interesting actually. I'm just not to clear with one part of the question though You want the result something like this _ _ _ _ _ _ _ _ (8 spaces) where each space contains one of the sorted lists. WHat do you mean that both lists are sorted independently? D

[algogeeks] Implementation of Dijkstra and other shortest path problems.

2007-07-20 Thread TheTravellingSalesman
I'm using Java programming language and I'm trying to implement the shortest path algorithm. One thing I'm struggling with is how do I represent nodes and edges in Java. Don't know of too many Java classes for Graph theory. Also, what kind of data sturcture should I use. I was told that Queue is

[algogeeks] A Hard proof but makes intuitive sense

2007-07-20 Thread TheTravellingSalesman
Prove that there is a unique minimum spanning tree on a connected undirected graph when the edge weights are unique. === Makes intuitive sense but yet, I'm having a hard time trying to prove it. I tried induction but I'

[algogeeks] Re: IAUM - CCC4 Programming Contest (Persian)

2007-07-20 Thread Jayant
So, the obvious question, are non-Iranians allowed to take part? The announcement doesn't specifically rule that out. On 19 juil, 13:16, xy <[EMAIL PROTECTED]> wrote: > Persian Calendar Date: > Farvardin Ordibehesht Khordad Tir Mordad Shahrivar Mehr Aban Azar Dey > Bahman Esfand > > On 7/19/07, Ga

[algogeeks] Re: what is total number of permutation

2007-07-20 Thread Mike
Hi Rupesh, Despite the fact that the answer may not help you, my colleagues and I worked on this problem today. The closed-form solution for two lists of size n is as follows: The number of possible permutations, following your original instructions, are: P(n) = (2*n)! / (n!)^2 - (2*n)! / [(n-

[algogeeks] Re: Why we need prime numbers?

2007-07-20 Thread alberthendriks
Maybe an example will clarify this. Suppose I want to send a secret message to a mate and you want to crack the message. The key is a big number, which you intercepted. "Cracking" now means that you factorize that number. So for example, if my key is 24 and you find out that 24 is 2*2*2*3 then you