Thursday, April 19, 2018

Polish reverse write can too you

Suffix notation (also known as Lukasiewicz or reverse Polish notation) is a notation for arithmetic expressions that places the operands before the operator that uses them.  This allows the expression to be written without parentheses.  If the expression is evaluated in left-to-right order, the computed values of an operator's operands are available when that operand is encountered.


Read more »

Tuesday, January 2, 2018

It's the Great Icosihedron

Please let me know if there are any errors in the color table.

The Great Icosihedron is the most complex of the non-convex (Kepler-Poinsot) regular polyhedra.  It is composed of 20 intersecting equilateral triangles.  The visible surface of a model consists of 120 long isoscelese triangles and 60 short isoscelese triangles.  A model can be built from 12 units containing 10 long triangles and 5 short triangles.


First cut out all the parts of the visible surface, leaving tabs along all edges.  Then, using a color table or color map, mark the non-visible side of each part with its location on the color map or table and the location of the adjacent part along each edge.


Apply glue to the tabs on each side of an edge and press the tabs together.  When a unit is completed, set it aside until the glue dries. A unit will resemble a non-convex pyramid with a brim like a party hat.


When all 12 units have been built, glue the small triangles together according to the color map.  Make sure each facial plane is as flat as possible, contains 9 triangles (6 long ones and 3 short ones) of the same color. and that pairs of facial planes are parallel.

The models use these colors (the capital letter is used in the table):



Blue

Pink

Cyan

Red

Green

Violet

light greeN

White

Orange
Yellow

The color table for a 5 color model is (where A-Z means the short triangle of color A borders the short triangle of color Z indicated in the second line of the table entry)

  +---------------------------------------------------------------+
 +                 long triangles            +  short triangles  +
 |   | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 1 | R | B | G | R | O | G | Y | O | B | Y |B-Y|R-O|G-Y|O-G|Y-O|
 |   |   |   |   |   |   |   |   |   |   |   |2'k| 4k| 3k|5'k|6'k|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 2 | G | Y | R | G | O | R | B | O | Y | B |Y-B|G-Y|R-G|O-Y|B-G|
 |   |   |   |   |   |   |   |   |   |   |   |1'k|6'l|3'n| 5m| 4o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 3 | R | Y | G | R | B | G | O | B | Y | 0 |Y-G|R-B|G-R|B-G|O-B|
 |   |   |   |   |   |   |   |   |   |   |   | 1m| 5l|2'n|6'm|4'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 4 | B | O | R | B | Y | R | G | Y | O | G |O-R|B-O|R-B|Y-R|G-B|
 |   |   |   |   |   |   |   |   |   |   |   | 1l|3'l|6'n|5'm| 2o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 5 | B | G | Y | B | R | Y | O | R | G | O |G-O|B-R|Y-O|R-Y|O-R|
 |   |   |   |   |   |   |   |   |   |   |   |1'l| 3l| 2n|4'm|6'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 6 | R | O | B | R | G | B | Y | G | O | Y |O-Y|R-O|B-R|G-B|Y-G|
 |   |   |   |   |   |   |   |   |   |   |   |1'l|5'l|4'n|3'm|2'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |6' | O | R | Y | O | G | Y | B | G | R | B |O-Y|Y-G|G-B|B-R|R-O|
 |   |   |   |   |   |   |   |   |   |   |   | 1o| 2l| 3n| 4m| 5o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |5' | G | B | O | G | R | O | Y | R | B | C |G-O|O-R|R-Y|Y-O|B-R|
 |   |   |   |   |   |   |   |   |   |   |   | 1n| 6l| 4n|2'm|3'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |4' | O | B | G | O | Y | G | R | Y | B | Y |O-R|G-B|Y-R|R-B|B-O|
 |   |   |   |   |   |   |   |   |   |   |   |1'o|2'l| 5n| 6m| 3o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |3' | Y | R | O | Y | B | O | G | B | R | G |Y-G|O-B|B-G|G-R|R-B|
 |   |   |   |   |   |   |   |   |   |   |   |1'n| 4l| 6n| 2m|5'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |2' | Y | G | B | Y | O | B | R | O | G | R |Y-B|B-G|O-Y|R-G|G-Y|
 |   |   |   |   |   |   |   |   |   |   |   | 1k|4'l|5'n| 3m| 6o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |1' | B | R | Y | B | O | Y | G | O | R | G |B-Y|Y-O|O-G|G-Y|R-O|
 |   |   |   |   |   |   |   |   |   |   |   | 2k| 6k| 5k|3'k|4'k|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |   | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
 +                 long triangles            +  short triangles  +
 +---------------------------------------------------------------+

A color map of the 5 color model can be found at
https://paulscottinfo.ipage.com/polyhedra/kepler-poinsot/great-icosah/gr-icosah-construct-analysi.gif.

