The document provides information about a math challenge problem involving probabilities. It contains:
1) A list of 28 possible flavor group combinations for a large box that can contain 3 flavors, with each group's probability calculated as 1/28.
2) The probability of getting all 3 flavors in the small box is calculated as 1/10, and in the large box as 10/28.
3) The probability of rolling a 6 on a dice given that all 3 flavors were obtained is calculated as 0.417 using conditional probability formulas.
A Search Index is Not a Database Index - Full Stack Toronto 2017Toria Gibbs
A search engine is not a database. Search systems are optimized for fast search using an internal data structure called an inverted index. Databases have a similar feature to allow quick access, also called an index, but it’s a totally different thing!
In this talk, Toria Gibbs will take you on a tour of the internals of a search index, comparing it to common implementations of indexing in relational databases. We’ll see how search engines can outperform databases and discuss the tradeoffs in implementing and maintaining such a system. No prior knowledge of database or search index implementations required; experience creating or querying database tables will be helpful.
Introduction to Search Systems - ScaleConf Colombia 2017Toria Gibbs
Often when a new user arrives on your website, the first place they go to find information is the search box! Whether they are searching for hotels on your travel site, products on your e-commerce site, or friends to connect with on your social media site, it is important to have fast, effective search in order to engage the user.
A Search Index is Not a Database Index - Full Stack Toronto 2017Toria Gibbs
A search engine is not a database. Search systems are optimized for fast search using an internal data structure called an inverted index. Databases have a similar feature to allow quick access, also called an index, but it’s a totally different thing!
In this talk, Toria Gibbs will take you on a tour of the internals of a search index, comparing it to common implementations of indexing in relational databases. We’ll see how search engines can outperform databases and discuss the tradeoffs in implementing and maintaining such a system. No prior knowledge of database or search index implementations required; experience creating or querying database tables will be helpful.
Introduction to Search Systems - ScaleConf Colombia 2017Toria Gibbs
Often when a new user arrives on your website, the first place they go to find information is the search box! Whether they are searching for hotels on your travel site, products on your e-commerce site, or friends to connect with on your social media site, it is important to have fast, effective search in order to engage the user.
Pre-Calculus Quarter 4 Exam
1
Name: _________________________
Score: ______ / ______
1. Find the indicated sum. Show your work.
2. Locate the foci of the ellipse. Show your work.
𝑥2
36
+
𝑦2
11
= 1
Pre-Calculus Quarter 4 Exam
2
3. Solve the system by the substitution method. Show your work.
2y - x = 5
x2 + y2 - 25 = 0
4. Graph the function. Then use your graph to find the indicated limit. You do not have to
provide the graph
f(x) = 5x - 3, f(x)
5. Use Gaussian elimination to find the complete solution to the system of equations, or state
that none exists. Show your work.
4x - y + 3z = 12
x + 4y + 6z = -32
5x + 3y + 9z = 20
Pre-Calculus Quarter 4 Exam
3
6. Solve the system of equations using matrices. Use Gaussian elimination with back-
substitution.
x + y + z = -5
x - y + 3z = -1
4x + y + z = -2
7. A woman works out by running and swimming. When she runs, she burns 7 calories per
minute. When she swims, she burns 8 calories per minute. She wants to burn at least 336
calories in her workout. Write an inequality that describes the situation. Let x represent the
number of minutes running and y the number of minutes swimming. Because x and y must be
positive, limit the boarders to quadrant I only.
Short Answer Questions: Type your answer below each question. Show your work.
8. A statement Sn about the positive integers is given. Write statements S1, S2, and S3, and show that
each of these statements is true. Show your work.
Sn: 1
2
+ 4
2
+ 7
2
+ . . . + (3n - 2)
2
=
𝑛(6𝑛2−3𝑛−1)
2
Pre-Calculus Quarter 4 Exam
4
9. A statement Sn about the positive integers is given. Write statements Sk and Sk+1, simplifying
Sk+1 completely. Show your work.
Sn: 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + . . . + n(n + 1) = [n(n + 1)(n + 2)]/3
10. Joely's Tea Shop, a store that specializes in tea blends, has available 45 pounds of A grade tea and
70 pounds of B grade tea. These will be blended into 1 pound packages as follows: A breakfast
blend that contains one third of a pound of A grade tea and two thirds of a pound of B grade tea
and an afternoon tea that contains one half pound of A grade tea and one half pound of B grade
tea. If Joely makes a profit of $1.50 on each pound of the breakfast blend and $2.00 profit on
each pound of the afternoon blend, how many pounds of each blend should she make to
maximize profits? What is the maximum profit?
11 Your computer supply store sells two types of laser printers. The first type, A, has a cost of $86
and you make a $45 profit on each one. The second type, B, has a cost of $130 and you make a
$35 profit on each one. You expect to sell at least 100 laser printers this month and you need to
make at least $3850 profit on them. How many of what type of p
Pre-Calculus Final ExamName _________________________ Score.docxChantellPantoja184
Pre-Calculus Final Exam
Name: _________________________
Score: ______ / ______
Multiple Choice: Type your answer choice in the blank next to each question number.
_____1.
Find the indicated sum.
A. 2
B. 54
C. 46
D. -54
_____2.
Graph the ellipse and locate the foci.
A.
foci at (0, 6) and (0, -6)
C.
foci at (, 0) and (-, 0)
B.
foci at ( 5, 0) and (-5, 0)
D.
foci at (0, 5) and (0, -5)
_____3.
Solve the system by the substitution method.
2y - x = 5
x2 + y2 - 25 = 0
A.
B.
C. {( 5, 0), ( -5, 0), ( 3, 4)}
D. {( -5, 0), ( 3, 4)}
_____4.
Graph the function. Then use your graph to find the indicated limit.
f(x) = 5x - 3, f(x)
A. 5
B. 25
C. 2
D. 22
_____5.
Use Gaussian elimination to find the complete solution to the system of equations, or state that none exists.
4x - y + 3z = 12
x + 4y + 6z = -32
5x + 3y + 9z = 20
A. {(8, -7, -2)}
B. {(-8, -7, 9)}
C. ∅
D. {(2, -7, -1)}
_____6.
Solve the system of equations using matrices. Use Gaussian elimination with back-substitution.
x + y + z = -5
x - y + 3z = -1
4x + y + z = -2
A. {( 1, -4, -2)}
B. {( -2, 1, -4)}
C. {( 1, -2, -4)}
D. {( -2, -4, 1)}
_____7.
A woman works out by running and swimming. When she runs, she burns 7 calories per minute. When she swims, she burns 8 calories per minute. She wants to burn at least 336 calories in her workout. Graph an inequality that describes the situation. Let x represent the number of minutes running and y the number of minutes swimming. Because x and y must be positive, limit the graph to quadrant I only.
A.
C.
B.
D.
Short Answer Questions: Type your answer below each question. Show your work.
8
A statement Sn about the positive integers is given. Write statements S1, S2, and S3, and show that each of these statements is true.
Sn: 12 + 42 + 72 + . . . + (3n - 2)2 =
9
A statement Sn about the positive integers is given. Write statements Sk and Sk+1, simplifying Sk+1 completely.
Sn: 1 ∙ 2 + 2 ∙ 3 + 3 ∙ 4 + . . . + n(n + 1) = [n(n + 1)(n + 2)]/3
10
Joely's Tea Shop, a store that specializes in tea blends, has available 45 pounds of A grade tea and 70 pounds of B grade tea. These will be blended into 1 pound packages as follows: A breakfast blend that contains one third of a pound of A grade tea and two thirds of a pound of B grade tea and an afternoon tea that contains one half pound of A grade tea and one half pound of B grade tea. If Joely makes a profit of $1.50 on each pound of the breakfast blend and $2.00 profit on each pound of the afternoon blend, how many pounds of each blend should she make to maximize profits? What is the maximum profit?
11
Your computer supply store sells two types of laser printers. The first type, A, has a cost of $86 and you make a $45 profit on each one. The second type, B, has a cost of $130 and you make a $35 profit on each one. You expect to .
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Round1: Maths Challenge organised by ‘rep2rep’ research group at Sussex&Cambridge universities
1. Full name: MOHAMMED ALASMAR
Email: M.ALASMAR@SUSSEX.AC.UK
GENERAL INFORMATION
Problem & Approaches to Solutions
MATHS CHALLENGE1
http://users.sussex.ac.uk/~gg44/rep2rep/1
The problems that have been solved:
Problem 1 - Cartesian Plane
Problem 2 - Box of Chocolates
Problem 4 - Maze
1
30/09/2018
3. !" + !$
2
!"
!$
&" &$
&" + &$
2
Ø The midpoint between the points: &", !" and &$, !$ is given by the following
formula (see Fig.1):
Midpoint =
()*(+
$
,
,)*,+
$
Ø The coordinates of the midpoint are integers iff:
• &" + &$ is an even number AND
• !" + !$ is an even number
Ø The sample space contains the following possible outcomes:
&" + &$ -.-/ , &" + &$ 011 , !" + !$ -.-/ and !" + !$ 011
Ø The probability of each outcomes is:
2[ &" + &$ -.-/] = 2[ &" + &$ 011] = 2[ !" + !$ -.-/] = 2[ !" + !$ 011] = 0.5
i.e., the probability of the sum of two integers to be even = 0.5, and the probability of the sum
of two integers to be odd = 0.5 (we prove these probabilities in solution #2)
Ø Table.1 shows all the possible outcomes with their probabilities. The joint probabilities in Table. 1 are as follows:
2[ &" + &$ -.-/ ∩ !" + !$ -.-/] = 2[ &" + &$ -.-/ ∩ !" + !$ 011] =
2[ &" + &$ 011 ∩ !" + !$ -.-/] = 2[ &" + &$ 011 ∩ !" + !$ 011] = 0.25
Ø The probability that the middle point of the segment that joins the two integer points has integer coordinates =
2[ &1 + &2 ;<;= ∩ !1 + !2 ;<;=] = 0.25
Fig 1
Table 1
&" + &$ -.-/ &" + &$ >??
!" + !$ -.-/ 0.25 0.25 0.5
!" + !$ 011 0.25 0.25 0.5
0.5 0.5 1
3
4. !" #$#%
!" &''
!( #$#%
!( &''
!( #$#%
!( &''
0.5
0.5
0.5
0.5
0.5
0.5
Fig 2
Ø The midpoint between the points: !", -" and !(, -( is given by the following formula:
Ø The coordinates of the midpoint are integers iff:
• !" + !( is an even number AND
• -" + -( is an even number
Ø The sum of two integers is even iff both integers are either even or odd, i.e.
/0/1 + /0/1 = /0/1
/0/1 + 344 = 344
344 + /0/1 = 344
344 + 344 = /0/1
Ø The probability that the sum of two integers !" + !( is even =
5[ 78 + 79 :;:<] = > !" #$#%. !( #$#% + > !" &''. !( &'' = 0.25 + 0.25 = 0.5
, as depicted in the tree diagram in Fig.2.
Ø Similarly, the probability that the sum of two integers !1 + !2 is odd =
5[ 78 + 79 ABB] = > !1 /0/1. !2 344 + > !1 344. !2 /0/1 = 0.25 + 0.25 = 0.5
Ø This means that the probability of each outcomes is:
>[ !" + !( #$#%] = >[ !" + !( &''] = >[ -" + -( #$#%] = >[ -" + -( &''] = 0.5
Midpoint =
CDECF
(
,
GDEGF
(
> !" #$#%. !( #$#%
= 0.5×0.5 = 0.25
> !" &''. !( &''
= 0.5×0.5 = 0.25
> !" #$#%. !( &''
= 0.5×0.5 = 0.25
> !" &''. !( #$#%
= 0.5×0.5 = 0.25
Cont…
4
5. !" + !$ %&%'
!" + !$ ())
*" + *$ %&%'
*" + *$ ())
*" + *$ %&%'
*" + *$ ())
0.5
0.5
0.5
0.5
0.5
0.5
P !" + !$ %&%' ∩ *" + *$ %&%' = 0.5×0.5 = 0.25
Fig 3
Ø Fig.3 shows the tree diagram for all possible outcomes with their probabilities.
Ø The probability that the middle point of the segment that joins the two points has integer coordinates (see Fig.3) =
P !" + !$ %&%' ∩ *" + *$ %&%' = 0.5×0.5 = 0.25
5
6. !" #$#%
!" &''
!( #$#%
!( &''
0.5×0.5×0.5×0.5 = 0.0625
!( #$#%
!( &''
!" #$#%
!" &''
!( #$#%
!( &''
!( #$#%
!( &''
!" #$#%
!" &''
!( #$#%
!( &''
!( #$#%
!( &''
!" #$#%
!" &''
!( #$#%
!( &''
!( #$#%
!( &''
0( #$#%
0( &''
0( #$#%
0( &''
0" #$#%
0" &''
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5
0.5×0.5×0.5×0.5 = 0.0625
0.5×0.5×0.5×0.5 = 0.0625
0.5×0.5×0.5×0.5 = 0.0625
Ø The probability that the middle point of the segment that joins them has integer coordinates (see Fig.4)
= 0.0625 + 0.0625 + 0.0625 + 0.0625 = 0.25
Midpoint =
23425
(
,
73475
(
Ø The sum of two integers is even iff both
integers are either even or odd, i.e.
898: + 898: = 898:
;<;= + >?? = >??
>?? + ;<;= = >??
@AA + @AA = BCBD
Ø The coordinates of the midpoint are integers iff:
• 0" + 0( is an even number AND
• !" + !( is an even number
Fig 4
6
7. !" !# $" $# !" + !# $" + $# Is !" + !# AND
$" + $# even?
0 0 0 0 1 1 YES
0 0 0 1 1 0 NO
0 0 1 0 1 0 NO
0 0 1 1 1 1 YES
0 1 0 0 0 1 NO
0 1 0 1 0 0 NO
0 1 1 0 0 0 NO
0 1 1 1 0 1 NO
1 0 0 0 0 1 NO
1 0 0 1 0 0 NO
1 0 1 0 0 0 NO
1 0 1 1 0 1 NO
1 1 0 0 1 1 YES
1 1 0 1 1 0 NO
1 1 1 0 1 0 NO
1 1 1 1 1 1 YES
Midpoint =
()*(+
#
,
-)*-+
#
Ø The coordinates of the midpoint are integers iff:
• !" + !# is an even number AND
• $" + $# is an even number
Ø Let’s use the binary digit 1 to represent the ‘even’ state and the binary digit 0 to
represent the ‘odd’ state.
Ø Hence, the following facts can be represented as shown in Table 2.
./.0 + ./.0 = ./.0, 2. ., 4 + 4 = 4
5657 + 899 = 899, 2. ., 4 + : = :
899 + 5657 = 899, 2. ., : + 4 = :
;<< + ;<< = =>=?, 2. ., : + : = 4
Ø There are 4 inputs in this binary system (!", !#, $" and $#), so we get 2^4 = 16
different binary presentations (from 0 to 15), as shown in Table 3.
Ø There are 4 cases out of 16 where both !" + !# and $" + $# are even
numbers (as shown in Table 3). This means that the probability that the midpoint
has integers = 4/16 = 0.25.
!" !# !" + !#
4 4 4
1 0 0
0 1 0
: : 4
Table 2
$" $# $" + $#
4 4 4
1 0 0
0 1 0
: : 4
Table 3
Inputs
7
9. 1. 1 1 1 1 1 1
2. 1 1 1 1 1 2
3. 1 1 1 1 1 3
4. 1 1 1 1 2 2
5. 1 1 1 1 2 3
6. 1 1 1 1 3 3
7. 1 1 1 2 2 2
8. 1 1 1 2 2 3
9. 1 1 1 2 3 3
10. 1 1 1 3 3 3
11. 1 1 2 2 2 2
12. 1 1 2 2 2 3
13. 1 1 2 2 3 3
14. 1 1 2 3 3 3
15. 1 1 3 3 3 3
16. 1 2 2 2 2 2
17. 1 2 2 2 2 3
18. 1 2 2 2 3 3
19. 1 2 2 3 3 3
20. 1 2 3 3 3 3
21. 1 3 3 3 3 3
22. 2 2 2 2 2 2
23. 2 2 2 2 2 3
24. 2 2 2 2 3 3
25. 2 2 2 3 3 3
26. 2 2 3 3 3 3
27. 2 3 3 3 3 3
28. 3 3 3 3 3 3
9
Large Box (LB)
Small Box (SB)
Step 1: Finding the number of flavours groups in the Small Box (SB).
Each box is filled at random with some selection of flavours (f1, f2 and f3), i.e., the
small box will contain one of these flavours groups (10 groups):
1. 1 1 1
2. 1 1 2
3. 1 1 3
4. 1 2 2
5. 1 2 3
6. 1 3 3
7. 2 2 2
8. 2 2 3
9. 2 3 3
10. 3 3 3
(note that numbers here represent flavours i.e., 1 represents f1, 2 represents f2
and 3 represents f3)
It is obvious that we can form 10 different groups in the small box. These groups
contain unordered sampling (for example f1f2f3 is same as f3f2f1 as order is not
important) with replacement (i.e., we might get the same flavour more than once
in the box). This number of groups can be confirmed through this combination
calculation (we explain this formula in Solution #2):
6
3
#Flavours + BoxSize − 1
BoxSize
=
3 + 3 − 1
3
=
5
3
=
5!
3!2!
= 10
Step 2: Similarly, finding the number of flavours groups in the
Large Box (LB). The large box will contain one of these
flavours groups (28 groups):
#Flavours + BoxSize − 1
BoxSize
=
3 + 6 − 1
6
=
8
6
=
8
2
= 28
Cont…
10. 10
5/6
1/6
Step 3: The number of groups with all flavours (i.e., !1!2!3) are as follows:
in the small box: 1 out of 10 groups,
and in the large box: 10 out of 28 groups (see all the possible groups in the previous page)
Step 4: the large box will be chosen only when the dice comes 6 (i.e., with probability 1/6),
otherwise the small box will be chosen (i.e., with probability of 5/6).
Thus, %['(] = 5/6 ./0 %[1(] = 1/6
Step 4: the question asks for the probability that the dice came 6 (i.e., 1() given that the box has all 3 flavours (i.e., !1!2!3)
This is a conditional probability that can be written as follows (the conditional probability between two events):
%[ 1( | !1!2!3 ] =
% 1( ∩ !1!2!3
% !1!2!3
= =
1
6
×
10
28
1
6
×
10
28
+
5
6
×
1
10
=
0.0595
0.143
= 0.417
11. 1. 1 1 1 1 1 1
2. 1 1 1 1 1 2
3. 1 1 1 1 1 3
4. 1 1 1 1 2 2
5. 1 1 1 1 2 3
6. 1 1 1 1 3 3
7. 1 1 1 2 2 2
8. 1 1 1 2 2 3
9. 1 1 1 2 3 3
10. 1 1 1 3 3 3
11. 1 1 2 2 2 2
12. 1 1 2 2 2 3
13. 1 1 2 2 3 3
14. 1 1 2 3 3 3
15. 1 1 3 3 3 3
16. 1 2 2 2 2 2
17. 1 2 2 2 2 3
18. 1 2 2 2 3 3
19. 1 2 2 3 3 3
20. 1 2 3 3 3 3
21. 1 3 3 3 3 3
22. 2 2 2 2 2 2
23. 2 2 2 2 2 3
24. 2 2 2 2 3 3
25. 2 2 2 3 3 3
26. 2 2 3 3 3 3
27. 2 3 3 3 3 3
28. 3 3 3 3 3 3
11
Step 1: The number of flavours groups in the Large Box (LB). The
large box will contain one of these flavours groups (28 groups):
#Flavours + BoxSize − 1
BoxSize
=
3 + 6 − 1
6
=
8
6
= 28
Step 2: We would like to present the sample groups in Step 1 using some codes. For
example,
So on … for the all samples.
This coding scheme requires six symbols ‘×’ (corresponding to box size = 6) and two
separation symbols ‘|’ (one less than the number flavours)
Step 3: We can formulate the total number of groups based on this coding scheme. It is
clear that the total number of combinations (which we have already shown in step 1) =
(why 8 choose 6? Ans. In the code there are 6 ‘x’ symbols plus 2 ‘|’ symbols, so the total
options is 6+2=8 and we want to choose 6 (box size) out of the 8 options.
Thus, the general formula can be written as follows:
)*)*)*)*)*)* = xxxxxx||
)*)*)*)*)*)- = xxxxx||x
..
)*)*)*)*)-). = xxxx|x|x
..
)*)*)*)-).). = xxx x xx
..
)*)*)*).).). = xxx||xxx
Coding
8
6
=
8
2
=
/!
-! 1!
= 28
Cont…
12. 12
Step 4: similarly, the total number of available groups if box size is 3 =
Step 5: Now, the number of samples (groups) that contain all flavours =
If BoxSize = 6, then the number of samples (groups) that contain all flavours =
If BoxSize = 3, then the number of samples (groups) that contain all flavours =
#Flavours + BoxSize − 1
BoxSize
=
3 + 3 − 1
3
=
5
3
= 10
()()()()()() = xxxxxx||
()()()()()(, = xxxxx||x
..
()()()()(,(- = xxxx|x|x
..
()()()(,(-(- = xxx x xx
..
()()()(-(-(- = xxx||xxx
BoxSize − .
BoxSize − /
6 − 1
6 − 3
=
5
3
= 10
3 − 1
3 − 3
=
2
0
= 1
Step 6: the question asks for the probability that the dice came 6 (i.e., 23) given that the box has all 3 flavours (i.e., (1(2(3)
This is a conditional probability that can be written as follows (the conditional probability between two events):
4[ 23 | (1(2(3 ] =
4 23 ∩ (1(2(3
4 (1(2(3
= =
1
6
×
10
28
1
6
×
10
28
+
5
6
×
1
10
=
0.0595
0.143
= 0.417
14. G1 G2
R1
R2R3
R4
C1
C2
C3C4
Deadlock?
C1 C2 C3 C4 R1 R2 R3 R4 G1 G2
C1 0 1/3 0 0 0 1/3 1/3 0 0 0
C2 1/3 0 1/3 1/3 0 0 0 0 0 0
C3 0 1/3 0 0 1/3 0 0 0 0 1/3
C4 0 1/3 0 0 0 0 0 1/3 1/3 0
R1 0 0 0 0 1 0 0 0 0 0
R2 0 0 0 0 0 1 0 0 0 0
R3 0 0 0 0 0 0 1 0 0 0
R4 0 0 0 0 0 0 0 1 0 0
G1 0 0 0 0 0 0 0 0 1 0
G2 0 0 0 0 0 0 0 0 0 1
P =
Step 2: Generate the total transition matrix (the absorbing
Markov chain):
Step 1: Give name to each state in the maze, as shown in Fig 1.
There are 10 states in this maze: C1, C2, C3, C4, R1, R2, R3, R4,
G1 and G2.
Note that the states G1, G2, R1, R2, R3 and R4 of the
Markov chain are called absorbing, as the probabilities:
PG1G1 = PG2G2 = PR1R1 = PR2R2 = PR3R3 = PR4R4 = 1, i.e., if the
chain reaches any of these states it is stuck there forever.Fig 1
Cont…
14
15. Step 3: The probability that the dot will end in one of the green squares(C1 is the starting position X0) can be described
by the conditional probability as follows:
P(Xn = G1| X0 =C1) + P(Xn = G2| X0 =C1), n → ∞
= PC1G1
#+ PC1G2
#
% #
=Step 4: Use Matlab to find:
C1
C2
C3
C4
R1
R2
R3
R4
G1
G2
C1 C2 C3 C4 R1 R2 R3 R4 G1 G2
PC1G1
#+ PC1G2
#= 0.0556 + 0.0556 = 0.1112
15
The Markov chain converges to the values shown in this matrix (we used n=1000 steps, i.e., % &''' )
Step 5: Finally, from this matrix we can find the required provability:
16. G1 G2
R1
R2R3
R4
C1
C2
C3C4
C1 C2 C3 C4 R1 R2 R3 R4 G1 G2
C1 0 1/3 0 0 0 1/3 1/3 0 0 0
C2 1/3 0 1/3 1/3 0 0 0 0 0 0
C3 0 1/3 0 0 1/3 0 0 0 0 1/3
C4 0 1/3 0 0 0 0 0 1/3 1/3 0
R1 0 0 0 0 1 0 0 0 0 0
R2 0 0 0 0 0 1 0 0 0 0
R3 0 0 0 0 0 0 1 0 0 0
R4 0 0 0 0 0 0 0 1 0 0
G1 0 0 0 0 0 0 0 0 1 0
G2 0 0 0 0 0 0 0 0 0 1
P =
Step 2: Generate the total transition matrix (the absorbing
Markov chain):
Step 1: Give name to each state in the maze, as shown below.
There are 10 states in this maze: C1, C2, C3, C4, R1, R2, R3, R4,
G1 and G2.
Note that C1, C2, C3 and C4 are transient states, while
R1, R2, R3, R4 ,G1 and G2 are absorbing states.
Note that the states G1, G2, R1, R2, R3 and R4 of the
Markov chain are called absorbing, as the probabilities:
PG1G1 = PG2G2 = PR1R1 = PR2R2 = PR3R3 = PR4R4 = 1, i.e., if the
chain reaches any of these states it is stuck there forever.
16
Cont…
17. C1 C2 C3 C4
C1 0 1/3 0 0
C2 1/3 0 1/3 1/3
C3 0 1/3 0 0
C4 0 1/3 0 0
R1 R2 R3 R4 G1 G2
C1 0 1/3 1/3 0 0 0
C2 0 0 0 0 0 0
C3 1/3 0 0 0 0 1/3
C4 0 0 0 1/3 1/3 0
C1 C2 C3 C4
C1 1 -1/3 0 0
C2 -1/3 1 -1/3 -1/3
C3 0 -1/3 1 0
C4 0 -1/3 0 1
! = # − % &'
=
C1 C2 C3 C4
C1 1.1667 0.5000 0.1667 0.1667
C2 0.5000 1.5000 0.5000 0.5000
C3 0.1667 0.5000 1.1667 0.1667
C4 0.1667 0.5000 0.1667 1.1667
Step 3: The transition matrix has the following format:
Thus,
% = and ( =
Now, # − % =
RQ
I0
Transient states Absorbing states
The entries of W are ‘mean times’ spent in transient states.
For example, the entry WC1C2 is the mean time spent in state C2 given
that the initial state is C1.
TransientAbsorbing
17
The inverse of
the matrix # − %
Cont…
18. where
! is the initial transient state (which is C1 in this question),
" is the last transient state before absorption (which are C4 and C3 in this question) and
# is all relevant absorbing states (which are G1 and G2 in this question)
Hence,
$ %&'( = " | %+ = ! = ,-. /
0
$.0
$ %&'( = 13 | %+ = 11 = ,4(45. $4578 = 0.1667 ×
1
3
= =. =>>?
$ %&'( = 14 | %+ = 11 = ,4(4A. $4A7( = 0.1667 ×
1
3
= =. =>>?
Step 4: Now, the probability of reaching an absorbing state when starting
from an initial state can be obtained using:
18
, = B − D '( =
C1 C2 C3 C4
C1 1.1667 0.5000 0.1667 0.1667
C2 0.5000 1.5000 0.5000 0.5000
C3 0.1667 0.5000 1.1667 0.1667
C4 0.1667 0.5000 0.1667 1.1667
Step 5: Finally, The probability that the dot will end in
one of the green squares = 0.0556 + 0.0556 = 0.1112
19. C1
R2
R3
C2
C4
C3
C1
G2
R1
C2
R2
R3
C2
G1
R4
C2
C4
C3
C1
G2
R1
C2
R2
R3
C2
G1
R4
C2
C4
C3
C1
G2
R1
C2
R2
R3
C2
G1
R4
C2
C4
C3
C1
G2
R1
C2
R2
R3
C2
G1
R4
C2
P[G1]=
!
"
×
!
"
×
!
"
+ 3
!
"
×
!
"
×
!
"
×
!
"
×
!
"
+ 9
!
"
×
!
"
×
!
"
×
!
"
×
!
"
×
!
"
×
!
"
=
!
'(
+ 3
!
')"
+ 9
!
'!*(
=
1
27
+
1
3×27
+
1
9×27
/
01
/ +
/
2
+
/
3
= 0.0535
Both G1 and G2 are symmetric in the maze when the starting point is C1.
Thus: P[G2] = P[G1] = 0.0535
Step 3: Getting more approximate probability value by extending the tree.
It is clear from step 2 that P[G1] has this formula (there is no space to show
longer tree here):
P[G1] =
/
01
/ +
/
2
+
/
3
+
/
01
+
/
7/
+
/
082
+
/
103
+ ⋯ = :. :;;
Similarly, P[G2]= 0.055. Thus, P[G1]+P[G2]= 0.055+0.055 = 0.11
In this solution, we use the tree diagram.
Due to space constraint, we won’t be able to have an infinite
tree size. Hence, we calculate the required probability at
some converging point (~7 steps).
Step 1: create a tree diagram for the first 7 steps of the
chain (as shown in the tree diagram on the right).
Step 2: find the probability:
19
20. 1
2
3
4
5
6
7
8
9
10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
TransitionProbability
>> Q=[ 0, 1/3, 0, 0;
1/3, 0, 1/3, 1/3;
0, 1/3, 0, 0;
0, 1/3, 0, 0];
>> R=[ 0, 1/3, 1/3, 0, 0, 0;
0, 0, 0, 0, 0, 0;
1/3, 0, 0, 0, 0, 1/3;
0, 0, 0, 1/3, 1/3, 0];
>> P=[ Q , R ;
zeros(6,4), eye(6,6)];
>> mc=dtmc(P);
>> numstates = mc.NumStates
numstates = 10
>> graphplot(mc,'ColorEdges',true);
https://uk.mathworks.com/help/econ/dtmc.html
C1
R3
R2
C2
C3
C4
G1
G2
R1
R4
State 1: C4
State 2: C2
State 3: C3
State 4: C1
State 5: R1
State 6: R4
State 7: G1
State 8: R3
State 9: R2
State 10: G2
Note:
This solution is based on Matlab.
Step 1: Enter the transition matrix P and plot the state diagram (10 states)
20
Cont…
21. Step 2: Plotting Markov chain redistributions for n-steps (we use 20 steps here).
The number of steps should be large enough, so the n-step probabilities are converging.
Animated histogram of the redistributions. The vertical axis displays probability
mass, and the horizontal axis displays states.
>> mc=dtmc(P);
% the initial state distribution x0 = 4 (which is C1 as shown in the previous page)
>> X = redistribute(mc,numSteps,'X0',[0 0 0 1 0 0 0 0 0 0])
>> distplot(mc,X,'Type','histogram','FrameRate',4);
21
Cont…
22. Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.2
0.4
0.6
0.8
1
Probability
Step 0
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.2
0.4
0.6
0.8
1
Probability
Step 1
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.2
0.4
0.6
0.8
1
Probability
Step 3
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 5
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 6
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 7
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 8
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.2
0.4
0.6
0.8
1
Probability
Step 2
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 4
x-axis:
State 1: C4
State 2: C2
State 3: C3
State 4: C1
State 5: R1
State 6: R4
State 7: G1
State 8: R3
State 9: R2
State 10: G2
Step 0
Start at C1
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Plot Markov chain
redistributions.
Cont…
23. Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 12
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 13
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 14
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 15
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 16
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 17
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 18
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 19
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 20
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 9
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 10
Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 11
Step 18
Step 19
Step 20
Step 15
Step 16
Step 17
Step 12
Step 13
Step 14
Step 9
Step 10
Step 11
The 20-step
probabilities are
converging.
Cont…
24. Distribution of States
1 2 3 4 5 6 7 8 9 10
State
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
Step 20
G1 G1
0.0556
The probability that the dot will end in one of the
green squares= 0.0556 + 0.0556 = 0.1112
x-axis:
State 1: C4
State 2: C2
State 3: C3
State 4: C1
State 5: R1
State 6: R4
State 7: G1
State 8: R3
State 9: R2
State 10: G2
24
Step 20
Step 3: Finally, from the last histogram figure we can find the converging probability for G1 and
G2 given that C1 was the initial state.