Jump to content

Find the missing permutation: Difference between revisions

m
rearranged the placement of the permutation list, added bullet points for the three methods, added whitespace and highlighting to the task's preamble, added a ;Related task: (bold) header, changed verb tense.
(→‎{{header|Lua}}: shortened)
m (rearranged the placement of the permutation list, added bullet points for the three methods, added whitespace and highlighting to the task's preamble, added a ;Related task: (bold) header, changed verb tense.)
Line 1:
{{task}}
These are all of the permutations of the symbols A, B, C and D,
except for one that's not listed.
Find that missing permutation.
 
(cf. [[Permutations]])
 
There is an obvious method :
enumerating all permutations of A, B, C, D, and looking for the missing one.
 
<pre>ABCD
There is an alternate method.
ABCD
Hint : if all permutations were here,
how many times would A appear in each position ?
What is the parity of this number ?
 
There is another alternate method.
Hint: if you add up the letter values of each column, does a missing letter A, B, C, D
from each column cause the total value for each column to be unique?
 
<pre>ABCD
CABD
ACDB
Line 40 ⟶ 24:
CBDA
DBCA
DCAB</pre>
</pre>
Listed above are all of the permutations of the symbols &nbsp; '''A''', &nbsp; '''B''', &nbsp; '''C''', &nbsp; and &nbsp; '''D''', &nbsp; ''except'' &nbsp; for one permutation that's &nbsp; ''not'' &nbsp; listed.
 
 
;Task:
Find that missing permutation.
 
 
;Methods:
* Obvious method:
enumerate all permutations of '''A''', '''B''', '''C''', and '''D''',
and then look for the missing permutation.
 
There is an* alternate method. :
Hint Hint: if all permutations were hereshown above, how many
how many times would '''A''' appear in each position ?
What is the ''parity'' of this number ?
 
There is* another alternate method.:
Hint: if you add up the letter values of each column, does a missing letter A, B, C, D
does a missing letter '''A''', '''B''', '''C''', and '''D''' from each
from each column cause the total value for each column to be unique?
 
 
;Related task:
(cf.* &nbsp; [[Permutations]])
<br><br>
 
=={{header|360 Assembly}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.