Let G be a graph whose vertices are the integers 1 through 8, and let the adjacent vertices of each vertex be given by the table below:
|
vertex |
adjacent vertices |
|
1 |
(2, 3, 4) |
|
2 |
(1, 3, 4) |
|
3 |
(1, 2, 4) |
|
4 |
(1, 2, 3, 6) |
|
5 |
(6, 7, 8) |
|
6 |
(4, 5, 7) |
|
7 |
(5, 6, 8) |
|
8 |
(5, 7) |
Assume that, in a traversal of G, the adjacent vertices of a given vertex are returned in the same order as they are listed in the above table.
Order the vertices as they are visited in a DFS traversal starting at vertex 1.
Order the vertices as they are visited in a BFS traversal starting at vertex 1.
In: Computer Science
Let A be a square matrix defined by \( A=\begin{pmatrix}4&-2&1\\ 2&0&1\\ 2&-2&3\end{pmatrix}\hspace{2mm} \)Find the minimal polynomial of A. Then express \( A^4 \) and \( A^{-1} \) in terms of A and I.
In: Advanced Math
|
Which of the following statements explains why oil has a greater viscosity than water? |
1. Oil molecules always move slower than water molecules 2. Oil molecules have more space in between them than water molecules 3. Oil molecules have a more complicated shape than water molecules 4. Oil molecules are less dense than water molecules |
|
Which of the following statements is incorrect? |
1. A catalyst does not alter the state of equilibrium in a chemical reaction 2. A catalyst remains unchanged at the end of a chemical reaction 3. A catalyst is highly specific in its action 4. A catalyst initiates a reaction. |
|
White phosphorous is stored under water, because |
1. it does not react with water 2. it is poisonous 3. it is unstable 4. its kindling temperature in dry air is very low |
|
With increase in the number of shell passes, the value of FT(Temperature correction factor) |
1. remains same 2. remains same, only if the number of tube passes does not change. 3. decreases 4. increases |
|
Use of baffles in agitators help in minimizing the __________ tendency. |
1. both swirling and vortex 2. vortex 3. swirling 4. neither swirling nor vortex |
|
In liquid-liquid equilibrium studies, a system is called type II if |
1. the A-C pair is immiscible 2. the B-C and A-B pairs are partly miscible 3. the B-C pair is completely miscible 4. A-B miscible |
|
The cross over frequency of the process which is having the transfer function of G(s) = 5/(2s+1)4 |
1. 20 2. 0.1 3. 0.5 4. 0.05 |
|
Molecularity of an elementary reaction P + Q = R + S is |
1. 1 2. 2 3. 3 4. 4 |
|
Cavitation in centrifugal pumps is caused by |
1. High fluid velocity at suction 2.low barometric pressure 3.low suction pressure 4.high suction pressure |
|
Cavitation in centrifugal pumps may be eliminated by maintaining |
1.suction pressure higher than vapor pressure of the liquid at the suction temperature. 2. suction pressure sufficiently lower than vapor pressure of the liquid at the suction temperature. 3.liquid velocity at the suction less than 0.3 ft/s 4.suction pressure less than 1 atm. |
|
consider distribution of the solute C in two partially miscible solvents A(carrier) and B(solvent). What is the selectivity of separation at the plait point? |
1. 1 2. very large 3. Zero 4. less |
|
Cooling water fouling factors vary in the range of 0.001 to 0.003. What is the SI unit? |
1. (kcal/hr. m. °C)-1 2. (W/m2.°K)-1 3. (BTU/hr.ft2. °F)-1 4. (kcal/hr.m2.°C)-1 |
|
Industrially, the process of sedimentation is conducted on a large scale in equipment called |
1.sorting classifiers 2.cyclones 3.thickeners 4.filters |
|
The Schedule number is an indication of |
1.material density 2.pipe wall thickness 3.pipe size 4.pipe roughness |
Answer all the MCQs correctly with proper explanation.
In: Other
1A) Let ?(?) = 3? + 2. Use the ? − ? definition to prove that lim?→1 3? + 2 ≠ 1.
Definition and proof.
1B) Let ?(?) = 2?^2 − 4? + 5. Use the ? − ? definition to prove that lim?→−1 2?^2 − 4? + 5 ≠ 8.
definition and ? − ? Proof.
In: Math
Stuck in the mud is a popular dice game in UK. The game uses five (5) 6-sided dice to play. The players play in turns.
Choose one player to start the game. The player will roll all five (5) dice. If the player rolled any 2s or 5s, the player does not score any points for this throw. The player can only score on a roll which does not include the number 2 and 5. Any dice with a 2 or a 5 becomes stuck in the mud. If this throw does not contain any 2s or 5s, the score is incremented by the sum of the dice values.
The player needs to set aside any 2s and 5s and throw the remaining dice. Again, if any 2s or 5s are rolled, the score will not be incremented for this throw. Throws without 2s and 5s are added to the previous total score.
Continue in this way until all the dice are stuck. Save the score and pass the dice to the next player.
Players can agree a total number of rounds to play in advance. Total up the score. The player with the highest score wins the game. The following link contains the detail game description: https://www.activityvillage.co.uk/stuck-in-the-mud.
Write a MATLAB program to simulate the Stuck in the Mud game with additional features that can:
• Use five (5) 6-sided dice to automatically play the Stuck in the Mud game against a player.
• Greet the player when the game starts.
• Let the player to choose the number of rounds to play. Take care of the user input to ensure the program will not crash with inputs like 0, 1.2, -1, 999, and so on...
The program should not play if the user enters a 0 or any negative value.
• The program should accurately play the number of rounds specified by the user. The player and the computer play in turns for each round.
• The program can always pick one side to start the game first, either the player side or the computer side. Randomly pick a side to start the rotation is optional.
• Print the current round number clearly in the command window.
• If the player side starts first, the program will automatically roll all five (5) dice for the player. If the player rolled any 2s or 5s, the player does not score any points for this throw. The player can only score on a roll which does not include the number 2 and 5. Any dice with a 2 or a 5 becomes stuck in the mud. If this throw does not contain any 2s or 5s, the score is incremented by the sum of the dice values. The player needs to set aside any 2s and 5s and throw the remaining dice. Again, if any 2s or 5s are rolled, the score will not be incremented for this throw. Throws without 2s and 5s are added to the previous total score. Continue in this way until all the dice are stuck.
• The dice rolled for the player, the stuck dice, and the scores during the process should clearly be printed in the command window.
• The program then automatically roll all five (5) dice for the computer. Follow the game rules until all five (5) dice are stuck.
• The dice rolled for the computer, the stuck dice, and the scores during the process should also be clearly printed in the command window.
• Accurately track the total scores for the player and the computer.
• After all the rounds have been played, select a winner based on the highest total score. It is also possible that the game ends in a tie.
• Add voice to the game to report the details of the game for the player. o Pre-recorded computer voices, computerVoices.zip, can be downloaded from moodle.
o The following websites can convert any text into voices with downloadable mp3 files. § www.fromtexttospeech.com
§ www.text2speech.org
o If you have a mic, you can also record your own voice using the Windows Sound Recorder.
o MATLAB can play any WMA, MP3, MPEG-4 AAC, WAV, FLAC audio files.
[y,Fs] = audioread('fileName.mp3'); % read sound file
sound(y,Fs); % play sound file
o Additional sound effects are welcome.
• Add voice to greet the player.
• Add voice to ask the player to enter the number of rounds to play.
• Add voice to announce the current round number (i.e., round 1, round 2, and so on…).
• Add voice to announce the current turn (i.e. the player is rolling or the computer is rolling).
• Add voice to announce the current roll number (i.e. roll 1, roll 2, and so on…).
• Add voice to announce each dice rolled.
• Add voice to announce the sum of the score for the current turn after each throw.
• Add voice to announce the number of dice stuck after each throw.
• After one side played, add voice to announce the current total score for the side. For example, 35 points can be announced as three-five.
• After all the rounds are played, add voice to announce the winner or tie.
• Add pause as needed between sentences to ensure one sentence is finished before the next sentence starts.
• Use at least one user-defined function in the program to reduce code repetition.
The finished program can look like the following example. Extra components are always welcome.
Games do not make you violent, lag does.
Got lag? Kill the lag with a dice game. (Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 2
ROUND 1!!! (Announce round #1.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 5 1 4 5 6 (Announce rolling 5-1-4-5-6.)
Stuck in the mud: 5 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 2 2 2 (Announce rolling 2-2-2.)
Stuck in the mud: 5 2 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 0 (Announce the player score: 0)
The Player Total Scored: 0 (Announce the player total score: 0)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 2 4 3 5 4 (Announce rolling 2-4-3-5-4.)
Stuck in the mud: 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 1 2 4 (Announce rolling 1-2-4.)
Stuck in the mud: 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 3 (Announce roll #3.)
Rolling: 4 2 (Announce rolling 4-2.)
Stuck in the mud: 2 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 4 (Announce roll #4.)
Rolling: 5 (Announce rolling 5.)
Stuck in the mud: 2 5 2 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 0 (Announce the computer score: 0)
The Computer total scored: 0 (Announce the computer total score: 0)
ROUND 2!!! (Announce round #2.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 2 4 4 2 5 (Announce rolling 2-4-4-2-5.)
Stuck in the mud: 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 2 (Announce roll #2.)
Rolling: 2 2 (Announce rolling 2-2.)
Stuck in the mud: 2 2 2 2 5
Game score: 0 (Announce the score: 0)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 0 (Announce the player score: 0)
The Player Total Scored: 0 (Announce the computer score: 0)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 4 4 1 1 1 (Announce rolling 4-4-1-1-1.)
Stuck in the mud:
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 0 (Announce the number of dice stuck: 0)
ROLL 2 (Announce roll #2.)
Rolling: 1 4 5 6 4 (Announce rolling 1-4-5-6-4.)
Stuck in the mud: 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 1 (Announce the number of dice stuck: 1)
ROLL 3 (Announce roll #3.)
Rolling: 6 5 1 1 (Announce rolling 6-5-1-1.)
Stuck in the mud: 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 4 (Announce roll #4.)
Rolling: 2 5 1 (Announce rolling 2-5-1.)
Stuck in the mud: 2 5 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 5 (Announce roll #5.)
Rolling: 5 (Announce rolling 5.)
Stuck in the mud: 2 5 5 5 5
Game score: 11 (Announce the score: 1-1)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 11 (Announce the computer score: 1-1)
The Computer total scored: 11 (Announce the computer total score: 1-1)
The computer wins! (Announce the computer wins.)
>>
The program should end when the player wants to play 0 round.
Games do not make you violent, lag does.
Got lag? Kill the lag with a dice game. (Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 0
The game ends with a tie (Announce the game ends in a tie.)
>>
The program should be able to handle a negative input.
Games do not make you violent, lag does.
Got lag? Kill the lag with a dice game. (Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: -1
The game ends with a tie (Announce the game ends with a tie.)
>>
The program should be able to handle a floating point input without crashing.
(The following example takes the floor value of 1.2 and only runs 1 round. )
Games do not make you violent, lag does.
Got lag? Kill the lag with a dice game. (Play a voice greeting.)
(Play a voice to request the user input.)
Enter the number of rounds to play: 1.2
ROUND 1!!! (Announce round #1.)
The player starts first: (Announce the player’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 3 6 2 2 6 (Announce rolling 3-6-2-2-6.)
Stuck in the mud: 2 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 0)
ROLL 2 (Announce roll #2.)
Rolling: 4 4 4 (Announce rolling 4-4-4.)
Stuck in the mud: 2 2
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 3 (Announce roll #3.)
Rolling: 3 1 5 (Announce rolling 3-1-5.)
Stuck in the mud: 2 2 5
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 3 (Announce the number of dice stuck: 3)
ROLL 4 (Announce roll #4.)
Rolling: 6 5 (Announce rolling 6-5.)
Stuck in the mud: 5 2 2 5
Game score: 12 (Announce the score: 1-2)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 5 (Announce roll #5.)
Rolling: 1 (Announce rolling 1.)
Stuck in the mud: 5 2 2 5
Game score: 13 (Announce the score: 1-3)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 6 (Announce roll #6.)
Rolling: 1 (Announce rolling 1.)
Stuck in the mud: 5 2 2 5
Game score: 14 (Announce the score: 1-4)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 7 (Announce roll #7)
Rolling: 5 (Announce rolling 5.)
Stuck in the mud: 5 5 2 2 5
Game score: 14 (Announce the score: 1-4)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The player scores: 14 (Announce the player score: 1-4)
The Player Total Scored: 14 (Announce the player total score: 1-4)
The computer goes next: (Announce the computer’s turn.)
ROLL 1 (Announce roll #1.)
Rolling: 6 5 6 4 2 (Announce rolling 6-5-6-4-2.)
Stuck in the mud: 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 2 (Announce the number of dice stuck: 2)
ROLL 2 (Announce roll #2.)
Rolling: 2 4 5 (Announce rolling 2-4-5.)
Stuck in the mud: 2 5 5 2
Game score: 0 (Announce the score: 0)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 3 (Announce roll #3.)
Rolling: 4 (Announce rolling 4.
Stuck in the mud: 2 5 5 2
Game score: 4 (Announce the score: 4)
Number of dice stuck: 4 (Announce the number of dice stuck: 4)
ROLL 4 (Announce roll #4.)
Rolling: 2 (Announce rolling 2.)
Stuck in the mud: 2 5 2 5 2
Game score: 4 (Announce the score: 4)
Number of dice stuck: 5 (Announce the number of dice stuck: 5)
The computer scores: 4 (Announce the computer score: 4)
The Computer total scored: 4 (Announce the computer total score: 4)
The player wins! (Announce the player wins.)
>>
In: Computer Science
Three groups are tested in an experiment and the results for the measurements are: Group 1: 5, 7, 5, 3, 5, 3, 3, 9 Group 2: 8, 1, 4, 6, 6, 4, 1, 2 Group 3: 7, 3, 4, 5, 2, 2, 3, 3 Test for the equality of the means at 5% significance.
In: Statistics and Probability
1. Find all eigenvalues of each of the following matrices. (a) |10 −18 b) |2 −1 (c) |5 4 2
6 −11 | 5 -2| 4 5 2
2 2 2|
In: Advanced Math
A Trigonometric Polynomial of order n is a function of the form: ?(?) = ?0 + ?1 cos ? + ?1 sin ? + ?3 cos(2?) + ?2sin(2?) + ⋯ + ?ncos(??) + ?nsin (??)
1) Show that the set {1, cos ? , sin ? , cos(2?) , sin(2?)} is a basis for the vector space
?2 = {?(?) | ?(?)?? ? ????????????? ?????????? ?? ????? ≤ 2}
< ?, ? > = ∫ ?(?)?(?)?? defines an inner-product on T
2) Use Gram-Schmidt to show an ONB for T is:
?0 = 1 √2? , ?1 = 1/ √? cos(?) , ?2 = 1 /√? cos(2?) ?3 = 1/√? sin(?) , ?4 = 1/ √? sin(2?)
Given any ?(?) ∈ ?2
????r? = < ?, ?0 > ?0+ < ?, ?1 > ?1+ . . + < ?, ?4 > ?4
3) Show that in ?m
????r ? = ?0 + ∑ [?n cos(??) + ?nsin (??)] from n to m, when n=1
Where: ?0 = 1/2pi ∫ ?(?)?? from 0 to 2pi
?n = 1/pi∫ ?(?) cos(??) ?? from 0 to 2pi , ? ≥ 1
?n = 1/pi ∫ ?(?) sin(??) ?? from 0 to 2pi , ? ≥ 1
We call the ?/? and ?/? the Fourier Coefficients of ?(?)
We call the Projection the Fourier Series for ?(?)
4) Compute the ?2 series for ?(?) = ?^2 using − pi/2 < ? < pi/2. Plot your series and f(x) together
5) Compute the series for ?(?) = ?^3 using − pi/2 < ? < pi/2 . Plot your series and g(x) together
In: Advanced Math
Please show work.
At prices (p1, p2) = ($4, $1), George buys the bundle (x1, x2) = (10, 20). At prices (p′1, p′2) = ($1, $4), he buys the bundle (x′1, x′2) = (4, 14). At prices (p′′1, p′′2), he buys the bundle (x′′1, x′′2) = (20, 10). If his preferences satisfy the strong axiom of revealed preferences, then it must be that
a. 10p′′1 < 10p′′2.
b. 10p′′1 < 8p2.
c. 8p1 > 8p2.
d. p′′1 = p′′2.
e. None of the above.
In: Economics
Question 1
Stress is defined as
| 1. |
Force x Area |
|
| 2. |
Force - Area |
|
| 3. |
Force + Area |
|
| 4. |
Force/Area |
10 points
Question 2
Stress value below the earth surface depends on:
| 1. |
Density of soil particles |
|
| 2. |
Depth of the point at consideration |
|
| 3. |
Both 1 and 2 |
|
| 4. |
None of the answers |
10 points
Question 3
Neutral Stress results from:
| 1. |
Soil particles |
|
| 2. |
Seismic activity |
|
| 3. |
Both water and soil |
|
| 4. |
Water table |
10 points
Question 4
In a soil with lateral stress coefficient K = 0.9, a vertical stress of 1000 psf is applied, the horizontal stress is:
| 1. |
Not known |
|
| 2. |
1000 psf |
|
| 3. |
100 psf |
|
| 4. |
900 psf |
10 points
Question 5
Stresses in deeper layers of soil are:
| 1. |
Applied on building footprint area |
|
| 2. |
Applied on a larger area than the building footprint |
|
| 3. |
Can't be calculated |
|
| 4. |
Applied on a smaller area than building footprint |
10 points
Question 6
For a point 6 ft below the soil surface, what is the stress in psf, given that the soil density is 120 pcf
| 1. |
120 psf |
|
| 2. |
6 pcf |
|
| 3. |
620 pcf |
|
| 4. |
720 psf |
10 points
Question 7
The angle at which the soil tend to rest when left unsupported on the ground is called:
| 1. |
Angle of repose |
|
| 2. |
Angle of internal friction |
|
| 3. |
Both 1 and 2 |
|
| 4. |
None of the answers |
10 points
Question 8
In clay soil, the shear strength is a result of:
| 1. |
Cohesion coefficient |
|
| 2. |
Confinement of soil |
|
| 3. |
Both 1 and 2 |
|
| 4. |
Bearing capacity |
10 points
Question 9
In a given soil, cohesion coefficient C is 200 psf, the angle of internal friction is 30, and a compressive stress of 1000 psf is applied, shear strength will be
| 1. |
Unknown |
|
| 2. |
777 psf |
|
| 3. |
200 psf |
|
| 4. |
500 psf |
10 points
Question 10
Vane shear strength test is applied for:
| 1. |
A soft clay layer with 10 ft depth |
|
| 2. |
soft clay layers with no depth limitation |
|
| 3. |
gravel layers |
|
| 4. |
Any soil |
In: Civil Engineering