Daily logic 8

Logic Level 2

100 people stand in a circle in order 1 to 100. No. 1 has a sword. He kills the next person (i.e. No. 2) and gives the sword to the next living person (i.e. No. 3). All people do the same until only 1 survives. Which number survives to the end?


The answer is 73.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

This is the classic Josephus Problem

This question was just asked, with the same parameters, under the title movie question .

circle = Range [ 100 ] ; While [ Length [ circle ] > 1 , circle = Drop [ RotateLeft [ circle ] , 1 ] ] ; circle { 73 } \text{circle}=\text{Range}[100];\text{While}[\text{Length}[\text{circle}]>1,\text{circle}=\text{Drop}[\text{RotateLeft}[\text{circle}],1]];\text{circle}\Rightarrow \{73\}

The following English description, using Google Translate, translates using to both Hindi and Arabic and then return translation to English.

Make a list of 100 numbers.

Repeat the following process until there is only one number remaining: move the first number to the other end of the list (the person lives) and then remove the first number of the list (the person dies).

Show last number.

This line of Wolfram Mathematica code models the described process until completion. It is a "computer simulation." The program can be written easily in many computer languages.

Here are the Hindi, Arabic and Russian translations of the process description.

100 नंबरों की सूची बनाएं।

निम्नलिखित प्रक्रिया को तब तक दोहराएं जब तक कि केवल एक संख्या शेष न हो: पहले नंबर को सूची के दूसरे छोर पर ले जाएं (व्यक्ति रहता है) और फिर सूची के पहले नंबर को हटा दें (व्यक्ति मर जाता है)।

अंतिम संख्या दिखाएं।

تقديم قائمة من 100 أرقام.

كرر العملية التالية حتى يتبقى رقم واحد فقط: انقل الرقم الأول إلى الطرف الآخر من القائمة (الشخص الذي يعيش) ثم أزل الرقم الأول من القائمة (يموت الشخص).

إظهار الرقم الأخير

Составьте список из 100 номеров.

Повторяйте следующую процедуру, пока не останется только один номер: переместите первый номер на другой конец списка (человек жив), а затем удалите первый номер списка (человек умирает).

Показать последний номер.

The first part of the process just removes the even numbered positions. Starting with the first return of person 1 to the first of the list, i. e., he has the sword:

{ 1 , 3 , 5 , 7 , 9 , 11 , 13 , 15 , 17 , 19 , 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 } { 5 , 7 , 9 , 11 , 13 , 15 , 17 , 19 , 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 } { 9 , 11 , 13 , 15 , 17 , 19 , 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 } { 13 , 15 , 17 , 19 , 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 } { 17 , 19 , 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 } { 21 , 23 , 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 } { 25 , 27 , 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 } { 29 , 31 , 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 } { 33 , 35 , 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 } { 37 , 39 , 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 } { 41 , 43 , 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 } { 45 , 47 , 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 } { 49 , 51 , 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 } { 53 , 55 , 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 } { 57 , 59 , 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 } { 61 , 63 , 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 } { 65 , 67 , 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 } { 69 , 71 , 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 } { 73 , 75 , 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 } { 77 , 79 , 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 } { 81 , 83 , 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 } { 85 , 87 , 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 } { 89 , 91 , 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 } { 93 , 95 , 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 } { 97 , 99 , 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 } { 1 , 5 , 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 } { 9 , 13 , 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 } { 17 , 21 , 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 } { 25 , 29 , 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 } { 33 , 37 , 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 } { 41 , 45 , 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 } { 49 , 53 , 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 } { 57 , 61 , 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 } { 65 , 69 , 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 , 57 } { 73 , 77 , 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 , 57 , 65 } { 81 , 85 , 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 , 57 , 65 , 73 } { 89 , 93 , 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 , 57 , 65 , 73 , 81 } { 97 , 1 , 9 , 17 , 25 , 33 , 41 , 49 , 57 , 65 , 73 , 81 , 89 } { 9 , 17 , 25 , 33 , 41 , 49 , 57 , 65 , 73 , 81 , 89 , 97 } { 25 , 33 , 41 , 49 , 57 , 65 , 73 , 81 , 89 , 97 , 9 } { 41 , 49 , 57 , 65 , 73 , 81 , 89 , 97 , 9 , 25 } { 57 , 65 , 73 , 81 , 89 , 97 , 9 , 25 , 41 } { 73 , 81 , 89 , 97 , 9 , 25 , 41 , 57 } { 89 , 97 , 9 , 25 , 41 , 57 , 73 } { 9 , 25 , 41 , 57 , 73 , 89 } { 41 , 57 , 73 , 89 , 9 } { 73 , 89 , 9 , 41 } { 9 , 41 , 73 } { 73 , 9 } { 73 } \begin{array}{l} \{1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99\} \\ \{5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1\} \\ \{9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5\} \\ \{13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9\} \\ \{17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13\} \\ \{21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17\} \\ \{25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21\} \\ \{29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25\} \\ \{33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29\} \\ \{37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33\} \\ \{41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37\} \\ \{45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41\} \\ \{49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45\} \\ \{53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49\} \\ \{57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53\} \\ \{61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57\} \\ \{65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61\} \\ \{69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65\} \\ \{73,75,77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69\} \\ \{77,79,81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73\} \\ \{81,83,85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77\} \\ \{85,87,89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81\} \\ \{89,91,93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85\} \\ \{93,95,97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89\} \\ \{97,99,1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93\} \\ \{1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97\} \\ \{9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,1\} \\ \{17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,1,9\} \\ \{25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,1,9,17\} \\ \{33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,1,9,17,25\} \\ \{41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,1,9,17,25,33\} \\ \{49,53,57,61,65,69,73,77,81,85,89,93,97,1,9,17,25,33,41\} \\ \{57,61,65,69,73,77,81,85,89,93,97,1,9,17,25,33,41,49\} \\ \{65,69,73,77,81,85,89,93,97,1,9,17,25,33,41,49,57\} \\ \{73,77,81,85,89,93,97,1,9,17,25,33,41,49,57,65\} \\ \{81,85,89,93,97,1,9,17,25,33,41,49,57,65,73\} \\ \{89,93,97,1,9,17,25,33,41,49,57,65,73,81\} \\ \{97,1,9,17,25,33,41,49,57,65,73,81,89\} \\ \{9,17,25,33,41,49,57,65,73,81,89,97\} \\ \{25,33,41,49,57,65,73,81,89,97,9\} \\ \{41,49,57,65,73,81,89,97,9,25\} \\ \{57,65,73,81,89,97,9,25,41\} \\ \{73,81,89,97,9,25,41,57\} \\ \{89,97,9,25,41,57,73\} \\ \{9,25,41,57,73,89\} \\ \{41,57,73,89,9\} \\ \{73,89,9,41\} \\ \{9,41,73\} \\ \{73,9\} \\ \{73\} \\ \end{array}

Saya Suka
Mar 23, 2021

S(n) = 2 × [ n - { largest power of 2 less than or equal to n } ] + 1

S(100) = 2(100 - 2^6) + 1
= 2(100 - 64) + 1
= 2(36) + 1
= 73


0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...