online advertising
Processing math: 100%

Monday, November 7, 2016

Conditional Probability

Problem:

Suppose a family has 2 children, one of which is a boy. What is the probability that both children are boys?

Solution:

The reaction is 12, but that is wrong.

Let the event A be the event that we have one boy, that event should be BB,BG,GB, this event has probability 34.

Let the event B be the event that we have two boy, that event should be BB, this event has probability 14.

By the definition of conditional probability, we have:

P(B|A)=P(AB)P(A)=P(B)P(A)=1434=13.

Wednesday, October 12, 2016

Rectangles with integer dimensions

Problem:

Find all rectangles with integer dimensions such that its perimeter is equals to its area.

Solution:

Let the length and width of the rectangle be x and y respectively. We have

2(x+y)=xy

Of course, subject to the constraints that x0, y0, x,yZ.

The key idea is to factorize this as follow:

xy2x2y+4=4
(x2)(y2)=4

Once we have that, we know there are only a handful of integer factorization of 4, and we can now check:

(x2)=1,(y2)=4 gives x=3, y=6
(x2)=2,(y2)=2 gives x=4, y=4

So there we go, there are only two rectangles that satisfy the requirements.

Sunday, June 26, 2016

Coursera Coursera Introduction to Physiology - Week 1 - Homeostasis and Endocrine System Exam

1. Even though no food had entered her stomach, the smell and sight of food caused Jane’s stomach to secrete more acid. This is an example of:

feed-forward control

antagonistic control

negative control

tonic control

2. Jerry is a normal 24 year old male with an intracellular fluid (ICF) volume of 24 L. What is the volume of his plasma?

3L

12 L

6 L

9 L

Remember ECF is 13 and ICF is 23, so ECF is half of ICF and is therefore 12. Plasma is 14 of ECF and is therefore 3 liters.

3. In a normal female, plasma levels of the hormone cortisol are highest in the early morning and half maximal at 4:00 in the afternoon. This is an example of:

circadian rhythm

tonic control

antagonistic control

autocrine control

4. Estrogen acts in the breast to increase the growth of the glands and the number of estrogen receptors in these cells. This is an example of:

antagonistic control

positive feedback

negative feedback

tonic control

5. Potassium ions in the _____ are in equilibrium with potassium ions in the _____.

IVF; ICF

ECF; ICF

IVF; ISF

ISF; ICF

The channel between the IVF and ISF is leaky.

6. A membrane that is permeable only to water separates two solutions of glucose dissolved in water. On one side (A) the glucose concentration is 0.1 g/ml. On the other side (B) the glucose is concentration is 0.6 g/ml. Initially the rate of water flow is:

zero (no flow in either direction)

more rapid from side B to side A

more rapid from side A to side B

the same in both directions

The concentration of water in action again.

7.  Larry drank 2 cups of hypotonic soup. How did the water in the soup distribute into the intracellular (ICF) and extracellular (ECF) compartments?

net water movement from ICF to ECF but less than that seen with isotonic fluid ingestion.

net water movement from ECF to ICF greater than that seen with isotonic fluid ingestion.

no change in water distribution between ICF and ECF.

water will distribute equally (1/2 and 1/2) between ICF and ECF.

Remember hypotonic soup means its solute is less concentrated than 300 mOsM. Therefore the concentration of water is higher than ICF, and therefore more water going into ICF.

8. The single most important factor that determines whether a given cell can be regulated by the steroid hormone aldosterone is the presence in this cell of:

specific aldosterone receptors

heat shock proteins

cAMP and ADP

active transporters for aldosterone

9. In obesity related Type II diabetes, levels of the peptide hormone, insulin, are either normal or elevated, yet target cells are less sensitive to the binding of insulin. This suggests that the target cells:

have excess intracellular glucose

are impermeable to insulin

have a defect in their receptor signaling pathway

cannot convert insulin to an active form

10. What is the maximum transport rate (Tm ) of the carrier depicted below?



8

10

20

4

11. When steroid hormones bind to their target cell receptors:

