Sunday, May 11, 2008

Math 5300 - Assignment #2

Symbols: AND (^), OR (v), NOT (~)
First 4 digits of Student # 2053
Mod 8 = 5 (Question 2f), Mod 16 = 5 (column 5) Mod 3 = 1 (Question 3b) , Mod 7 = 2 (Question 6c)

1. The 16 output functions expressed as AND/OR and NOT.
(1) Y^~Y
(2) X^Y
(3) X ^ ~Y
(4) X^(X v Y)
(5) Y ^ ~X
(6) Y ^ (X v Y)
(7) (X v~Y) v (X ^ ~Y)
(8) X v Y
(9) ~(X v Y)
(10) (X ^ Y) v ~(X v Y)
(11) ~Y
(12) X v ~Y
(13) ~X
(14) Y v ~X
(15) ~(X^Y)
(16) ~(X ^ Y) v ~(X v Y)

2f. The 16 possible binary functions that cannot be represented using only compositions of {OR, IMPL}:

(1) 0
(9) NOR
(10) XAND
(11) NOT Y
(12) Y IMPL X
(13) NOT X
(14) X IMPL Y
(15) NAND

3b. Out of the 16 binary operators Column 5 (~A ^ B)(0100) is NOT associative since f(f(x,y),z) does not equal f(x,f(y,z)). (I tried to attach a table, but as you can see it did not work!)

x 0 0 0 0 1 1 1 1
y 0 0 1 1 0 0 1 1
z 0 1 0 1 0 1 0 1
f(x,y) 0 0 1 1 0 0 0 0
f(f(x,y),z) 0 1 0 0 0 1 0 1
f(y, z) 0 1 0 0 0 1 0 0
f(x, f(y,z)) 0 1 0 0 0 0 0 0

4. When n =1, one variable functions exists f(x), and therefore 27 functions (3^3^1). When n=2, two-variable functions exists f(x,y), therefore we have 19 683 functions (3^3^2). Since there are three possible inputs {0, 1, 2} and 9 rows. Therefore, 3^9 = 19 683.
x 1 1 1 0 0 0 2 2 2
y 1 0 2 1 0 2 1 0 2

5. There are four operations that can be used to express every possible two argument function on trinary operations. They are the negation (NOT), disjuction (OR), conjuction (AND) and implication (IMPL). Implication differs on trinary functions than on binary operations since it is not derived from the three basic operations as in binary logic. Reference:
http://www.aymara.org/ternary/ternary.pdf

The basic operations in the trinary logic are:
x 1 1 1 0 0 0 2 2 2
y 1 0 2 1 0 2 1 0 2
~x 2 2 2 0 0 0 1 1 1
x^y 1 0 2 0 0 2 2 2 2
x v y 1 1 1 1 0 0 1 0 2
x Impl y 1 0 2 1 1 0 1 1 1
x <-->y 1 0 2 0 1 0 2 0 1

====================================================

x 1 1 1 0 0 0 2 2 2
y 1 0 2 1 0 2 1 0 2
~y 2 0 1 2 0 1 2 0 1
~x 2 2 2 0 0 0 1 1 1
~y --> ~x 1 0 2 1 1 0 1 1 1
~x v y 1 0 2 1 0 0 1 1 1
impl (x,y) 1 0 2 1 1 0 1 1 1

Therefore, ~x v y and impl(x,y) are not equivalent as it for binary logic.
We can however verify that ~y --> ~x is equivalent with impl(x, y) as it does happen in the binary logic.

6.
pic1 AND pic2








pic1 OR pic2




(Not pic1) AND (Not pic2)





7. The following are the true representation statements of the scenario.

If Poison caused the victim's death (P)
If there was a Change in blood Chemistry (C)
If there was Poison Residue in the Stomach(R)
If there were Puncture Marks (M)
If poison was injuected by a Needle (N)

Sentence #1: Poison caused the victim's death if and only if there was a change in the blood chemistry or a residue of poison in the stomach.

P IFF (C v R)
(P v ~(C v R)) ^ (~P v (C v R))

In this sentence, we can conclude that "Poison caused the victim's death" is false.

Sentence #2: There was neither a change in blood chemistry nor a residue of poison in his stomach, but there were puncture marks on the body.

~(C v R) ^ M

In this sentence, we can conclude that since there was neither a change in the blood chemistry nor a residue of poson in his stomach this is a true statement, therefore again "Poison caused the victim's death" is false. However, we can also conclude that since there were puncture marks on the body, this is also true.

Sentence #3: Poison was injected by a needle only if there were puncture marks on the body.

N IMPL M
~N v M

In this sentence, we can conclude that if there were no puncture marks (false) then no needle (false) this statement would be true. If there was no needle (false) and puncture marks (true) this statement would also be true. If there was a needle (true) but no puncture marks (false) this statement would be false. It there was a needle (true) and there were puncture marks (true) this state would be true.

Sentence #4: Either Poison was the cause of the victim's death, or there are no puncture marks on the body.

P v ~M

In this sentence, we can conclude that no puncture marks is true.

Therefore, in conclusion: if Poison didn't cause the victim's death is true then there are no puncture marks is true and if there are no puncture marks there cannot be injection by a needle is also true.

Orders of Magnitude

1. 64K = 2^6
1GB x 1024MB x 1024K
1 x 2^10 x 2^10 = 2^20
2^20 /2 ^6 = 2^14
2^14 = 16 384 bites
Therefore, today's computers have 16 384K times more of memory!

2. Floppy disk = 800K
4.7GB x 1024 MB x 1024K
4.7 x 1024 x 1024 = 4928307.2K
4928397.2K/800K = 6160.384
Therefore, we would have approximately 6 160 floppy disks are equivalent to one 4.7GB DVD !

3. Apparently, Nov. 15, 1971, Marcian E. Hoff for Intel created the first microprocessor, the 4004. The processor ran at the clock rate of 108KHz approximately 0.06 MIP (Million Instructions Per Second). Today, for example, Pentium II 333MHz runs at approximately 770 MIP. AMD released the Phenum X4 9750 running at 2.4 GHz and 9850 running at 2.5 GHz. Intel released Xeons, the L5400 series, running up to 2.5 GHz. Today's computers are running more than 12833 MIP times faster.

http://www.willus.com/archive/timeline.shtml
http://trillian.randomstuff.org.uk/~stephen/history/microprocessor.html
http://trillian.randomstuff.org.uk/~stephen/history/timeline-CPU.html

No comments: