Let first toss be A, second B.
p(Ah) = p(At) = p(Bh) = p(Bt) = 1/2
p(Ah and Bh) = p(Ah) * p(Bh) = 1/4
p(At and Bt) = p(At) * p(Bt) = 1/4
p((Ah and Bh) or (At and Bt)) = p(Ah and Bh) + p(At and Bt) = 1/4 + 1/4 = 1/2
Note that AND rule works because A and B are independent, and OR rule works because (Ah and Bh) and (At and Bt) are incompatible.
Alternatively, you may use F/T rule to solve this. Enumerate outcomes as (HH, HT, TH, TT). Favorable are HH and TT. So, p = 2/4 = 1/2. Although in this case F/T rule works more gracefully, the AND/OR approach is still helpful - you can learn it on such easy examples as this to prepare for the more difficult ones.
Let A stand for a card being an ace, and S for it being a spade. We have to find p(A or S). Are A and S mutually exclusive? No. Are they independent? Why, yes, because spades have as many aces as any other suit. Then,
p(A or S) = p(A) + p(S) - p(A) * p(S)
With simple F/T we get:
p(A) = 4/52 = 1/13
p(B) = 13/52 = 1/4
So,
p(A or S) = 1/13 + 1/4 - 1/52 = 16/52 = 4/13
Sets analogy can help you visualize the formula. Draw two intersecting circles—one for aces, the other for spades. To get the area (probability) of the figure formed by these two circles together (all chances that are either aces or spades), you add the areas of aces and spades and subtract the intersecting area, in order not to count it twice. What we subtract is the ace of spades that was counted twice.
Another way to think about the question is to just count aces and spades; that is, use the F/T rule. There are 13 spades in a deck and 3 aces other than the ace of spades already included in the 13 spades. Therefore, there are 16 desired outcomes out of a total of 52 possible outcomes, or 16/52 = 4/13.
Between 0 and one million we can have either 1 digit numbers, 2 digit numbers, 3 digit numbers, 4 digit numbers or 5 digit numbers (0 and one million excluded) total numbers that can be formed
3 × 3 × 3 × 3 × 3 × 3 – 1 (0 excluded).
⇒ 36 – 1 = 729 – 1 = 728.
We can have multiple of 125 when last three digits are one of the 125, 250, 375, 500, 625, 750, 875. We can only have 375 and 875 as our last three digit because we do not have 1, 0 and 6. So number of ways we can have 375 at last three places and 8 and 7 on two remaining places = 2
and 875 at last three places and 3 and 2 on two places = 2
total number of ways = 4.
We can not have 1 at the unit’s place since it is the smallest number.
Number of ways ‘2’ at unit’s place..... hundred’s place can be filled in one way and remaining three places
in 1 × 2 × 3 = 6 ways.
Total number of ways in which 2 is at unit’s place is 6 × 1 = 6 ways.
Number of ways ‘3’ at unit’s place..... hundred’s place can be filled in two ways and remaining three places
in 1 × 2 × 3 = 6 ways.
Total number of ways in which 3 is at unit’s place is 6 × 2 = 12 ways.
Number of ways ‘4’ at unit’s place..... hundred’s place can be filled in three ways and remaining three
places in 1 × 2 × 3 = 6 ways.
Total number of ways in which 4 is at unit’s place is 6 × 3 = 18 ways.
Number of ways ‘5’ at unit’s place..... hundred’s place can be filled in four ways and remaining three places
in 1 × 2 × 3 = 6 ways.
Total number of ways in which 5 is at unit’s place is 6 × 4 = 24 ways.
So the total number of ways = 6 + 12 + 18 + 24 = 60.