Exam 2 math 230

Problem 1 1

Part 1

I had to remind myself this is dealing with probability and the events after learning about transitive graphs

ok so we see we are given F and X and the question is looking to see the correlation.

in our case conditional probability.

our equation is showing p⁡(x) p of x is equal to two different events and p⁡(x) p of x is also not equal to zero we are also given P⁡(F) P of F is also not equal to zero.

we want to find P⁡(x) P of x the outcome of x

we are given

P(X)

which is equal to

P(X∣F)P(F)+P(X∣F^c)P(F^c) the c makes it not true

we can rewrite the first part P(X∣F)P(F) as P(X∩F)

this shows x intersecting the f event and both F and X are true or did happen

the other formula is showing x happens and F does not happen. we know this because the line above the F is expressed with the ^c

Therom 4.1⁢.1 4.1 .1 is saying we can add up the parts that are not intersecting to find the rest of the parts that do overlap.

Part 2 2

P(F∣X)=P(X∣F)P(F)/P(X)

This formula is just another way of using Bayes' Theorem because it flips the odds of ( F ) given ( X ) using the chance of ( X ) given ( F )

Problem 2 2

Part A

wants to know how many users log on everyday.

The hint says to use the equation from Part 1 1(a), which is

P(X)= P(X∣F)P(F) + P(X|F^c)P(F^c)

we are given values such as

P(F) = 0.7 0.7 (70 70% outside)

P(F^c) = 0.3 0.3 (30 30% inside)

P(X|F) = 0.6 0.6 (60 60% of outside users log on)

P(X|F^c) = 0.8 0.8 (80 80% of inside users log on)

we plug in these vaules into our formula

So, P(X) = (0.6 0.6 × 0.7 0.7) + (0.8 0.8 × 0.3 0.3) =

0.42 0.42 + 0.24 0.24 = 0.66 0.66 or in percent wise

66 66% users are found to be logging on everyday.

P⁡(x) P of x = 0.66 0.66

part B

the probability a user logging on every day is from inside can be found using Bayes' Theorem, and we already have P(X) = 0.66 0.66 from above

P(F^c|X) =

[P(X|F^c) × P(F^c)] / P(X) = ?

So,

[0.8 0.8 × 0.3 0.3] / 0.66 0.66 = 0.24 0.24 / 0.66 0.66 ≈ 0.363 0.363

or in other words 36 36% of users logging on from the inside.

Part 2

A

is a Hasse Diagram

when analyzing the lower leg and its elements, we see that if we go up the path to the higher element or vertex value, we can divide it evenly with the previous vertex we just left from.

B B

is a Hasse Diagram

when analyzing the lower leg and its elements, we see that if we go up the path to the higher element or vertex value, we can divide it evenly with the previous vertex we just left from.

C C

is NOT a Hasse Diagram

when analyzing the lower leg and its elements, we see that if we go up the path to the higher element or vertex value, we cannot divide it evenly with the previous vertex we just left from , as the case with leaving from vertex 20 20 going to vertex 70 70 we divide 70 70 by 20 20 we are left with 3.5 3.5 which is not an evenly divided number as it has a remainder.

D D

is NOT a Hasse diagram

when analyzing the lower leg and its elements, we see that if we go up the path to the higher element or vertex value, we cannot divide it evenly with the previous vertex we just left from , as the case with leaving from vertex 20 20 going to vertex 30 30, we divide 20 20 by 30 30 we are left with 1.5 1.5 which is not an evenly divided number as it has a remainder.

Problem 3 3

A A

its important to understand we are dealing with discrete mathmatiecs and this is asking for an equalvlance relation

we need to show it is reflexive, symmetric, and transitive.

Reflexive: A car is related to itself if it was made in the same year as itself. Since every car was made in its own year, ( R ) is reflexive.

Symmetric: If car ( A ) is related to car ( B ) (both made in the same year), then ( B ) is related to ( A ) (also made in the same year). Thus, ( R ) is symmetric.

