|
|
Binabik
Responsible
Legendary Hero
|
posted November 08, 2008 06:53 AM |
|
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 07:19 AM |
|
Edited by dimis at 07:29, 08 Nov 2008.
|
How to find roots of quadratic equations without a discriminant
This is of different flavor. It's not a problem, rather than a "trick" I used to love when I first learnt about complex numbers, and I still use it every time I have to solve a quadratic equation. The idea is to try to avoid the discriminant when solving a quadratic equation and thereby showing some class on factoring, which is tedious though since it is a mechanical trick (Actually it's the proof of the formula for real roots, but you are not restricted to reals now ...).
Well... even if you don't know anything about complex numbers, the process is still good enough to prove that there are no real solutions ...
Ok, once you are given
a*x^2 + b*x + c = 0,
divide by a and try to create a "square of the form (x + something)^2", i.e.:
x^2 + (b/a) * x + c/a = 0
x^2 + 2 * (b/(2a)) * x + c/a = 0
x^2 + 2 * (b/(2a)) * x + (b/(2a))^2 + c/a - (b/(2a))^2 = 0
(x+b/(2a))^2 + (c/a - (b/(2a))^2) = 0
And now there are two cases:
* either c/a - (b/(2a))^2 < 0, in which case you can apply the identity a^2 - b^2 = (a-b)(a+b),
or
* c/a - (b/(2a))^2 >= 0, and you can still apply the same identity, by introducing the imaginary "i"...
Examples:
e.g. 1
x^2 + 3*x + 1 = 0
x^2 + 2*(3/2)*x + 9/4 + 1 - 9/4 = 0
(x + 3/2)^2 - 5/4 = 0
(x + 3/2 - sqrt{5}/2) (x + 3/2 + sqrt{5}/2) = 0
so the roots are:
(-3+sqrt{5})/2 and (-3-sqrt{5})/2
e.g. 2
x^2 + 3*x + 5 = 0
x^2 + 2*(3/2)*x + 9/4 + 5 - 9/4 = 0
(x + 3/2)^2 + 11/4 = 0
(x + 3/2)^2 - (i * sqrt{11} / 2)^2 = 0
(x + 3/2 - i * sqrt{11} / 2) (x + 3/2 + i * sqrt{11} / 2) = 0
so the roots are:
(- 3 + i * sqrt{11}) / 2 and (- 3 - i * sqrt{11} ) / 2
e.g. 3
3*x^2 + 2*x + 1 = 0
Don't forget to turn to '1' the coefficient in front of x^2 ...
x^2 + (2/3) * x + 1/3 = 0
x^2 + 2* (2/6) * x + 1/3 = 0
x^2 + 2* (2/6) * x + (2/6)^2 + 1/3 - (2/6)^2 = 0
(x + 2/6)^2 + 2/9 = 0
and as above ...
(x + 2/6)^2 - (i * sqrt{2} / 3)^2 = 0
[I will also simplify 2/6 to 1/3 ...]
(x + 1/3 - i * sqrt{2} / 3) (x + 1/3 + i * sqrt{2} / 3) = 0
so the roots are:
-1/3 + i * sqrt{2} / 3
and
-1/3 - i * sqrt{2} / 3
____________
The empty set
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 07:25 AM |
|
|
There is an easy explanation why the first problem with the two coins had a solution 2/3.
There are 3 ways in which you get Heads. But only two of them will lead to another Heads, once you flip the coin.
Same here. There are 4 ways to get Tails initially. But only two of them will lead to heads when you flip the coin. So, 2/4 = 1/2.
____________
The empty set
|
|
TitaniumAlloy
Honorable
Legendary Hero
Professional
|
posted November 08, 2008 07:29 AM |
|
|
Is that Completing The Square?
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 07:30 AM |
|
|
yup
____________
The empty set
|
|
JollyJoker
Honorable
Undefeatable Hero
|
posted November 08, 2008 08:09 AM |
|
|
@ Ash & Gnoll_Mage
Sorry, dreamt badly about the thing, and as it is, I'm wrong and you are right. My mistake is actually that I reduced it to 21 cases instead of the actual 36 that are there (it's basically the same thing as rolling one dice times or 2 dice one time which is the same thing, in probabilities).
So in this case the result ain't the 221/336 (or 663/1008) I came up with, but it's indeed the 95/144 (1-49/144) (or 665/1008) you came up with.
Again, sorry.
Looks like the other problems of mine are too complicated for the class.
Now, for this one:
Quote: Ok theres 5 coins in a bag, 1 = t/t 2=h/h and the remaining 2 = h/t
You pull a coin and look and see a T
If you want, tell me the probability of the other side being a heads..
2/3. Since you see a T, you've pulled 1 out of 3 possible coins, 2 of are H on the backside.
@ Vlaad
The rules are pretty clear here: you get offered ONE new skill each level up; you start with two Basic skills and one ability, and starting with Avenger and Luck/Logistics are giving you the best chances to acquire War Machines. Your last chance will come, when you have 5 expert skills with 3 abilities each, which will be when you get to level 29, and since you will be offered two basic skills then, you'll have at most 29 offerings.
If you WANT WM your best chances to do it are, to pick out the highest probs, Logistics, Enlightenment and Defense, as soon as possible (levels 2, 3, 4 would be best, and then leave the last slot until you get it offered or must take it. If you do that, ptobabilities for levels 2, 3, 4 and 5 are:
73/75, 58/60, 48/50 and 38/40. 38/40 is then the factor you multiply another 25 times with. In the end, the probability to actually get basic WM if you want it, is very high: 1-19^26/20^26*73/75*29/30*24/25
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 08:13 AM |
|
Edited by dimis at 08:21, 08 Nov 2008.
|
Quote: 2/3. Since you see a T, you've pulled 1 out of 3 possible coins, 2 of are H on the backside.
Sorry JJ, but there are 4 ways to get T initially in these 3 coins that have at least one T. And half of them lead to H.
Perhaps another way of seeing it is by baptizing one of the T's in the coin with the two T's as U, and then ask the same question where you want initially the face of the coin to be either T or U...
____________
The empty set
|
|
Binabik
Responsible
Legendary Hero
|
posted November 08, 2008 08:19 AM |
|
Edited by Binabik at 08:25, 08 Nov 2008.
|
Quote: there are 4 ways to get T initially
That's irrelevant. Once you see a T, you know it's one of 3 coins. The coin with both sides T can be view from either side and it doesn't matter which one it is. If it was a 3 sided die with 3 Ts, instead of a coin, your answer would be correct.
edit: Actually Dimis, what you are saying is very similar to mixing up combination and permutation(sp?). With the coin with 2 Ts, you are counting it twice. But in this problem you don't want to differentiate between the two sides.
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted November 08, 2008 08:21 AM |
|
|
Quote: @ Vlaad
The rules are pretty clear here: you get offered ONE new skill each level up; you start with two Basic skills and one ability, and starting with Avenger and Luck/Logistics are giving you the best chances to acquire War Machines. Your last chance will come, when you have 5 expert skills with 3 abilities each, which will be when you get to level 29, and since you will be offered two basic skills then, you'll have at most 29 offerings.
If you WANT WM your best chances to do it are, to pick out the highest probs, Logistics, Enlightenment and Defense, as soon as possible (levels 2, 3, 4 would be best, and then leave the last slot until you get it offered or must take it. If you do that, ptobabilities for levels 2, 3, 4 and 5 are:
73/75, 58/60, 48/50 and 38/40. 38/40 is then the factor you multiply another 25 times with. In the end, the probability to actually get basic WM if you want it, is very high: 1-19^26/20^26*73/75*29/30*24/25
Thanks! (I felt ignored there, just like in my Maths class. LOL)
____________
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 08:22 AM |
|
Edited by dimis at 09:16, 08 Nov 2008.
|
@Binabik: You posted when I edited my post above to give an easier explanation why it can't be 2/3.
edit: If you don't want to differentiate, then you have to use the appropriate weights. So, in one of the coins T comes with weight 2 (since it appears in both sides) and then on the other one it comes with 1. Hence, Prob = (1 + 1) / (2 + 1 + 1) (where the numerator sums up the weights of heads, and the denominator sums up all the weights for tails).
May be an even easier way of thinking it is the actual formula :
Pr [A | B ] = Prob. of A given B = Pr [A intersection B] / Pr [B] = (# of elements in A intersection B) / (# of elements in B) = N[A intersection B] / N [B].
where
A is the event that Heads comes up.
B is the event that Tails comes up.
So, yes, essentially N[A], and N[B] are on permutations.
N[A intersection B] = 2
N[B] = 4
-----
If you want to be further convinced about the weights look at a different example.
You have 3 coins. One of them is T/T, and the other two "normal" H/T.
If you pick a coin at random, what is the probability that you see tails? I guess it's more than intuitive that it is more than 1/2. As an extreme example of this one, assume that all 3 coins are of the form T/T. What is the probability now that you see tails when you pick one of them at random? It is 1; not 1/2. The weights come into play.
@Vlaad: Sorry about that, but as I said earlier, I couldn't participate in the question.
____________
The empty set
|
|
Binabik
Responsible
Legendary Hero
|
posted November 08, 2008 09:44 AM |
|
|
We are both talking about the same one, right? This one?
Quote: Ok theres 5 coins in a bag, 1 = t/t 2=h/h and the remaining 2 = h/t
You pull a coin and look and see a T
If you want, tell me the probability of the other side being a heads..
You keep talking as if we are drawing coins at random, but we aren't. The coin has already been selected and we are holding it in our hand. We will turn it over to look at the "OTHER" side.
The coin we are holding is either:
coin A t/t
coin B h/t
or
coin c h/t
IF it is coin A then the other side is a t
IF it is coin B then the other side is a h
IF it is coin C then the other side is a h
Those are the only three possibilities, and 2 out of 3 give us an h.
____________
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 09:54 AM |
|
Edited by dimis at 10:11, 08 Nov 2008.
|
Quote: IF it is coin A then the other side is a t
IF it is coin B then the other side is a h
IF it is coin C then the other side is a h
Those are the only three possibilities, and 2 out of 3 give us an h.
Yes, Binabik. These are correct. However, you don't mention how frequently these events happen. Because your situation A will occur as frequently as B and C combined. Is it still vague?
Further attempt 1: if it is the case that you pick coin A, then you 'll see tails no matter what. However, if you pick B, or C, you are only interested in the coin if you are actually looking at tails and not heads.
Further attempt 2:
Reformulate the problem as follows: "I will pick a coin and write down both of its sides."
Reminder: We have 1 T/T, 2 H/H, and 2 H/T. Let's give all of them a different name; we have:
T1/T2, H1/H2, H3/H4, H5/T3, H6/T4
What are the possible outcomes?
T1/T2
T2/T1
H1/H2
H2/H1
H3/H4
H4/H3
H5/T3
T3/H5
H6/T4
T4/H6
How many of them have tails facing up (i.e. some Ti)? The blue ones, so 4.
How many of them have heads facing up if we flip them? The last two only.
All the above events are equally likely.
So the probability is merely 2/4 = 1/2.
____________
The empty set
|
|
Binabik
Responsible
Legendary Hero
|
posted November 08, 2008 10:06 AM |
|
|
OK, one last time before I go to bed.
"coin" A has 1000 sides, all of which are t
coin B is h/t
coin C is h/t
If you are ALREADY holding a coin in your hand and it is a t, the odds of turning it and seeing an h are still 2/3.
That's because the number of Ts on coin A are irrelevant as long as they are all Ts. No matter which T you have, when you turn it you will have a T 100% of the time.
with coin B or C you will get an h, with coin A you will get a T. There are no other possiblities.
ok, good night
|
|
JollyJoker
Honorable
Undefeatable Hero
|
posted November 08, 2008 10:26 AM |
|
|
Yup. I agree with Binabik.
FOR THE QUESTION ASKED AND THE PROBLEM AT HAND, it's not relevant how many coins are in the box, since you start with the fact that you look at a T, the fact that you might have looked at a H as well, doesn't matter at this point. You look at a T. There were only 3 coins in the sack that gave you the T. Thes rest is irrelevant.
|
|
dimis
Responsible
Supreme Hero
Digitally signed by FoG
|
posted November 08, 2008 10:28 AM |
|
|
Careful now... Coz this time you changed the rules.
What events are equiprobable now? Do you pick each coin with prob. 1/3? Or is it the case that each possible face of the coins is equally likely to come up? It's a different problem now...
____________
The empty set
|
|
TitaniumAlloy
Honorable
Legendary Hero
Professional
|
posted November 08, 2008 11:02 AM |
|
|
I agree with dimis, I think.
If you call drawing the first tails T, and flipping it over to be heads h, then it becomes:
Pr(h|T) (probability the other side is heads given the drawn side is tails)
= Pr(h intercept T) / Pr(T) (the other side is heads given the drawn side is tails AND drawn side is tails divided by probability that the drawn side is tails
edit:
added up the maths wrong my b
for some reason got 3 instead of 4 for the number of tails
yeah dimis is right at 1/2
|
|
JollyJoker
Honorable
Undefeatable Hero
|
posted November 08, 2008 11:58 AM |
|
|
I agree now with dimis as well. Made my shoppings and went through the problem again.
What you do is effectively drawing a SIDE, not a coin, because you LOOK AT a side, not at the coin, with sides being paired. So, incredibly enough, when you draw H this can be one of 4 possible Hs. Only 2 of those possible Hs are paired with Ts. The other 2 are paired with a H, making probability only 1/2 to turn up heads.
It clicked actually, when I thought about restricted choice (something that you will have heard when you play Bridge). As strange as it sound, but you may imagine it that way, that the fact that you look onto a Head makes it more likely you look onto it because the coin has no choice but to let you look onto it (Heads on the backside as well)
Another way to see it is this: if you'd draw 6 times out of those 3 coins, you'd expect to end up with 4 times looking onto Heads and twice onto Tails. Moreover you'd expect to draw each coin twice. However, two of this drawings would end up with TAILS showing, one each for both of the mixed coins. So when you draw and see HEADS, there are both draws for the Head coin "left", but just one for the mixed coins each.
Nice problem.
|
|
keldorn
Promising
Known Hero
that casts green flames
|
posted November 08, 2008 01:32 PM |
|
|
Hi guys.
When I noticed this thread I knew it's my world. I have a problem for you, also with coins.
3 men are booking a room in a hotel. One night is 10 coins/person so it's altogether 30. The guys pay and go to their rooms. Later the owner decides to give 5 coins discount for them. He gives the 5 coins to a serveceman and sends him to give it to the guests. He begins to wonder: How to divide 5 coins among 3 men?
Finally he decides to give 1-1-1 for everyone, and keep 2 for himself. So he does. Thus, the situation is the following: The guests have payed 9-9-9 coins (27 altogether) and the serviceman has 2 (totally 29). Where's the 30th coin?
Good luck
____________
|
|
JollyJoker
Honorable
Undefeatable Hero
|
posted November 08, 2008 01:56 PM |
|
|
Quote: Hi guys.
When I noticed this thread I knew it's my world. I have a problem for you, also with coins.
3 men are booking a room in a hotel. One night is 10 coins/person so it's altogether 30. The guys pay and go to their rooms. Later the owner decides to give 5 coins discount for them. He gives the 5 coins to a serveceman and sends him to give it to the guests. He begins to wonder: How to divide 5 coins among 3 men?
Finally he decides to give 1-1-1 for everyone, and keep 2 for himself. So he does. Thus, the situation is the following: The guests have payed 9-9-9 coins (27 altogether) and the serviceman has 2 (totally 29). Where's the 30th coin?
The situation is, that after payment the owner has +30 while the guests have -10 each. After the owner gives a discount of 5, the owner has 25 left, the clerl has 5, while the guests are still at -10 each or -30. After the serviceman gives everone a coin back the situation is
owner: 25
clerk: 2
guests: -9 each.
So you have to subtract the 2 from the 27, or add them to the 25, because since everyone got a coin back we are at 27 minus, not 30 anymore.
|
|
alcibiades
Honorable
Undefeatable Hero
of Gold Dragons
|
posted November 08, 2008 02:02 PM |
|
|
Quote:
Quote: @ Vlaad
The rules are pretty clear here: you get offered ONE new skill each level up; you start with two Basic skills and one ability, and starting with Avenger and Luck/Logistics are giving you the best chances to acquire War Machines. Your last chance will come, when you have 5 expert skills with 3 abilities each, which will be when you get to level 29, and since you will be offered two basic skills then, you'll have at most 29 offerings.
If you WANT WM your best chances to do it are, to pick out the highest probs, Logistics, Enlightenment and Defense, as soon as possible (levels 2, 3, 4 would be best, and then leave the last slot until you get it offered or must take it. If you do that, ptobabilities for levels 2, 3, 4 and 5 are:
73/75, 58/60, 48/50 and 38/40. 38/40 is then the factor you multiply another 25 times with. In the end, the probability to actually get basic WM if you want it, is very high: 1-19^26/20^26*73/75*29/30*24/25
Thanks! (I felt ignored there, just like in my Maths class. LOL)
@ Vlaad
One more thing on this topic: If you want to maximize your chances for a rare skill to come up, you need to do two things:
1) You need to pick the most common skills as your first priorities. As JJ says, for Ranger, pick Luck and Logistics as your first choices, then Defence and/or Enlightenment [I assume you will want Destructive Magic if you go War Machines].
2) You need to maximize all skills before selecting any perks. This part is quite important, because when you have all your skills on Expert level, you will be offered two new skills on basic level.
Assuming you pick a Hero that stats with either Luck, Logistics, Defence or Enlightenment, that means that at level 14, you'll strive to have the skills Expert Avenger (10 %), Expert Luck (15 %), Expert Logistics (15 %), Expert [Defence/Enlightenment] (10 %), Expert Destructive Magic (8%). You will have two perks from your initial skills, and you will now have 14 levels where you'll be offered 2 basic skills.
The skills you have pick add up to a total of 58 %, so the remaining skills add up to only 42 %. Your chance for War Machines to pop up in the first slot at each level up will be: 2/42 = 4.76 %. However, as we have maxed out all skills, we have two slots to account for. To make the model simple, let's assume that if War Machines doesn't show up in the first slow (95.22 % chance), one of the 8 % skills shows up [it might be the last 10 % skill that came up, but it might also be one of the other 2 % skills, so that more or less evens out]. This means that in the second slot, there is a 2/34 = 5.88 % chance for War Machines to show up, giving us a total chance for War Machines to show up on each level which is 4.76 % + 0.9522*5.88 % = 10.36 %!
As you have 14 level ups to go for it (5*3 - 2 = 13 perks for free, 14th level up you have to pick a basic skill), chance for you not to be offered War Machines is (1 - 0.1036)^14 = 21.6 % - or, your chance to get offered War Machines is slightly over 80 %. That's the good news.
The bad new with this model is that learning 5 skills to expert level requires 5*3 - 2 = 13 levels, and learning those 13 perks takes another 13 levels, putting you at level 27! At this point, you need to learn Advanced War Machines (2 levels) and then learn Tripple Ballista and Imbue Ballista (2 levels), all together putting you at level 31!
A more realistic model would therefore be to go for only 4 skills: Avenger (10 %), Luck (15 %), Logistics (15 %) and Destructive Magic (8 %). This will require 4*3 - 2 = 10 levels bringing you to level 11, and still eats up a decent 48 % of the skill mass. You then have another 11 level ups to go for War Machines, which has a 2/52 = 3.85 % chance of showing up in the first slot. Again assuming a bit conservatively that an 8 % skills shows up in first slot if War Machines doesn't (in this case we actually have 2 outs for a 10 % skill, so chances here are probably more like ~ 9 %), the total probability for War Machines to show up is 8.22 %.
Your chance to not get offered War Machines between level 11 and 22 is therefore: (1 - 0.0822)^11 = 39 % - or with other words, you have a good 60 % chance to get offered War Machines between level 11 and 22. Remember that your actual chances are (a bit) higher, because you might get offered War Machines between level 1 and 11, although chances are slim, so all in all it's probably about a 2/3 chance to get War Machines!
The bad thing here is that if you get War Machines only at level 22, it might be too late, but on the positive side, the skill combination Avenger + Luck + Logistics + Destructive Magic is a pretty safe pick when playing Ranger (remember to purchase High Druids!), so it's not like you're playing an all-out gamble for War Machines. You could say that War Machines, should it show up, will just be the icing on the cake. On the other hand, you might want to Aim for Luck + Logistics + Light instead, which will open up for Nature's Luck which, when things are taken into acount, is superior even to Imbued War Machines.
____________
What will happen now?
|
|
|
|