Company: Samsung_18sep
Difficulty: medium
Dr. Jang's Division Visit Probability Problem Description Dr. Jang spends his whole working day visiting the divisions of his company. He has one rule: he stays in a division for exactly 10 minutes at a time . His movement is described by a directed graph whose arrows carry probabilities. He starts the day in division 1 at minute 0 . Each time a 10-minute interval ends, he follows exactly one outgoing arrow of the division he is in, choosing it with the probability written on that arrow. Moving between divisions takes no time. An arrow may point back to the same division (a self-loop), which means he stays there for another 10 minutes. For every division that has at least one outgoing arrow, the probabilities on its outgoing arrows add up to exactly 1 . A division with no outgoing arrow is a last stop: Dr. Jang spends his 10 minutes there and then leaves work , so from then on he is in no division at all. Given an elapsed time T in minutes, find the division in which Dr. Jang is most l