Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Tavern of the Rising Sun > Thread: Let's talk about Maths!!!
Thread: Let's talk about Maths!!! This thread is 55 pages long: 1 10 ... 16 17 18 19 20 ... 30 40 50 55 · «PREV / NEXT»
rubycus
rubycus


Known Hero
-student of the mind-
posted April 21, 2009 01:37 AM

Correct. or:

a^0 = a^(n-n) = (a^n)/(a^n) = 1
____________
A prudent question is one-half of wisdom.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted April 21, 2009 09:41 AM

I would say that a^0 = 1 (for nonzero a) is a definition.

Formally, one defines a^n for positive integers n recursively. Then one defines a^0 = 1 and a^n for negative integers n as a^n = 1/(a^-n). This definition can then be extended to the rationals and then continuously to the reals.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Corribus
Corribus

Hero of Order
The Abyss Staring Back at You
posted April 21, 2009 11:53 PM

Here's another one.  Enjoy:

John takes a wooden cube of a certain size and paints it blue.  Then, using a saw, he cuts the cube into an exact number of smaller cubes all measuring exactly 1 cm in dimension.  He then sorts the small cubes by the number of faces that are painted blue.  He finds that there are precisely twice the number of cubes with no blue faces as there are cubes with 1 blue face.  What was the size of the original cube?  

What would have been the minimum size of the cube if the total number of unpainted cubes exceeded the number of painted cubes (any number of sides)?  
____________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later. -Mitch Hedberg

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 23, 2009 08:46 PM

I 'll try the second part of the problem which is easier, and this might give some hint for the first part. Well, the cubes that are unpainted, all belong to a cube which is wrapped around by another layer of small cubes (small cubes: 1cm dimension each). The idea is that the bigger cube has dimensions increased by 2 in order to wrap around the smaller one.
Some examples: in a 3x3x3 cube we have a 1x1x1 cube in the interior which contains unpainted small cubes. In other words, in a 3x3x3 painted cube (composed by 27 small cubes), we only have 1x1x1 = 1 small cube which is unpainted. Similarly, in a 4x4x4 cube we have a 2x2x2 cube in the center which is all unpainted. And so on ..

With this observation, the number of painted small cubes in an NxNxN cube is
N^3 - (N-2)^3,
since (N-2)x(N-2)x(N-2) is the cube which contains all the unpainted small cubes.
So, all we really want is to solve
(N-2)^3  >=  N^3 - (N-2)^3

Bringing everything in front, and expanding we get:
N^3 - 12N^2 + 24N - 16  >=  0
Now we want the smallest positive integer (>=3) for which the inequality above holds.
The polynomial f(x) = x^3 - 12x^2 + 24x - 16 has only one real root for x = 9.69 (about).
So, the solution to the second problem is 10; i.e. a 10x10x10 cube is the smallest one which, when painted and disassembled contains more unpainted small cubes than those that are painted.

nice one!
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Corribus
Corribus

Hero of Order
The Abyss Staring Back at You
posted April 23, 2009 11:28 PM

@Dimis

Your answer the second part is correct.  10 would be the smallest possible starting cube.

Since you've also approached the problem correctly, you're already halfway to answering the first part.  The key is to find a general formula to give the number of each type of cube (3 painted faces, 2 painted faces, 1 painted face, and no painted faces).  You've already found the formula for no painted faces (X-2)^2.  You have to find a general formula for cubes with 1 painted face.  If you're having trouble, do the actual calculation for the first couple sized cubes - you should start to see a pattern.

Actually, you can become quite devious with this sort of problem.

For instance, I made up the following variant.

Suppose you take a cube with dimension exactly n cm along the side and paint 2 sides red and 4 sides blue.  You then saw it up as described in the above problem into 1 cm cubes.  How many of the resulting smaller cubes will have at least one red face but no blue faces, in terms of n?  (hint: there are actually two possible answers).



____________
I'm sick of following my dreams. I'm just going to ask them where they're goin', and hook up with them later. -Mitch Hedberg

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 24, 2009 03:08 AM
Edited by dimis at 05:12, 24 Apr 2009.

Well, I am giving some hint to others.
As of the variant, the difficult solution is
2N^2 - 7N + 6
for N >= 3.
But I am not going to explain which situation is tricky.


edit: Zamfir has given a second problem in page 16. I am just placing a reminder here. By weekend, if no-one solves it, I'll give a hint.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 08:29 AM
Edited by dimis at 08:34, 27 Apr 2009.

A small recap

Ok, first the hint I promised for Zamfir's problem. I quickly remind you the problem:
Quote:
Solve the equation:  2^(x^2+x) + log2 (x)=2^(x+1)  (log2 = base 2 logarithm).
The main idea is that in "scary" situations like this one, we guess one solution and then try to prove that it is unique.


