anonymous
  • anonymous
Pset3 Problem 3 I don't understand what the code is supposed to do? Can someone please explain in simpler terms?
MIT 6.00 Intro Computer Science (OCW)
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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

anonymous
  • anonymous
Here is link to the pset http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset3.pdf
anonymous
  • anonymous
I made the program without really knowing in full how the code works. I understand what the outputs should be and how to get em to output but I don't understand why the outputs are what they are.
Shriram
  • Shriram
on the last page of the link you posted, , it talks about substitution or finding matches, does that help in understanding the use of the output?

Looking for something else?

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

More answers

anonymous
  • anonymous
This is what I did http://dpaste.com/hold/528512/. Its kind of hard to explain I understand the syntax of how the program works but I guess what I don't understand is the mathematics on how the n+m+1==k gives you possible solutions
anonymous
  • anonymous
sorry forgot to say in my program its if n+length+1==k but yea thats the part I don't understand.
Shriram
  • Shriram
i'm looking at it now. one sec
Shriram
  • Shriram
i'm starting to think that n+m+1=k might not be true for all possible situations especially empty string and "blah blah.. " case
anonymous
  • anonymous
but thats what it said to do in the pset directions. Can you explain what it actually does to me because I only put it in because thats what the directions said I have no clue what it means.
Shriram
  • Shriram
let's take the example 'a' and 'gc' 'a' is at index 5 , and 5+ (length of a)+ 1 gives 7 the index of gc in the target string or the large string " ATGACATGCA"
Shriram
  • Shriram
does this help any?
Shriram
  • Shriram
first tuple really is ( 0,3,5,9) and 0,3,9 don't satisfy the condition n+m+1 = k - > 0+1+1, 3+1+1, 9+1+1 -> 2,5,11 is not equal to 7 (index of gc in the target string)
anonymous
  • anonymous
yes this somewhat helps how would I fix it so that it doesn't give wrong answers?
Shriram
  • Shriram
what part of n+m+1 = k doesn't help at the moment? what input gives you errors? is that input appropriate at all? Remember it says split the key string into two parts
Shriram
  • Shriram
i looked at the code in http://dpaste.com/hold/528512/ you can remove "count" from subStringMatchExact function

Looking for something else?

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