transcription of DNA is stimulated

membrane bound receptors are activated

ion channels open

the Na+/K+ ATPase becomes active

Coursera Introduction to Physiology - Week 1 - Endocrine Concepts

1. Cells may communicate with one another by_____

A. transfering signal molecules to adjacent cells through gap junctions.

B. local-acting chemicals, called paracrines and autocrines

C. long-distance means, which rely on combinations of electrical and chemical signals.

D. A, B, and C

2. Which of the following statements is TRUE?

A. Autocrine and paracrine control use chemicals (ligands) to regulate cell activity.

B. Paracrine control is when a cell regulates its neighbor (local).

C. Target cells have receptors that recognize and bind the specific chemical (paracrine, autocrine or hormone).

D. A, B and C

3. Peptide hormones regulate their target cells by:

A. binding to cell surface receptors which activate intracellular signaling pathways

B. binding to DNA to change gene (DNA) expression.

C. binding to ion channels

D. B and C

One way to remember this is that peptide hormone are not ions, and there are not membrane permeable, so they have to do that on the cell surface receptors.

4. Which of the following statements correctly describes the mechanisms used by the tyrosine derivative hormones, epinephrine and thyroid hormone, to trigger their target cell’s response?

A. Thyroid hormone (TH) binds intracellular receptors to increase gene expression.

B. Thyroid hormone (TH) binds cell surface receptors triggering a rapid change in metabolism

C. Thyroid hormone and epinephrine binds intracellular receptors to increase gene expression

D. Thyroid hormone and epinephrine bind cell surface receptors triggering a rapid change in metabolism

Thyroid hormone is an amino acid derivative and is plasma membrane permeable. I have to remember this.

5. When steroid hormones bind to their receptors:

A. a second messenger pathway is activated.

B. G protein second messengers are inhibited.

C. gene transcription is activated

D. protein kinases are activated

6. Joanne presents to her physician with elevated plasma cortisol levels. She is administered dexamethasone, a drug used to suppress the secretion of ACTH from the pituitary gland. Her plasma cortisol levels fall to normal 60 minutes after the dexamethasone treatment. Joanne's condition is which of the following?

A. Primary pathology because the adrenal hormone, cortisol, was suppressed by the dexamethasone.

B. Secondary pathology because suppression of the pituitary hormone, ACTH, corrected the secretion of cortisol from the adrenal gland.

C. Tertiary pathology because the pituitary hormone ACTH was low in this patient.

The problem is that Joanne should not have high level of ACTH. The adrenal gland is functioning normally, but the Anterior Pituitary is not.

7. Which of the following statements is TRUE for steroid hormones?

A. They enter target cells by active transport.

B. They require carrier proteins for delivery to target tissues.

C. They are stored in secretory vesicles.

D. A, B and C

Steroid hormones are not plasma soluble and therefore requires carrier protein

8. The single most important factor that determines whether a specific gene in a given cell can be regulated by growth hormone is the presence in this cell of:

A. heat shock proteins

B. specific growth hormone receptors.

C. active transporters for growth hormone.

D. G proteins.

Coursera Introduction to Physiology - Week 1 - Transporter, Channel and Homeostasis

1. Cells may communicate with one another by:

A. transferring signal molecules to adjacent cells through gap junctions.

B. local chemicals, called paracrines and autocrines

C. chemicals that act at a distance.

D. A, B, and C

2. How does drinking one liter of water affect the fluid compartments of the body?

A. There are no changes in either the ECF or ICF.

B. The ECF increases by one liter with no change in the ICF.

C. The ECF will increase by 500 ml and the ICF by 500 ml.

D. The ECF will increase by 333 ml and the ICF increases by 666 ml.

This is because the osmolarity of fluid has to stay constant.

3. Complete the following true statement. Negative feedback loops ______ the initiating stimulus and positive feedback loops _____ the initiating stimulus.

A. increase; increase

B. remove; increase

C. increase; remove

D. remove; remove

4. In the following situation, identify the components of the reflex loop.