Of course we still have two problems by Corribus which are still unsolved.


Com'on guys! Speak up!



@Death:
I didn't notice that you were talking about the "if ... then ..." connective earlier when you wrote:
Summary:

True, False --> False
True, True  --> True
False, True --> Unknown
False, False--> Unknown
_____________________________

With the first two cases I don't have anything to say. It is obvious that we agree.
Now let's switch the attention to the last case where we have
False, False--> Unknown


I claim that Unknown is not ok. Here is why:
1) Do you agree that
A <==> B (A is equivalent to B)
has the truth table:
True, True --> True
True, False --> False
False, True --> False
False, False --> True
?


2) If you answered Yes, do you agree that when we write
A <==> B (A is equivalent to B)
is the same thing as
B <==> A (B is equivalent to A)
?
(i.e. I can read the "A <==> B" starting from either endpoint)


3) If you answered Yes again, then, do you agree that when we write
A <==> B (A is equivalent to B)
it is the same as if we write
(A ==> B) and (B ==> A)
(i.e. A implies B and B implies A)
?


4) If you answered Yes above, now the trick comes.
By the truth table in question number 1, when A and B are both False, the result is True.
So, by question 3 above, when A and B are both False, the statements
(A ==> B)
(B ==> A)
should evaluate to True, since they are connected in between with an
"and"
and the only way an "and" can produce a True (which is what we need) is if both parts of the "and" are True.
In other words we are forced to accept that
False ==> False
evaluates to True.
Do you agree so far?
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 08:52 AM

You software types sure have some strange ideas about gates.

For example the following. There is no such thing as this truth table in the world of hardware.

True, False --> False
True, True  --> True
False, True --> Unknown
False, False--> Unknown

With the first two entries it appears that this is either an AND gate, or an exclusive NOR gate. In either case the last two entries would be known. Also true,false is the same as false,true. The gate doesn't know the difference.

If you want to evaluate gate logic, one easy way to start is to use nothing but nand gates. (or use nothing but nor gates) ALL logic and mathematics can be done using only nand gates. When done this way things become more clear.

In hardware there are actually output 4 states:

True
False
Unknown
Illegal state (or invalid state)


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 09:10 AM
Edited by dimis at 09:29, 27 Apr 2009.

Binabik, I am not claiming this is a truth table. I am trying to show that it is not.

But once again, look at what is going on. I am addressing arguments, and pose questions. And the whole conversation is as if I am talking about God, because you don't answer the questions I pose on your turn. Instead you pose more. At some point you have to make a concession.

As of:
Quote:
In hardware there are actually output 4 states:
True
False
Unknown
Illegal state (or invalid state)
You certainly don't mean it right?
Say you go to a manufacturer and buy a gate. What is a gate composed of? Two wires for input; each one can be in state 0 or in state 1, and an output wire which is again a 0 or 1.
Now, for that particular gate that you are about to buy from the guy who sells it, do you find it reasonable for that guy to come over and tell you:
"I don't know how the sh!t works on all (4 ) possible inputs!"
?
And moreover, THERE IS NO MAGIC. If that "thing" that you buy from the manufacturer outputs "1" when the input is 0 on your left and 1 on your right, it should ALWAYS be 1. Do you agree or not? That's the whole idea. The only thing that I would accept for a "no" is if the gate had to toss some sort of coin and give the outcome. But then, it is again NOT Unknown. Because that coin comes with a probability. So you know what to expect; e.g. in 30% of the cases you get a 0 and in 70% of the cases you get a 1; i.e. p = 0.7. Now, I allow you to think like that because it doesn't matter. If one goes back and answer the 4 simple questions I wrote, you see that in the end this biased coin has value p=100% for one of the sides
As of "Illegal State", I will not characterize it. I will only say this: The output is there whether it was produced in a legal way or not. Yes or no?

Moreover
Quote:
Also true,false is the same as false,true. The gate doesn't know the difference.
What is this??? What do you mean?
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 09:32 AM
Edited by Binabik at 09:36, 27 Apr 2009.

I'm not sure if this is the direction you wanted to take this.

First, I wasn't commenting on whatever it is you and thedeath are talking about. I don't even remember the original discussion. I was just making general comments about gates. After your first post about it, I wanted to write something more detailed, but it would have been a very long post and be very time consumming.

As for the 4 states, or conditions, yes there ARE 4 and the manufacturer will tell you that. It's up to the engineer to make sure illegal states don't happen. Illegal = not 0 and not 1. For example 0.35, -1 or an oscillating condition. And unknown outputs usually will mean an unknown input which could be cause in any number of different ways.

But this is all just a side bar.

For the subject of math, we deal with the theoretical binary with only 1s and 0s.

Oh yea, there is also a "don't care" "state".

Quote:
What is this??? What do you mean?


