https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary
https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary„Devise a binary code that translates ABACAB into a string consisting of only 9 bits”
On Tue, 11 Jul 2023 00:57:34 +1000
dxforth <dxforth@gmail.com> wrote:
https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary
I don't usually do puzzles, but did read the headline:
'Prime Minister Rishi Sunak stands at the door of 10 Downing Street, London,
in June 2023, as numbers stuck to the door spell out 'London Tech Week' in
binary code, ahead of a garden reception for London Tech Week.'
And this was was enough to guess that the 24 bits shown do not spell that much.
$ gforth
Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
2 base ! ok
01001100 emit L ok
01010100 emit T ok
01010111 emit W ok
https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary„Devise a binary code that translates ABACAB into a string consisting of only 9 bits”
What about:
A - 0
B - 10
C - 11
ABACAB = 010011010
No ambiguity, correct?
https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary„Devise a binary code that translates ABACAB into a string consisting of only 9 bits”
What about:
A - 0
B - 10
C - 11
ABACAB = 010011010
No ambiguity, correct?And the second puzzle?
And the second puzzle?https://www.theguardian.com/science/2023/jul/10/can-you-solve-it-are-you-brainy-at-binary„Devise a binary code that translates ABACAB into a string consisting of only 9 bits”
What about:
A - 0
B - 10
C - 11
ABACAB = 010011010
No ambiguity, correct?
What about:
A - 0
B - 111
C - 11
D - 01
ABACADABA = 011101100101110
No, for example 0111 could be AB or DC. You need two 3-digit codes.
No, for example 0111 could be AB or DC. You need two 3-digit codes.
Oh, overlooked… :(
OK, so the final solution is:
A - 0
B - 11
C - 101
D - 111
ABACADABA -- 011010101110110
On 11/07/2023 10:16, Zbig wrote:
No, for example 0111 could be AB or DC. You need two 3-digit codes.
Oh, overlooked… :(
OK, so the final solution is:
A - 0
B - 11
C - 101
D - 111
ABACADABA -- 011010101110110Not quite - 111111 could be DD or BBB.
0 11 0 101 0 111 0 11 0 = ABACADABA
but also
0 11 0 101 0 11 101 10 = ABACABC?
OK, the second one throws an error, so you'd need to backtrack, but
you'd get the result in the end.
Whereas
A - 0
B - 11
C - 101
D - 100
0 11 0 101 0 100 0 11 0 = ABACADABA is unambiguous.
wtorek, 11 lipca 2023 o 13:03:50 UTC+2 Clive Arthur napisał(a):
On 11/07/2023 10:16, Zbig wrote:
Not quite - 111111 could be DD or BBB.No, for example 0111 could be AB or DC. You need two 3-digit codes.
Oh, overlooked… :(
OK, so the final solution is:
A - 0
B - 11
C - 101
D - 111
ABACADABA -- 011010101110110
Look at the conditions of the exercise — the task was to code ABACADABA unambiguous way, and not „every possible” string containing A, B, C, D.
0 11 0 101 0 111 0 11 0 = ABACADABA
but also
0 11 0 101 0 11 101 10 = ABACABC?
But what '?' means? It means there's not recognized „leftover”.
OK, the second one throws an error, so you'd need to backtrack, but
you'd get the result in the end.
Whereas
A - 0
B - 11
C - 101
D - 100
0 11 0 101 0 100 0 11 0 = ABACADABA is unambiguous.
But exactly because you've got a '?' in the second case it tells you
that second attempt is invalid — and only the first „decoding attempt” is valid. So still no ambiguity.
On 11/07/2023 14:03, Zbig wrote:
0 11 0 101 0 111 0 11 0 = ABACADABA
but also
0 11 0 101 0 11 101 10 = ABACABC?
But what '?' means? It means there's not recognized „leftover”.
OK, the second one throws an error, so you'd need to backtrack, but
you'd get the result in the end.
Whereas
A - 0
B - 11
C - 101
D - 100
0 11 0 101 0 100 0 11 0 = ABACADABA is unambiguous.
But exactly because you've got a '?' in the second case it tells youYou must work for Microsoft :-)
that second attempt is invalid — and only the first „decoding attempt”
is valid. So still no ambiguity.
Forgive me for being contrary,
On 11/07/2023 14:03, Zbig wrote:
0 11 0 101 0 111 0 11 0 = ABACADABA
but also
0 11 0 101 0 11 101 10 = ABACABC?
But what '?' means? It means there's not recognized „leftover”.
OK, the second one throws an error, so you'd need to backtrack, but
you'd get the result in the end.
Whereas
A - 0
B - 11
C - 101
D - 100
0 11 0 101 0 100 0 11 0 = ABACADABA is unambiguous.
But exactly because you've got a '?' in the second case it tells you
that second attempt is invalid — and only the first „decoding attempt” >> is valid. So still no ambiguity.
You must work for Microsoft :-)
Less output, more input, and you might learn.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 40:31:31 |
Calls: | 6,708 |
Calls today: | 1 |
Files: | 12,243 |
Messages: | 5,353,727 |