Friday, June 10, 2005

Zero to One

One of the Mathematical Venues that interests me The Most,
( Aside from The Gematria & Recursive Mandalas... )
Is the Region from Zero to One!
You can put the whole Number Line in there,
Either just The Positive Numbers,
---
HP RPL Program Listing
Converts Any Real Positve Number
To it's 0 to 1 Equivalent
Input :
1: Any Number from Zero to + Infinity
1 + INV 1 SWAP -
The Curious part here is the adding & subtracting of 1.
It would work fine for all numbers without that...
Except for Fractions Less than 1...!!!
---
or Both The Positive & Negative Numbers...!
---
HP RPL Program Listing
Converts Any Real Positve Number

To it's 0 to 1 Equivalent
Input :
1: Any Number from - Infinity to + Infinity
DUP ARG COS SWAY OVER + INV - 1 + .5 *

The Curious part here is ARG COS which replaces SIGN,
Which fails with Zero...!
ARG COS returns 1 for 0, as it should!
---
This allows you to Graph Stuff without having to worry about
Numbers Falling Outside The Parameters of your Picture...!
---
One aspect of Zero to One is considering Just Zero & One.
On The HP48, The graphics ( are normally ) either Black or White.
Included with The Calculator's Functions & Commands,
Are Two Graphic Operators...
( Three; if you Include Replace ( ? ) )
Graphic OR & Graphic XOR ( Exclusive OR )

With OR; When you combine two graphics,
All The Black pixels on Graphic-A will remain Black
If The Pixel that overlays it, From Graphic-B, Is Also Black!
If The Pixel on Graphic A is White
& The Pixel on Graphic B is Black;
Then The Pixel will be Black!
If Pixel A is Black & Pixel B is White;
Then The Resulting Pixel will be Black!
If Both Pixels on Both Graphics ( A & B ) are White;
Only Then will the Resulting Pixel be White.

This is normally shown Schematically like so:


-------------- Graphic A
-------------- Black -:- White
-Graphic B -----------:-------
---- Black ----Black -:- Black
---- White ----Black -:- White


Another way of writing this is : BBBW

Exclusive OR works like this; Almost the Same,
Except that Black & Black Makes White...!!!

-------------- Graphic A
-------------- Black -:- White
-Graphic B -----------:-------
---- Black ----White -:- Black
---- White ----Black -:- White

This would be written as : WBBW

Since there are Two Options with Four Variations
There are 16 Possible Ways
To Combine The Two Graphical Pictures.

You may be wondering WHY
You would want to overlay two pictures in such a way
So that they either Reinforce or Cancel-Out
One or the others Colour...???
Amazingly; There are LOTS of Applications for this sort of thing...!
The most Notable is when you want to Fill In an Area
On a Graphical Picture with a Pattern.
To do this;
You First Make a copy of The Original Picture
and Set it Aside, [ Picture A ]
Then Fill in The Selected Enclosed Area with Black, [ Picture B ]
Then GXOR Picture A over Picture B and All the Pixels,
Except those in the Newly Filled Area will Magickally Disappear...!
Then Reverse that; So that White turns Black & Black turns White.
Then Create another Picture of the same size,
But contains nothing But the Pattern you Want, [ Picture C ]
Reverse This Picture as well.
Then Use GOR to combine these two pictures, And Reverse them.
The Area that you chose will now have The Pattern in it...!
The last step is to GOR Picture A on top of this latest Picture,
And that will restore all the other Picture Elements
From the Original Picture...!
When you actually do this on a computer,
It's all done; 'Behind the Curtains'
So that when it's all done,
And suddenly POPS onto your screen,
It looks like it just happened without any effort at all...!!!

There are LOTS of other applications as well...
But that's not what i'm interested in right now...

i got to thinking some time ago
That there should be another Functional for Graphic AND...
Only Black on Blacks would be Black,
And all other Pixels would turn White!
Then it further occurred to me
That there are still another 13 Possible Operations
Left Unaccounted for...!!!

At first i was thinking;
Many of these will require lots of fickling around...

Such as The Right Handed GXOR
That turns Black on White Pixels Black,
While leaving White on Black Pixels White...!!!
Black on Black turn White & White on White Stay White...!

BUT it turns out that
They are All Very easy & Simple to Construct...!!!