It means the gate doesn't know the difference between the two inputs.

The followng table shows "True, False --> False"

True, False --> False
True, True  --> True
False, True --> Unknown
False, False--> Unknown

Therefore "False, True --> Unknown" must also evaluate to False.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 09:39 AM
Edited by dimis at 09:46, 27 Apr 2009.

No Binabik. And the reason is that all those gates that you describe are NOT binary.

Two switches A and B on one side (On / Off) and a lamp on the other end.
There are 4 ways that you can place On/Off on those 4 switches. It is more than irrational to keep on claiming that you don't know what will happen with the lamp on the 4 possible configurations.

And you might get confused because I indeed used "wires" above, and you may allow more than appropriate current to go through, or less than enough for the gate to operate, or whatever..

It's a very simple setup:
A
\
 Gate ---> Lamp
/
B

Do you still claim that you can find a manufacturer of such a thing to tell you that it is unknown if Lamp is On or Off when A=Off, and B=Off ?

Quote:
The followng table shows "True, False --> False"

True, False --> False
True, True  --> True
False, True --> Unknown
False, False--> Unknown

Therefore "False, True --> Unknown" must also evaluate to False.
No. The order matters. Simple example to make it intuitive: f(x,y) = 2x + y.  f(0,1) = 1 but f(1, 0) = 2 =/= 1.

And still, you haven't gone through the 4 simple questions I have.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 09:49 AM

OK, what seems to be missing here is that if the input is not known (and many reasons that could happen) then the output will also be unknown, UNLESS the unknown input is a "don't care".

For example a simple Or gate.

If A is 1, then output is 1
Input B is a "don't care" in this case.
It "probably" can even be an illegal state.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 09:55 AM

Quote:
No Binabik. And the reason is that all those gates that you describe are NOT binary.


In a way this is correct. It's all analog. To my knowledge binary doesn't exist in nature, and electricity is nature. It only becomes binary when us humans arbitrarily "assign" a logic 1 or logic 0 to certain analog values (above/below a threashold). This is the reason an illegal state can exist.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 10:08 AM
Edited by dimis at 21:19, 27 Apr 2009.

Yes Binabik, but there is no "I don't care" on my questions. I specifically say A=Off (0, False) and B=Off (0, False). And then I ask for the lamp which should be either On or Off (no blinking allowed, ok?) Just two states.

As of the analog case, think about a threshold; I don't mind. Either the output will surpass the threshold or not. And besides, my statement was correct for another fundamental reason. You can not encode without ambiguity 4 possible outputs with only 1 output digit which is either 0 or 1. It is clear that we are not talking about the same thing in the first place, just by that.

Finally, so far I am talking about gates because I want to "go with the flow". I didn't propose gates (first) if you go back. My point of view for all these connectives is boolean functions; i.e.
f(x,y) = something that involves x and y (mod 2).
And that's it.


Don't try to be soft, because this will only leave ambiguities in the air. Take me all the way down. I believe I can convince you (not particularly you, anyone) <-- In a sense I tried to do that to myself on that big post about gates. But I was only trying to be nice, because others might think I am attacking them, while in fact, that's not the reason.

edit: I deleted some words, because you might get wrong impression.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 10:18 AM
Edited by Binabik at 10:19, 27 Apr 2009.

I should never have brought it up. Don't take it so seriously. I simply made a comment that you guys seem to talk about gates in a differnt way than I do. I was not in any way referring to the discussion you've been having. The only thing about the discussion is that I have a very difficult time understanding what you guys are talking about because the language is so completely different. Yes, obviously we are NOT talking about the same thing when it comes to gates.

I've been dealing with gates for 30 years, so it's kinda hard for me to suddenly change directions.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 10:31 AM
Edited by dimis at 11:04, 27 Apr 2009.

I still think you did the right thing and brought it up.
Just pinpoint the phrase where you think there is an ambiguity in my sayings. Really, there is no other way of figuring out.

The simplest way of visualizing a "gate" in our discussion is:
A box with two switches A and B on one side which can be either On or Off and a led on the other side of the box. Then the truth table for the "gate" (whatever that box is) just describes when the led is On or Off given the configurations of the switches A and B.
In other words, it's the manual for the box you are buying.

Post about gates.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted April 27, 2009 11:06 AM

Yea, I understand the difference between the theoretical models and "real" gates. And most of the time they are the same, but not always.

Mostly it's been the language and some of the logic itself that didn't make sense from the hardware view of things. For example the idea that input A inplies input B.  In hardware, A and B are entirely independant of each other. The combination of A and B dictate the output C, but A and B can never affect each other.

And to repeat myself


from your truth table
Quote:

|   |   |         |
| A | B | A ==> B |
|___|___|_________|
| F | F |    T    |
|---|---|---------|
| F | T |    T    |
|---|---|---------|
| T | F |    F    |
|---|---|---------|
| T | T |    T    |
|---|---|---------|


