subject

In computer science and mathematics, the josephus problem (or josephus permutation) is a theoretical problem. following is the problem statement: there are n people standing in a circle waiting to be executed. the counting out begins at some point in the circle and proceeds around the circle in a fixed direction. in each step, a certain number of people are skipped and the next person is executed. the elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom. given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle. the task is to choose the place in the initial circle so that you are the last one remaining and so survive. for example, if n = 5 and k = 2, then the safe position is 3. firstly, the person at position 2 is killed, then person at position 4 is killed, then person at position 1 is killed. finally, the person at position 5 is killed. so the person at position 3 survives. if n = 7 and k = 3, then the safe position is 4. the persons at positions 3, 6, 2, 7, 5, 1 are killed in order, and person at position 4 survives.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
How can we take picture in this app
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
You know the right answer?
In computer science and mathematics, the josephus problem (or josephus permutation) is a theoretical...
Questions
question
Mathematics, 13.11.2019 06:31
Questions on the website: 13722363