anonymous
  • anonymous
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
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
Okay, 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
  • anonymous
just take the lexigraphical value of the string (ie. T-84, C-67, G-71, A-65) 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
  • anonymous
yes, the input string is of fixed length i.e 3 like TGC or TTT etc.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
umm can you tell me what is lexigraphical value ? :$
anonymous
  • anonymous
A 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
  • anonymous
ohh yes this is what i was thinking :) Thanks alot
anonymous
  • anonymous
i don't think there can be a perfect hash function for this problem :S Some collissions would be there :S
anonymous
  • anonymous
can you please help me with this ?? How to make a hash function with minimum number of collissions in this case ? :(

Looking for something else?

Not the answer you are looking for? Search for more explanations.