Line 2 and line 3 can't coexist. Line 1 and line 4 can coexist with each other, but they can't coexist with line 3.

Anyway it's late. So enough for the night

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted April 27, 2009 11:42 AM
Edited by dimis at 12:08, 27 Apr 2009.

Quote:
Yea, I understand the difference between the theoretical models and "real" gates. And most of the time they are the same, but not always.
We already agreed on that one. You were not talking about binary output.

Quote:
Mostly it's been the language and some of the logic itself that didn't make sense from the hardware view of things. For example the idea that input A inplies input B.  In hardware, A and B are entirely independant of each other. The combination of A and B dictate the output C, but A and B can never affect each other.
I have an answer here, but first you will do your part. I had 4 questions above for Death. Go through each one of them and tell me where you disagree.

Quote:
And to repeat myself


from your truth table
Quote:

|   |   |         |
| A | B | A ==> B |
|___|___|_________|
| F | F |    T    |
|---|---|---------|
| F | T |    T    |
|---|---|---------|
| T | F |    F    |
|---|---|---------|
| T | T |    T    |
|---|---|---------|


Line 2 and line 3 can't coexist. Line 1 and line 4 can coexist with each other, but they can't coexist with line 3.

Anyway it's late. So enough for the night

I have already given you an example where lines 2 and 3 can co-exist. What you are thinking is simply wrong. I will repeat my example and give three more here:

Repeated Example: You have a "stubborn" gate which doesn't care what A is. It will always output B. This shows that these two lines can co-exist. I also agreed with you, that since the gate doesn't care about A, you simply forget A, and only have one input in practice (which is what you rightfully think). But in theory this can happen.

Example 2: Sticking on "stubbornness". Take the function:
f(x, y) = 1 - x + xy    (mod 2)
where x, y \in {0, 1}.
f(0,0) = 1
f(0,1) = 1
f(1,0) = 0
f(1,1) = 1
So, I want a gate to actually compute this function. That's the truth table we have. Now, if you are a manufacturer, will you ever come and tell me you can not create such a "box" (think "gate")?

Example 3: You have a lamp in your living room and a switch is responsible to turn it On. Baptize that switch as A. Pick the switch which is closest to A and name it B. Now write down when the lamp is On in the living room depending on the configuration of the switches. This is a very simple example and you might even think that I am cheating. But I am not. See the next one.

Example 4: Let's say there is a guy who hates women with red hair. So this guy prefers to be alone (in fact he is happy), instead of being involved with a red-hair (don't ask why, I don't have a good answer). However, the guy is happy if a brunette also comes into play. The guy clearly loves brunettes and so a brunette alone (red-hair is absent this time) will also make him happy. Write down now, when this guy is happy.
It is indeed
Red-hair ==> Brunette
which gives you the truth table with those properties (interpret True or 1 in the output as being Happy).


These are tough examples though. Try the approach I suggested above. 4 simple questions.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Asheera
Asheera


Honorable
Undefeatable Hero
Elite Assassin
posted May 10, 2009 02:58 AM

I have an interesting and yet complicated probability situation here. And no I do *not* know the answer, actually I was thinking you guys could help me out.

Ok it goes like this. You have some 'jewels' that are used to upgrade your 'items' to higher power levels. For example, you can have your item to +3 level or +4, etc. 6 is the maximum bonus so we're aiming for that.

However, here's the catch: when you use 1 jewel, there's a 50% chance the power level of the item will increase by 1 point, a 10% chance that it will not do anything and a 40% chance that it will downgrade by 1 point (can't go below 0 though, so when you have your item at +0 the 40% case is like the 10% one)

10 of these jewels cost 29 dollars. Now, there's another type of jewel, which increases the power level of the item by 1 with 100% chance. My question is: how much should these second jewels cost (dollars) so that 6 of them cost the same as how many of the weaker ones you need to buy to get an item to +6 (on average obviously, since there are chances involved)


So can someone help me please?
____________

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
winterfate
winterfate


Supreme Hero
Water-marked Champion!
posted May 10, 2009 03:12 AM

*ties a rope on Ashie's hip and drags her away from Runes of Magic*



Lol, seriously though, let's see.

You're going to have to find a formula for the success/failure rates. Considering that jewels become less effective as you go up the pluses, that formula is probably going to look messy...

I'm pretty sure the chances are pretty darn low and that you're probably better off getting the 100% jewels. At least, that's the way I've seen most of these things work out before.
____________
If you supposedly care about someone, then don't push them out of your life. Acting like you're not doing it doesn't exempt you from what I just said. - Winterfate

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 55 pages long: 1 10 ... 16 17 18 19 20 ... 30 40 50 55 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1272 seconds