For problem 6.8 I was wondering if there were some assumptions that should be made that aren't defined in the problem.
For example, are we supposed to assume that the number of robots that the EMP is capable of destroying increases with j? I couldn't find in the problem anywhere that states that this value should be increasing over time other than the implied concept that it is "charging" so the capacity for destruction should increase with time.
This might be a loophole in the problem, so I wanted to double check with everyone else before committing my solution and counter example to this concept.
Also, I was wondering if the pseudocode should say "Activate in the jth second instead" of "Activate in the nth second"? This is implying that the EMP is always detonated on the last second if I'm interpreting it correctly, not sure if this is what they intended or if I am simply misinterpreting the code.
Yes, I was confused with the nth second as well, but when I followed the alg, it eventually made sense to me. So I figured the alg calcs the time backwards. So it just "sends" a signal activate(4th sec), activate(3rd sec), activate(1st sec) (and then the "execution alg" will sort the time out).
Never mind, I think I've figured out the problem that I was having. The algorithm does indeed work backwards and the assumption that the EMP does increase its killing capacity over time is somewhat irrelevant with the correct algorithm.
Java would be fine. I didn't specify, so feel free to inquire about other languages.
Here are some ideas: http://en.wikipedia.org/wiki/LOLCODE http://en.wikipedia.org/wiki/Brainfuck http://en.wikipedia.org/wiki/Piet_(programming_language)
For problem 6.8 I was wondering if there were some assumptions that should be made that aren't defined in the problem.
ReplyDeleteFor example, are we supposed to assume that the number of robots that the EMP is capable of destroying increases with j? I couldn't find in the problem anywhere that states that this value should be increasing over time other than the implied concept that it is "charging" so the capacity for destruction should increase with time.
This might be a loophole in the problem, so I wanted to double check with everyone else before committing my solution and counter example to this concept.
Also, I was wondering if the pseudocode should say "Activate in the jth second instead" of "Activate in the nth second"? This is implying that the EMP is always detonated on the last second if I'm interpreting it correctly, not sure if this is what they intended or if I am simply misinterpreting the code.
Yes, I was confused with the nth second as well, but when I followed the alg, it eventually made sense to me. So I figured the alg calcs the time backwards. So it just "sends" a signal activate(4th sec), activate(3rd sec), activate(1st sec) (and then the "execution alg" will sort the time out).
DeleteNever mind, I think I've figured out the problem that I was having. The algorithm does indeed work backwards and the assumption that the EMP does increase its killing capacity over time is somewhat irrelevant with the correct algorithm.
DeleteFor "code up a working implementation" part, just JAVA right?
ReplyDeleteJava would be fine. I didn't specify, so feel free to inquire about other languages.
ReplyDeleteHere are some ideas:
http://en.wikipedia.org/wiki/LOLCODE
http://en.wikipedia.org/wiki/Brainfuck
http://en.wikipedia.org/wiki/Piet_(programming_language)
If we write... er... draw it in Piet, can we get an extension?
Delete