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

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.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions.

A community for students.

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
See more answers at brainly.com
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.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this and thousands of other questions

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?
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
yes, the input string is of fixed length i.e 3 like TGC or TTT etc.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

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

Not the answer you are looking for?

Search for more explanations.

Ask your own question