The color table for a 10 color model is
 +---------------------------------------------------------------+
 +                 long triangles            +  short triangles  +
 |   | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 1 | V | R | B | V | P | B | Y | P | R | Y |W-P|N-Y|O-R|C-V|G-B|
 |   |   |   |   |   |   |   |   |   |   |   | 2l| 3m| 4o| 5l| 6m|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 2 | G | Y | N | G | B | N | W | B | Y | W |R-B|P-W|V-Y|C-G|O-N|
 |   |   |   |   |   |   |   |   |   |   |   | 3n| 1k| 6l|4'k|5'o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 3 | R | N | W | R | O | W | P | O | N | P |C-O|V-P|Y-N|B-R|G-W|
 |   |   |   |   |   |   |   |   |   |   |   |6'n| 4k| 1l| 2k|5'n|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 4 | Y | C | O | Y | V | O | N | V | C | N |P-V|W-N|G-C|B-Y|R-O|
 |   |   |   |   |   |   |   |   |   |   |   | 3l|6'm|2'o| 5m| 1m|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 5 | O | B | G | O | R | G | C | R | B | C |P-R|V-C|Y-B|N-O|W-G|
 |   |   |   |   |   |   |   |   |   |   |   | 6n| 1n| 4n|2'n|3'n|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 | 6 | P | G | C | P | W | C | V | W | G | V |N-W|Y-V|B-G|R-P|O-C|
 |   |   |   |   |   |   |   |   |   |   |   |4'l| 2m| 1o| 5k|3'm|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |6' | C | W | P | C | G | P | V | G | W | V |B-G|Y-V|N-W|O-C|R-P|
 |   |   |   |   |   |   |   |   |   |   |   |1'n|2'k| 4l| 3k|5'm|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |5' | G | R | O | G | B | O | C | B | R | C |Y-B|V-C|P-R|W-G|N-O|
 |   |   |   |   |   |   |   |   |   |   |   |4'o|1'o|6'o| 3o| 2o|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |4' | O | V | Y | O | C | Y | N | C | V | N |G-C|W-N|P-V|R-O|B-Y|
 |   |   |   |   |   |   |   |   |   |   |   | 2n| 6k|3'l|1'k|5'k|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |3' | W | O | R | W | N | R | P | N | O | P |Y-N|V-P|C-O|G-W|B-R|
 |   |   |   |   |   |   |   |   |   |   |   |1'l|4'm| 6o| 5o|2'm|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |2' | N | B | G | N | Y | G | W | Y | B | W |V-Y|P-W|R-B|O-N|C-G|
 |   |   |   |   |   |   |   |   |   |   |   |6'l|1'm|3'o| 5n| 4m|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |1' | B | P | V | B | R | V | Y | R | P | Y |O-R|N-Y|W-P|G-B|C-V|
 |   |   |   |   |   |   |   |   |   |   |   |4'n|3'k|2'l|6'k|5'l|
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
 |   | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o |
 +                 long triangles            +  short triangles  +
 +---------------------------------------------------------------+

A 10 color map can be found in  http://www.korthalsaltes.com/pdf/collection_004.PDF
under Great Icosahedron, in 10 colors, Small Version.
 

Thursday, March 30, 2017

You TF, I TF, We all TF for UTF

UTF ( Unicode Text Format is a Multi-language standard for representing Unicode text. there are three ways of representing Unicode elements:  UTF-8, UTF-16, and UTF-32.

Read more »

Wednesday, July 15, 2015

Who's on First?

There are several calculating machines that are claimed to be the "first computer".  These claims depend on what is meant by "computer" and, to some extent, on what is meant by "first".

Among the contenders for "first computer" are Charles Babbage's Analytical Engine, Konrad Zuse's Z3, Tommy Flowers' Colossus codebreaking machine, The Atanasoff-Berry Computer, Howard Aiken's Harvard Mark I, Eckert and Mauchly's Eniac, The Manchester Baby, The Manchester Mark 1, Maurice Wilkes' Edsac, and The Pilot ACE.

Read more »

Saturday, March 21, 2015

Netting the Big Tuna

Intercepting and decrypting enemy messages was an important part of the Allies' strategy during World War II.  Beginning in July 1941, Germany's high command communication used a machine called the Lorenz SZ40 or SZ42, which British intelligence referred to as "Tunny" (named after the fish that Americans call "tuna").  Although the British did not obtain a Lorenz machine until late in the war, the codebreakers at Bletchley Park were able to deduce the machine's operation in January 1942.

The Tunny machine used a typewriter-style keyboard to enter text which was combined with a pseudo-random byte string to produce the cypher text.  This was then transmitted by radio or telegraph to a Tunny machine which was set up to generate the same byte string and combine it with the cypher text to get the plaintext message (a symmetric cypher using a pseudo-random one-time pad).
Read more »

Thursday, March 5, 2015

Don't curse, recurse

Recursion is a concept in mathematics, computability theory, and computer programming, although the usage differs. In computability theory, a recursive set is one where membership can be confirmed or refuted using a process that terminates, and a recursively enumerable set is one for which there is a process that terminates if membership should be confirmed but may not terminate if membership should be refuted.  In mathematics, recursion refers to the embedding of something within itself, such as a function that uses itself in its own definition.  In computer programming, a recursive algorithm is a description of a computation that includes the same computation, but using different parameters.
Read more »

Tuesday, May 6, 2014

Shifts? We don't need no stinking Shifts!

 [The code previously given for "algebraic right shift: does not work for a shift of more than one bit, and has been replaced using a different approach. Apologies to anyone who was confused by the previous version.]

A previous post ("Op Codes?  We don't need no stinking Op Codes!") showed how to do common operations on a computer that always performed the same operation (subtract and branch if not positive) on different operands.  In that post, the operations performed treated the operands as integer values.  There are situations in which it is convenient to treat the operands as bit strings (or Boolean vectors) where the bits are shifted or individual bits are manipulated; multiplication, division, and extraction of substrings are among these situations.  Individual bits can be isolated by a combination of left and right shifts, so shifts are the basic operations for bit string manipulation. 


Read more »