Wednesday, December 17, 2014

Switch It Up

Both prefix and postfix notation are more efficient than infix notation because parenthesis need not be used.

Infix To Prefix

X{[¬ (P)]  (X = X)}

¬ ( P )
¬P
= X
=XX
[¬P](=XX)
[¬P](=XX)
[¬P](=XX)
¬P=XX
X{¬P=XX}
X¬P=XX

X¬P=XX


Infix To Postfix

X{Y[X(W{(W  Z)  [(W = X)  (W = Y)]})]}

 Z
WZ
= X
WX=
= Y
WY=
(WX=)  (WY=)
 (WX=)(WY=)
 (WX=)(WY=)
WX=WY=
(WZ [WX=WY=]
 (WZ)(WX=WY=)
 (WZ)( WX=WY=)
WZWX=WY=
W{WZWX=WY=}
{WZWX=WY=⇔}W
{WZWX=WY=}W
WZWX=WY=W
X(WZWX=WY=W)
XWZWX=WY=W
XWZWX=WY=W
WZWX=WY=WX
Y[WZWX=WY=WX]
YWZWX=WY=WX
YWZWX=WY=WX
WZWX=WY=WXY
X{WZWX=WY=WXY}
XWZWX=WY=WXY
XWZWX=WY=WXY
WZWX=WY=WXYX

WZWX=WY=WXYX

No comments:

Post a Comment