You have finished the marathon in just under three hours. You are tired, sweating profusely, and start to drink Gatorade. After several minutes you are still tired but no longer sweating or thirsty.

A. Stimulus (sweating); response (drinking)

B. Stimulus (drinking); response (sweating)

C. Stimulus (running); response (drinking)

I was confused with this one - since drinking is an activity that we choose to do, not an automatic response. But after all, given the choices, only this one make sense anyway.

5. Which of the following exhibits a circadian rhythm that coincides with sleep-wake cycles?

A. Cortisol secretion by adrenal glands

B. Acid secretion by stomach

C. Growth hormone secretion by pituitary

D. A and C

6. When plasma water is lost but electrolytes are retained, then:

A. osmolarity of the ECF falls

B. osmosis moves water from the ICF to the ECF

C. both the ICF and the ECF become more dilute

D. there is an increase in the volume of the ICF

Remember plasma is ECF

7. Which of the following solutions has the lowest concentration of water?

Solution   mM glucose   mM NaCl   mM CaCl2

A.         20           40       50

B.         20           50       80

C.         20           50       60

A. Solution A. It is 250 mOsM

B. Solution B. It is 360 mOsM

C. Solution C. It is 300 mOsM

The higher the concentration of solute, the lower the concentration of water.

8. Which of the following solutions is isotonic to a cell that is 300 mOsM?

Solution   mM glucose   mM NaCl   mM CaCl2

A.         20           40       50

B.         20           50       80

C.         20           50       60

Solution ______ is isotonic to a cell with an ICF of 300mOsM.

A. Solution A

B. Solution B

C. Solution C

The tonicity is computed using the number of particles of non-penetrating solute divided by the volume. We have 1 particle for glucose, 2 particles for NaCl and 3 particles for CaCl2

Therefore the tonicity are:
A) 20 + 2 x 40 + 3 x 50 = 250 mOsM
B) 20 + 2 x 50 + 3 x 80 = 360 mOsM
C) 20 + 2 x 50 + 3 x 40 = 300 mOsM

9. A neuronal cell with an ICF of 300mOsM will swell in which of the following solutions?

Solution   mM glucose   mM NaCl   mM CaCl2

A.         20           40       50

B.         20           50       80

C         20           50       60

A. Solution A which is 250 mOsM

B. Solution B which is 360 mOsM

C. Solution C which is 300 mOsM

Remember lower osmolarity, the higher the concentration of water. And therefore water moves from Solution A into the neuron because of the concentration gradient of water.

10. How does the addition of 10mM urea affect solution A?

Solution   mM glucose   mM NaCl   mM CaCl2

A.         20           40       50

B.         20           50       80

C         20           50       60

A. Increase the osmolarity by 10 mOsM

B. Increase the tonicity by 10 mOsM.

C. Increase the osmolarity and tonicity by 10 mOsM.

Urea can penetrate plasma membrane and therefore not included in the tonicity calculation.

11. Channels and symporters are alike because they facilitate diffusion of effective solutes across membranes as well as:

A. exhibit solute specificity

B. use ATP

C. exhibit saturation and solute specificity

D. exhibit saturation, solute specificity and use ATP

12. Channels are gated by which of the following?

A. ligands

B. voltage

C. tension (mechanical)

D. A and B

E. A, B and C

Friday, June 24, 2016

Denesting radicals

Problem:


Solution:

This is not a particular hard question, but I learn an interesting trick from it called the denesting of radicals, so I wanted to write this to remember.

The interesting thing to tackle is the 526 and the 8215 thing. They seems complicated, we would like to get rid of the nesting, so how?

Consider the general form and take a square of it and see what they look like:

(ab)2=a+2ab+b

So if we wanted to make 526=ab, we need to find a+b=5 and ab=6, which is trivial in this case a=3, b=2. Obviously, we have to do big minus small to make sure it is positive.

Similarly, we have 8215=53, the rest follows, in a very pleasing way, so I will do it here.

x3+y=31x+3y=33x=333y
From the first equation, we can greatly simplify it as:

