@Anil : is there any reason in taking 31 in function pow(31,x) ?..... On Wed, Sep 14, 2011 at 10:31 AM, AnilKumar B <akumarb2...@gmail.com> wrote:
> Hi, > > Can we define a bijective function from set(strings) ------> Q? > > I thought of using a polynomial function, for example: > > > f(ANIL)=pow(31,0)*ASCII(L)+pow(31,1)*ASCII(I)+pow(31,2)*ASCII(I)+pow(31,3)*ASCII(A), > > In this f will be one-one from set(Strings)------->N, but I don't whether > is onto or not? And one more thing for all combinations of Strings the > output of this hash function might be >9,223,372,036,854,775,807, which > cannot be represented in JAVA. > > So is it possible to define a bijective from Set(Strings)---->Q? > > Thanks & Regards, > B Anil Kumar. > > -- > 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 this group at > http://groups.google.com/group/algogeeks?hl=en. > -- **Please do not print this e-mail until urgent requirement. Go Green!! Save Papers <=> Save Trees *BharatKumar Bagana* **http://www.google.com/profiles/bagana.bharatkumar<http://www.google.com/profiles/bagana.bharatkumar> * Mobile +91 8056127652* <bagana.bharatku...@gmail.com> -- 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 this group at http://groups.google.com/group/algogeeks?hl=en.