Here's a list of them:
-1 -WWWW- DROP OVER NEG GOR NEG - - - - - - - Null

The programs are all in RPL for the HP48 Series of Calculators,
The Input for each Program is the Same for Either GOR or GXOR or REPL

- -- 3: Graphic or PICT
- -- 2: (x,y) or { # xb #yb }
- -- 1: Graphic

-2 -WWWB- GOR NEG - - - - - - - - - - - - - - ~GOR
-3 -WWBW- SWAP ROT NEG GOR NEG - - - Graphic Minus
- - - - - - - - - - -3 is also The W on B AntiGXOR
-4 -WWBB- NEG 3 ROLLD DROP2 - - - - - - - - - - ~B
-5 -WBWW- NEG GOR NEG - - - - - - -B on W AntiGXOR
-6 -WBWB- DROP2 NEG - - - - - - - - - - - - - - ~A
-7 -WBBW- GXOR - - - - - - - - - - - - - - - -GXOR
-8 -WBBB- NEG SWAP ROT NEG GOR - - - - - - - ~GAND
-9 -BWWW- NEG SWAP ROT NEG GOR NEG - - - - - -GAND
10 -BWWB- NEG GXOR - - - - - - - - - - - - - ~GXOR
11 -BWBW- DROP2 - - - - - - - - - - - - - - - - -A
12 -BWBB- NEG GOR - - - - - - - - - - - -~AntiGXOR
13 -BBWW- 3 ROLLD DROP2 - - - - - - - - - - - - -B
14 -BBWB- SWAP ROT NEG GOR - - - - - - - ~AntiGXOR
15 -BBBW- GOR - - - - - - - - - - - - - - - - -GOR
16 -BBBB- DROP OVER NEG GOR - - - - - - -Tautology

As an Extension of this...
There are also 16 Fractional Propositional Logic Operators
That work on all The Intermediate Numbers
From Zero to One--
Rather than The Normal Zero OR One
For Ordinary Propositional Logic...!!!

These are also written for the HP48
So that Operators are First Laid Out
Then An Operation is Performed on Them...!

Such that:
[ p q + ] is equivalent to ( p + q ) anywhere else on the planet...!

For ( 2 ) : 1 p q MAX -
Means : 1-(MAX(p,q))

Input for These Routines would be:
- -- 2: - - - - p
- -- 1: - - - - q
Both p & q are Fractional Truth Values
Between & Including : Zero & One

Output is A Fractional Value as Well...
Signifying the Resultant Truth Value After The Operation.
These should be consistent with
Conventional Truth Tables,
In so far as, Zeros & Ones are Concerned...!


-1 -0000- 0 . . . . . . . . . . . . . . . .Null

Everything is Wrong : The World is Maya
-2 -0001- 1 p q MAX - . . . . . . . . . . . ~OR
Wrong is Right

-3 -0010- p 1 q - MIN . . . . . . . .I Said So!
p is Right, Unless q Agrees with p

-4 -0011- 1 q - . . . . . . . . . . . . . . .~q
q is Wrong

-5 -0100- 1 p - q MIN . . . . . . Just Because!
q is Right, Unless p Agrees with q
-6 -0101- 1 p - . . . . . . . . . . . . . . .~p
p is Wrrong

-7 -0110- p q - ABS . . . . . .Not Equal or XOR
Just so long as p & q Disagree, Then that is Right

-8 -0111- 1 p q MIN - . . . . . . . . . . . .~&
If p & q Both think that it's Right, Then it's Wrong

-9 -1000- p q MIN . . . . . . . . . . . . . . &
If Both p & q Think it's Right, Then it's Right!

10 -1001- 1 p q - ABS - . . . . . Equal or ~XOR
If Both p & q Agree, Either Right or Wrong, Then it's Right

11 -1010- p . . . . . . . . . . . . . . . . . p
pis Right
12 -1011- p 1 q - MAX . . . . . . . . . Because
p is Right, Because q is Right

13 -1100- q . . . . . . . . . . . . . . . . . q
q is Right

14 -1101- 1 p - q MAX . . . . . . . . . If Then
If p is Right, Then q is Right

[ There is an Odd Bit here... It seems to imply That if some crazy thing
'p' is Given as False; Then Some Crazy thing q will be True...!
What it is Actually saying is that the Truth Values of p & q Determine
The Validity of the Operator... If p is False & q is True, The Operator is
Valid, But q is True for it's own reasons, Not because p is False.
This is perhaps the most compelling evidence that
Propositional Logic Is Inherently Flawed
& Why the Aliens have not yet Overtly Contacted Us. ]
15 -1110- p q MAX . . . . . . . . . . . . . .OR
When p or q is Right, Or Both are Right
16 -1111- 1 . . . . . . . . . . . . . Tautology
Everything is Right with The World,
Everything is exactly what it is,
Everything that is exactly what it is, Is True,
Everything that is True, Is Beautiful

Bonus Feature...!
PhotoEmulsion Propositional Arithmetic...!!!

With PhotoEmulsion Propositional Arithmetic,
You are only allowed to use the Physically Possible Tools
Of either Adding Two Photos Together by overlaying transparencies,
And Creating a Third Image ( Transitionally Negative )
Or Inverting an Image by Exposing it to The Proper Emulsified Plastic or Paper Material...


Curiously; When you Add Photographic materials together in this manner,
The Results may be Somewhat CounterIntuitive...!
When you add a 100% Black Transparency
To Another 100% Black Transparency,
The Result will be
( After the Usually Negative Intermediate Stage )
A100% Black Image...!!!
When you add a 50% Black Image
To a 50% Black Image,
The Result will be a 75% Black Image...!!!
This is because some of The Silver or Dye Pixels on the Emulsion
Will exactly overlay the pixels on the second image,
Nullifying their accumulative effect...!
It is simple to see that if Image A is 50% Covered with Pixels,
It will Block Out 50% of the pixels on Image B...
So that if Image A is 60% Black,
And Image B is 12% Black,
60% of Image B will be Nullified,
Leaving 40% of the 12%
To Add to the 60% of Image A...
Thus Creating an Image of 64.8% Blackitiness...!!!
Likewise--
9% + 16% = 23.56%...!!!

Inverses; On the other plate, Will be exactly the opposite,
Just as you would expect them to be...
...Pixel count wise...
60% Inverts to 40% -- And so on...
This method of Inverting a Quantity is intended for Fractional Values Only...
So that 60% = .6 & 40% is the result of subtracting .6 from 1...! ( ? )
To Obtain the % Value; Multiply by 100...!

[ As a harmless Digression...
This is The Third Way to Oppositify a Number...!
Method One ) The Opposite of 3 is -3
Method Two ) The Opposite of 3 is .333...
Method Three ) The Opposite of .3 is .7