x(32)+y(53)=3(x+1)+5(y3)+3(52)3x2x+5y3y=3x+3+5y35+35323x2x+5y3y3x5y=335+35323x3x2x+5y5y3y=335+35322x3y=3322x+3y=323
So at this point we simply substitute

2(333y)+3y=323322323y+3y=32323y+3y=32332+23(23+3)y=32332+23(23+3)y=3+23y=1
x=333yx=33+3x=3

Does it looks very complicated, yes, it is intended to make it look like so :p

Sunday, May 1, 2016

Moon area problem

Problem:

Solution:

I am an engineer, therefore I am thinking about solving this using integration. But the area defined is hard to compute using integration because the curves defining it are not functions. (For example, at the far right end, the circle has both its upper point and lower point), so I figured something else.


 The yellow area is what we wanted, note that it is super easy to calculate the red area, as well as the sum of all colored areas, which leave us the question, how to we compute the green area? Because if we can compute the green area, the problem is pretty much solved.

The red area is simply the difference between a square of side 0.5 and a quarter circle with radius 0.5), so it is 0.52π0.5240.053650459

The sum of all colored area is simply the same shape with side doubled, so the area is four times the red area and it is approximately 0.053650459×40.214601837

Next we focus on the green area, zooming in, we see that is a sum of two areas, the dark green and the light green one, it is now obvious that the left one can be solved by integration, it is not so obvious that the right one can be computed relatively easily with the left hand side result as we shall see.



You probably see in the diagram that the x coordinate of the intersection point is approximately 0.29, why is that?

Let's solve this:

The equation of the big circle is x2+(y1)2=1x2+y22y=0.
The equation of the small circle is (x0.5)2+(y0.5)2=(0.5)2x2+y2xy+0.25=0

Subtracting these two equations give xy0.25=0y=x0.25.

Putting this back into the first equation gives x2+(x0.251)2=1, solving we get x=2x22.5x+0.5625=0 and therefore x=2.5±1.754, we take the smaller value 2.51.754 as this is the leftmost intersection point.

Next, we compute we find an explicit formula for the lower big circle. We already have the implicit form: x2+(y1)2=1, making y the subject gives y=1±1x2, as this is the lower half of the circle so we take the negative sign y=11x2

Now we do the integration, the form is simply asking for trigonometric subsitution, so we are doing it.

Let x=sinu, dx=cosudu

11x2dx
(11sin2u)cosudu
(1cos2u)cosudu
(1cosu)cosudu
(cosucos2u)du
(cosu1+cos2u2)du
sinu12(u+12sin2u)
sinu12(u+sinucosu)+C
x12(arcsinx+x1x2)+C

This formula gives us the dark green area (note that we can just set C=0 as the formula gives 0 when x=0)

If we substitute the number, the dark green area is approximately 0.004304482

If we observe carefully, the light green area is actually a similar figure. If we double the image so that the small circle has radius 1, the shape of the area is exactly the same, so we can use exactly the same formula there.

The base has length 2×(0.50.29) long in the doubled area, we plug in the formula, and then scale it back down (so that area is divided by 4), we get the value 0.002980577

Last but not least, given all the areas, we can now compute the moon area to be 0.14638126.

Using this simple C# Monte Carlos simulation program, I verified the answer above should be correct.

namespace Moon
{
    using System;

    class Program
    {
        static void Main(string[] args)
        {
            Random random = new Random(0);
            int numTrials = 10000000;
            int hitTrials = 0;
            for (int i = 0; i < numTrials; i++)
            {
                double x = random.NextDouble();
                double y = random.NextDouble();
                bool outsideQuarter = (x * x + y * y) > 1;
                bool insideCircle = (x - 0.5) * (x - 0.5) + (y - 0.5) * (y - 0.5) < 0.25;
                bool insideMoon = outsideQuarter && insideCircle;
                if (insideMoon)
                {
                    hitTrials++;
                }
            }
            Console.WriteLine((hitTrials + 0.0) / numTrials);
        }
    }
}

One last problem remain though, is there a simpler solution?