Library
Exercises
Games
Exams
Resources
Forum
News
Light
Log in
Sign up
Library
Exercises
Games
Exams
Resources
Forum
News
All courses
Library
Assignment: the Josephus problem
J(n) read off the binary expansion
MCQ
How is the base-2 expansion of J(n) deduced from that of n? (Question III.6 of the assignment.)
Possible answers
Move the leading 1 to the end: the expansion of J(n) is that of n rotated circularly one place to the left
Swap all the 0s and all the 1s in the expansion of n
Read the expansion of n backwards
Delete the last digit of the expansion of n
Log in to reply
Previous
Exercise 14 of 22
Next exercise
Report a mistake or suggest an improvement