subject

Kelly has a magic pot which can slowly cook one ingredient into others. She already mastered the cooking techniques and concludes that the process can be modeled using markov chain represented by a transition matrix A. You are given the ingredient list material_list = ["snake oil", "silver", "caviar", "bones", "uranium", "plutonium"] which corresponds to the rows and columns order of A. Each entry Aij of A represents the fraction of the jt ingredient of material_list that will turn into the įthe ingredient per minute without losing any mass. One day Kelly started making some of her magical soup and after a few minutes she realized she forgot to start the timer. She could not remember the time she started cooking, or even the ingredient composition of her initial soup. She can only recall that at the beginning of the cooking, (35+ 0.1)% of the mass of all materials is snake oil. In fear of ruining her precious ingredients, she immediately casts a spell to determine the current composition of the soup and stores it in the vector comp, where each entry is the fraction in terms of mass of each ingredient, following the order in material_list. Write a code snippet to help Kelly with the following: 1. Use the current ingredient composition given in comp to determine the initial ingredient composition. Store in the variable initial_frac the initial fraction of the ingredient bones. 2. Suppose Kelly decides to leave the soup cooking for a very long time, until the ingredient composition in the pot is no longer changing. Help her determine this final ingredient composition and store it in the vector final_comp, where each entry is the fraction in terms of mass of each ingredient, following the order in material_list. The setup code will provide the following variables: The setup code will provide the following variables: A Name Type Description 2d numpy array transition matrix material_list Python list names of the ingredients comp 1d numpy array composition of the ingredients in the pot Your code snippet should define the following variables: Name initial_frac final_comp Type float 1d numpy array Description initial fraction of bones in terms of mass final ingredient composition user_code. py 1 import numpy as np 7 imon+ numny linalo as la

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
What does a cascading style sheet resolve a conflict over rules for an element? a. the rule affecting the most content wins b. the rule affecting the most content loses c. the rule with the most specific selector loses d. the rule with the most specific selector wins
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 06:20
What is a point-in-time measurement of system performance?
Answers: 3
You know the right answer?
Kelly has a magic pot which can slowly cook one ingredient into others. She already mastered the coo...
Questions
question
Mathematics, 06.02.2022 17:30
question
Health, 06.02.2022 17:40
question
Biology, 06.02.2022 17:40
question
Mathematics, 06.02.2022 17:40
question
Biology, 06.02.2022 17:40
Questions on the website: 13722361