Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# Problem 2 - Markov Chain
import numpy as np
def main():
print()
print("CSE 3504 Project 2 - Problem 2:")
print()
print("b) Finding over-time distribution of jobs")
jobTable = np.array([[0.63, 0.25, 0.12], \
[0.30, 0.45, 0.25], \
[0.41, 0.41, 0.18]])
testTable = np.matmul(jobTable, jobTable)
for i in range(1000):
testTable = np.matmul(testTable, jobTable)
print("Professional, Service, Maintanence")
print(testTable)
print()
print("c) Average Earning")
print("${}".format(100000*testTable[0,0]+80000*testTable[0,1]+60000*testTable[0,2]))
if __name__ == '__main__':
main()