Transitive: If car ( A ) is related to car ( B ) (both made in year ( Y )) and ( B ) is related to car ( C ) (also made in year ( Y )), then ( A ) is related to ( C ) (both made in year ( Y )). Hence, ( R ) is transitive.

Since ( R ) satisfies all three properties, it is an equivalence relation.

B B

A partition splits a set into non-overlapping groups, where each item belongs to one group only

so in our case we have cars and these cars can be grouped by the year they were made. the partition splits the cars into separate groups based on their manufacturing year.

Problem 4 4

A A

this is an Euler Circuit, because it has an even amount of connections on the vertex, we can start at one vertext and go along the paths without repeating and end up back to the orginal vertext.

B B

This is an Eueler Trail, because there is two odd vertexts, we can see this at vertex B and F

i took the trail e,d,c,a,d,f,a,b,f,c,b

all though i did not end up back at e , i used each edge once satisfying this is an eueler trail.

C C

i would say this is not an euler circuit or trial

this could be an euler circuler but the vertext A is by itself and it needs to be connected to our graph

this couldnt be a euler trail because vertex A doesnt have an edge and itsnt connected as well.

D D

i would say this is not an euler circuit or trail

because there is way too many odd vertices, i tried to test out if it was possible because i thought i saw two odd vertecies but then i realized it wasnt possible when i recounted the graph and saw there was more than 2 2 odd vertices.

Problem 5 5

drawing a prims algorithm is straightforward. if we alreayd used a vertex point we do not need to re include it unless it is pair with another new vertext and we must keep in mind we need to be conservative to not allow a higher vaule weight we want the minium we can have,

we are told to start at vertex A and from here to complete the prims.

ok but its important to note we start off chosing the lowest vaule weight on the edge to travel to new vertext. so as we look to travel from vertex A we see we have two options, edge AB weight 7 7 or weight 2 2 on edge AC, we take edge AC.

now that we are on vertex C we have two options weight 6 6 on edge CE or weight 4 4 on edge CD. we take CD. From d we do the same process we are connected at C still and A for a reminder. so i ask , where do you think we should go? well we will be going from vertex D to vertex B.

this edge has a weight of 3 3 which is less than the avaible options.

we have connected all vertexts execpt vertex E. so we look to close the prims on vertex E. we have edge CE weight 6 6 or AE weight 5 5 i will be chooise AE weight 5 5

so the primms algorithm look like this

AC weight 2 2 , CD weight 4 4 , DB weight 3 3 , AE weight 5 5 all vertices are used.

Problem 6 6

We just recently learned about reoccurrence relationships and i think the Fibonacci one is pretty useful as well.

ok so for our reoccurrence relationship it says in zylabs we can figure them out by finding two inital vaules and forming a sequence that satifises both inital vaules.

lets test this out we know we have 1000 1000 fish to start out with and we lose 80 80 each month ,

Pn=1.10 1.10×Pn−1 1−80 80

we start denote Pn as the vaule we start with we denote Pn -1 negative 1 as the vaule that is changing and we see that if we have started with month 1 1 Pn would be 1000 1000 and if we use this logic with Pn-1 we csn infer that we are finding the sweet spot for one month or just its raw vaule without even adding more into the sequence like another month or another 2 2 months etc, so base case with 1000 1000 we have it minus itself denoted in Pn-1 this show we have multiplied by 10 10% we get 1100 1100 fish and we then subtract our 80 80 fish that decay monthly. this leaves us with 1020. 1020 period

if we use 1020 1020 as our Pn we than denote it using Pn-1 and the n is the second month these are subscripts and we are just counting a sequence. its not a real math equation as to be subtracting n into p etc. we are just using it to refrenece a counting

as the case we head to the second month and P Pn-2 is 1020 1020 *10 10% and subtract it by 80 80, we do this up to n-5 which is subscript for 5 5 months

the total fish is 1121 1121 after 5 5 months