A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 5 years ago
umm well a string of three characters ( T,C,G,A) , from among these, will be given to the hash function which will generate an index. Can i simply do something like this, if the input is TTT index is 0 , if TCT , index is 1 and so on
anonymous
 5 years ago
umm well a string of three characters ( T,C,G,A) , from among these, will be given to the hash function which will generate an index. Can i simply do something like this, if the input is TTT index is 0 , if TCT , index is 1 and so on

This Question is Closed

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0Okay, you have 4 distinct characters and a hash function. You input a string, of a certain length and only containing only those characters, into this hash function Now, is the input string of fixed length? Like is it always three characters long?

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0just take the lexigraphical value of the string (ie. T84, C67, G71, A65) add them all together (if string is "AAA" then 65+65+65) and then modulo (%) that result by the size of your hash table. (if hash table has index size of 10 then result%10) and thats your index

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0yes, the input string is of fixed length i.e 3 like TGC or TTT etc.

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0umm can you tell me what is lexigraphical value ? :$

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0A character's ASCII value: http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters ChadBro's hash function is sufficient, though not perfect. This is because you can have two inputs that have the same group of characters but in different ordering. In other words, TAG and GAT would collied.

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0ohh yes this is what i was thinking :) Thanks alot

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0i don't think there can be a perfect hash function for this problem :S Some collissions would be there :S

anonymous
 5 years ago
Best ResponseYou've already chosen the best response.0can you please help me with this ?? How to make a hash function with minimum number of collissions in this case ? :(
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.