Method Four ) The Opposite of 30 is 210
Method Fourb ) The Other Opposite of 30 is 330 !
Method Five ) The Opposite of 3 is...???

]


+ means PhotoEmulsion Addition
. . . HP RPL Version : p q + p q MIN p q MAX % 100 * -
~ means PhotoEmulsion Inversion
. . . HP RPL Version : 1 p -

-1 -0000- 0 . . . . . . . . . . . . . . . Null
-2 -0001- p q + ~ . . . . . . . . . . . . .~OR
-3 -0010- p ~ q + ~. . . . . . . . .I said So!
-4 -0011- q ~ . . . . . . . . . . . . . . . ~q
-5 -0100- p q ~ + ~. . . . . . . Just Because!
-6 -0101- p ~. . . . . . . . . . . . . . . .~p
-7 -0110- p ~ q + ~ p q ~ + ~ +. . . Not Equal
. . . . . . . . . . . . . . . . . . . . or XOR
-8 -0111- p ~ q ~ + . . . . . . . . . . . . ~&
-9 -1000- p ~ q ~ + ~ . . . . . . . . . . . .&
10 -1001- p ~ q + ~p q ~ + ~ + ~ . . . . Equal
11 -1010- p . . . . . . . . . . . . . . . . .p
12 -1011- p q ~ +. . . . . . . . . . . Because
13 -1100- q . . . . . . . . . . . . . . . . .q
14 -1101- p ~ q + . . . . . . . . . . .If Then
15 -1110- p q + . . . . . . . . . . . . . . OR
16 -1111- 1 . . . . . . . . . . . . .Tautology

---
Extra Bonus:
Is there a way to Codify Fractional Propositional Logic

For a Mechanical System;
Such as Techno-Lego Blocks ( And Accessories )

or Tinker Toys...???
---






No comments: