Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Screech Group Title

Working on the OPT.2 Cyclic cipher. So far, the tricky part of the exercise is trying to understand the write-up. In step 3, it says "we want the values of the numbers to remain between 0 and 5". Why do we want this? The write-up doesn't explain. I would have thought that digits 0-9 would be wanted. What am I missing here ?

  • one year ago
  • one year ago

  • This Question is Closed
  1. snark Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    it's a toy example, their example alphabet is 012345, doesn't go as high as 6. They want the numbers to stay within 0-5 in the example. they could have choosen 0123456789, but didn't. replace the "we" by "them", as in them people want....

    • one year ago
  2. ravi_s Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    The modulus operator (%) in X % Y implies number 0 to Y-1. Multiples of Y will result in 0 as the result. For example if Y is 10, whenever X is 10, 20 , 30 or multiples of 10 the % will always result in 0. In other cases it is between 1 to 9. This is explained simply in the course material. 'A' to 'Z' goes from 65 to 91. 'a' to 'z' goes from 97 to 122 in ordinal values. One can calculate modulus separately depending on the values by using either 92 or 123 as Y ... Hope this helps?

    • one year ago
  3. FabienToune Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    This example doesn't relate to the "main" exercise, it's just a way to show how to cycle through an arbitrary number of element in a list. Thus, they use an example with 6 element so you can keep an eye on each of them. For the "main" cipher exercise, you'll have to do the same with 26 elements for lowercase and 26 elements for uppercase.

    • one year ago
  4. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    Thanks to all who clarified this. The exercise is very poorly written. Would have been helpful to reference the symbol alphabet being used and which would be encoded. Something like "Assume that the you will encode any of the 6 symbols "012345" when they occur in the input and that your input sequence is "012345". The initial line of the exercise indicates that it is tricky. I believe it is tricky mostly because it is poorly worded. I'll close out this question in awhile.

    • one year ago
    • Attachments:

See more questions >>>

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
  • 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.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.