Homework 2 Solutions - Cryptography | MATH 0209A, Assignments of Cryptography and System Security

Material Type: Assignment; Class: CRYPTOGRAPHY; Subject: Mathematics; University: University of California - Los Angeles; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-wsz-1
koofers-user-wsz-1 🇺🇸

1

(1)

8 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 171 Homework #2 due Friday 4/18, in class
1.8
a. octave:1> P = [0 1/3 1/3 1/3 0; 1/3 0 1/3 0 1/3; 1/2 1/2 0 0 0 ;
1/2 0 0 0 1/2; 0 1/2 0 1/2 0]
P =
0.00000 0.33333 0.33333 0.33333 0.00000
0.33333 0.00000 0.33333 0.00000 0.33333
0.50000 0.50000 0.00000 0.00000 0.00000
0.50000 0.00000 0.00000 0.00000 0.50000
0.00000 0.50000 0.00000 0.50000 0.00000
octave:2> [1 0 0 0 0] * P^1000 * [1 0 0 0 0]’
ans = 0.25000
b. E(T) = 1
π(i)=1
.25 = 4
c. Consider vertex Ato be totally absorbing. Then our matrix becomes
10000
1/3 0 1/3 0 1/3
1/2 1/2 0 0 0
1/2 0 0 0 1/2
0 1/2 0 1/2 0
Then
Q=
0 1/3 0 1/3
1/2 0 0 0
0 0 0 1/2
1/2 0 1/2 0
and
M= (1 Q)1=
1.63636 0.54545 0.36364 0.72727
0.81818 1.27273 0.18182 0.36364
0.54545 0.18182 1.45455 0.90909
1.09091 0.36364 0.90909 1.81818
Thus the sytem spends on average 0.818 visits to Bbefore being absorbed
at vertex A.
d. Now let Aand Cbe totally absorbing. Then we have
Q=
B
D
E
0 0 1/3
0 0 1/2
1/2 1/2 0
pf3

Partial preview of the text

Download Homework 2 Solutions - Cryptography | MATH 0209A and more Assignments Cryptography and System Security in PDF only on Docsity!

Math 171 Homework #2 – due Friday 4/18, in class

a. octave:1> P = [0 1/3 1/3 1/3 0; 1/3 0 1/3 0 1/3; 1/2 1/2 0 0 0 ; 1/2 0 0 0 1/2; 0 1/2 0 1/2 0] P =

octave:2> [1 0 0 0 0] * P^1000 * [1 0 0 0 0]’ ans = 0.

b. E(T ) = (^) π^1 (i) = (^). 251 = 4

c. Consider vertex A to be totally absorbing. Then our matrix becomes

      1 0 0 0 0 1 / 3 0 1 / 3 0 1 / 3 1 / 2 1 / 2 0 0 0 1 / 2 0 0 0 1 / 2 0 1 / 2 0 1 / 2 0

Then

Q =

and

M = (1 − Q)−^1 =

Thus the sytem spends on average 0.818 visits to B before being absorbed at vertex A.

d. Now let A and C be totally absorbing. Then we have

Q =

B D E

Then

M = (I − Q)−^1 =

and

M S =

So starting at vertex B, we have a 0.42857 chance of ending up at vertex C.

e. We sum the second row of the matrix from part c. and get 2.6364.

We are concerned with the sum of the rolls modulo 8. So the possible states for the system are 0,... , 7, and our transition matrix is

            0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 0 0

T 1 is the number of steps until we return to 0. So then set 0 to be totally absorbing and we have

M =

The sum of row 1 is the expected time to absorb at zero, given that we start at 1. Since our first roll gives us equal chance at starting in rows 1 through 6, we average the sums of those rows and get 8.

T 2 is the number of steps until we land in state 1. Set 1 to absorbing an then