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.