Ask your homework questions to teachers and professors, meet other students, and be entered to win $600 or an Xbox Series X 🎉Join our Discord!



Numerade Educator



Problem 34 Hard Difficulty

Exercises 33–37 deal with a variation of the Josephus problem described by Graham, Knuth, and Patashnik in [GrKnPa94]. This problem is based on an account by the historian Flavius Josephus, who was part of a band of 41 Jewish rebels trapped in a cave by the Romans during the Jewish Roman war of the first century. The rebels preferred suicide to capture; they decided to form a circle and to repeatedly count off around the circle, killing every third rebel left alive. However, Josephus and another rebel did not want to be killed this way; they determined the positions where they should stand to be the last two rebels remaining alive. The variation we consider begins with n people, numbered 1 to n, standing around a circle. In each stage, every second person still left alive is eliminated until only one survives. We denote the number of the survivor by J(n).
Use the values you found in Exercise 33 to conjecture a formula for $J(n) .\left[\text { Hint: Write } n=2^{m}+k, \text { where } m \text { is a }\right.$ nonnegative integer and $k$ is a nonnegative integer less than $2^{m} . ]$


$J\left(2^{m}+k\right)=2 k+1\left(\text { when } k<2^{m}\right)$


You must be signed in to discuss.

Video Transcript

So from the previous exercise, we got some calculated results. I've written about half of them here. And so the hint here is to re write n right of Jason and as right, all these values instead as to do the M plus K. So what exactly does that mean? For example, for J of one, Will one in this form is gonna be equal to J 2 to 0 power. It's unequal one plus zero. Okay. And so than this Jade of the two would be equal to two to the first power plus zero cancer than J three. We're right, three. That form will get to to the one which gives us two plus one and for four and do the same thing. This is gonna be two to the power of two plus zero, and so can do these. We could be right. All of these in this way. Okay, so five is gonna be Thio two plus one j six gonna be equivalent thio too. Cuss too. Seven can be rewritten as two to the two plus three ever. Then we get to eight. It's gonna be just two to the three. It cost zero and nine by summer vein is two to the three plus one. So the idea that we can continue that of lay down So we wanted to translate that to an equation, right? So if this is equal to one 123 so on one of these also equal to this is equal to two times zero. Post one is equal to two times zero plus one sequel tube two times one plus one. Okay, so Jay four was equal. One. It's a gun. We have two times zero plus one cancer. Then here, this is able to three ce again. That is two times in a different way. We should try to be consistent. So you have two times one plus one. I asked the winner Sequel of 52 times two plus one. Okay, so what's happening is when and is equal to two to the M plus K, then jaded to the, um plus K and being equal to two times K plus one four k less than to do tm right. So he was 000 zero but one at 10 zero dresses matching up a little match up through all 16 options solutions from the previous problem