View Full Version : More problems with the decimal system.


lixluke
08-13-05, 03:26 PM
I'm trying to draw a right-angle triangle. 3 sides. 3 angles.
I need every side and every angle to be a whole number. No fractions. Meaning no decimal places.
Is there a way to draw such a triangle?

Janus58
08-13-05, 04:22 PM
Draw a straight line. Take a compass and set it to a whole number of whatever units you wish to measure your sides by.
Place the point on the line and draw a quarter-circle such that one point of it touches the line.
Place the point of the compass at the spot where the line and quarter-circle meet. Draw an arc that crosses the quarter-circle. Connect this crossing point with line to both the first and second spot on the line where you placed the compass. You will get a circle with sides of all equal lengths and angles of 60° each.

mathman
08-13-05, 04:27 PM
This is a guess. It is easy enough to get the sides integers using pythagorean triples.
The angles are another story. Also what units are you using for angles? The natural one would give multiples of pi.

Dinosaur
08-13-05, 05:10 PM
Suppose you wanted sides to be (5, 6, 7)

Draw a line 7 units long. Set your compass to 5 units and make an arc centered at one end of the 7-unit line. Set your compass to 6 units and make an arc centered at the other end of the 7-unit line.

Where the arcs cross is the third point of the (5, 6, 7) triangle.

BTW: For those interested in Pythagean triangles, the following provides a handy set of formulae.Pick an odd number and an even number which have no common factors, say (u, v), where u > v.


c = u<sup>2</sup> + v<sup>2</sup>


b = u<sup>2</sup> - v<sup>2</sup>


a = 2uvThe above will result in a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>

MacM
08-13-05, 11:57 PM
Draw a straight line. Take a compass and set it to a whole number of whatever units you wish to measure your sides by.
Place the point on the line and draw a quarter-circle such that one point of it touches the line.
Place the point of the compass at the spot where the line and quarter-circle meet. Draw an arc that crosses the quarter-circle. Connect this crossing point with line to both the first and second spot on the line where you placed the compass. You will get a circle with sides of all equal lengths and angles of 60° each.

I think you meant an equilateral triangle. :D

Rosnet
08-14-05, 12:07 AM
Draw a straight line. Take a compass and set it to a whole number of whatever units you wish to measure your sides by.
Place the point on the line and draw a quarter-circle such that one point of it touches the line.
Place the point of the compass at the spot where the line and quarter-circle meet. Draw an arc that crosses the quarter-circle. Connect this crossing point with line to both the first and second spot on the line where you placed the compass. You will get a circle with sides of all equal lengths and angles of 60° each.

Good. Is there any way to do this when the angles are measured in radians? (Pretty difficult, since you'll have to divide the angles by pi or something, to make them rational, let alone whole)

shmoe
08-14-05, 12:43 AM
Good. Is there any way to do this when the angles are measured in radians? (Pretty difficult, since you'll have to divide the angles by pi or something, to make them rational, let alone whole)

The angles of a triangle add up to pi radians. You can't have 3 integers that add up to pi.

Dinosaur
08-14-05, 10:11 AM
I did not notice your requirement for angles which are whole numbers. Other than an equilateral triangle with even integer sides, I do not that you can have a triangle with integer-length sides and integer-value angles.

I am assuming the angles are measured in degrees.

The following formula is valid for any triangle with sides (a, b, c) and angles (A, B, C).a<sup>2</sup> = b<sup>2</sup> + c<sup>2</sup> - 2*b*c*cos(A), where A is the angle opposite side aFor (a, b, c) integers, cos(A) must be zero (right triangle) or some angle with a rational cosine. Cosine(60) = .500 and cosine(120) = -.500 are the only candidates I know.

I am almost certain that no Pythgorean triangle has three integer angles.

You could use the above to try to find triangles satisfying your criteria, but I doubt you will find any.

lixluke
08-16-05, 01:38 PM
I dont think there is a way to draw a right-angled triangle in which the angles are whole integers and the sides are also whole integers.

Aer
08-16-05, 02:34 PM
I dont think there is a way to draw a right-angled triangle in which the angles are whole integers and the sides are also whole integers.
Angles as integers - I assume you are using degrees then. Correct?

Aer
08-16-05, 02:57 PM
Well, the answer is as I thought. Nope - not possible.

You can run this matlab code to prove it to yourself:

n=10000;
x=[1:n];
y=[1:n];
for i=1:n
for j=1:n
c(i,j)=(x(i)^2+y(j)^2)^.5;
b(i,j)=acos(y(j)/c(i,j))*180/pi;
a(i,j)=acos(x(i)/c(i,j))*180/pi;
if (c(i,j)==round(c(i,j)) && b(i,j)==round(b(i,j)) && a(i,j)==round(a(i,j)))
disp "cool";
end
end
end

Billy T
08-19-05, 06:38 PM
...
BTW: For those interested in Pythagean triangles, the following provides a handy set of formulae.Pick an odd number and an even number which have no common factors, say (u, v), where u > v.


c = u<sup>2</sup> + v<sup>2</sup>


b = u<sup>2</sup> - v<sup>2</sup>


a = 2uvThe above will result in a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>Am I missing somthing? I see no reason for any of your first line's requirements (u>v, one odd and the other even, & no common factors) Perhaps the u>v is needed if you are either against the concept of negative lengths or unwilling to make the b = v^2 - u^2 change to preserve positive lengths, but I am at a total loss to understand your other requirements. If this is your position, then why do you not also require that both u and v be of the same sign? (either + or -) If one is + and the other is - then "a" will have negative length. for example, v = -7 & u = 2 satisfies your requirements but still results in a negative length for "a"

I have not read much of this thread,so hope I am not repeating a prior post, but the title makes me want to comment that it is a shame that we have five fingers. Six would have made our mentl calculations much easier as 6 has factors 2 & 3 but 5 is a prime.

funkstar
08-19-05, 07:03 PM
To the OP:

The integer demand for the sides is easy to cope with. Any 3 fractions can be scaled up to integers, with their respective ratios intact.

So, another way to state the problem is to determine whether a right-angled triangle, with integer angles, can be created with rational side lengths. You can assume one of the side lengths as being 1, due to the scaling. There's only 44 cases to consider...

Dinosaur
08-19-05, 09:54 PM
Billy T: Sorry I did not specifically state positive integers with same sign for (u, v). This is necessary to generate Pythagorean triangles with positive integer sides.

Requirements of u odd & v even or vice versa and no common factors avoids generating similar triangles such as (3, 4, 5), (9, 12, 15), (5, 12, 13), (20, 48, 52), et cetera. Trivial algebra shows that for any (u, v), real, imaginary, or quaternon, the following will result in a <sup>2</sup> = b <sup>2</sup> + c <sup>2</sup>a = u<sup>2</sup> + v<sup>2</sup>


b = u<sup>2</sup> - v<sup>2</sup>


c = 2*u*v

BTW: I think it is a shame that we do not have two fingers and an opposing thumb. That would result in using a balanced base 3 notation using -, 0 & + as digits. This number system has some interesting properties. For example: There is no special sign logic required for arithmetic. The high order nonzero digit of positive numbers is +, while - is the high order nonzero digit of negative numbers.

Billy T
08-24-05, 04:20 PM
Billy T: Sorry I did not specifically state positive integers with same sign for (u, v). This is necessary to generate Pythagorean triangles with positive integer sides.

Requirements of u odd & v even or vice versa and no common factors avoids generating similar triangles such as (3, 4, 5), (9, 12, 15), (5, 12, 13), (20, 48, 52), et cetera. Trivial algebra shows that for any (u, v), real, imaginary, or quaternon, the following will result in a <sup>2</sup> = b <sup>2</sup> + c <sup>2</sup>a = u<sup>2</sup> + v<sup>2</sup>


b = u<sup>2</sup> - v<sup>2</sup>


c = 2*u*v

BTW: I think it is a shame that we do not have two fingers and an opposing thumb. That would result in using a balanced base 3 notation using -, 0 & + as digits. This number system has some interesting properties. For example: There is no special sign logic required for arithmetic. The high order nonzero digit of positive numbers is +, while - is the high order nonzero digit of negative numbers.

You obviously know a lot more than me about number systems (don’t get too big a head by this - know very little, most of which will be displayed in this post.) I have thought a little bout your post’s final coments and don’t understand. Please teach me a little.

Let me count in your base three system, in the way I think is conventional, but use “a” for zero, b for 1 and c for 2. (not your - , 0 ,+ as that confuses me) Starting at zero:
a, b, c, ba, ca, bb, bc, ca, cb, baa, bab … I hope I got it right.

I won’t try to do simple math in this base 3 system as I would just cheat (work it out in the base 10 system and then convert), but I don’t see how it eliminates the need for a symbol for the addition operation that is distince from the subtraction operation etc. (which is what I thought you were telling me was “interesting” about the “-, 0, +’ system.)

Consequently I thought perhaps any negative number (or the subtracted quanity is written using only two of the symbols (the - and 0) so this is a binary system, limited to negative numbers. And like wise only 0 & + are used in a binary system for positive numbers. I can imagine that some sort of “dual binary system “ might remove the need for the add and subtract operators, but I am not sure this is what your final comments were saying either. Can you give me some more information, perhaps even a simple example like 3 - 2 = 1?

Thanks.

Billy T
08-24-05, 04:21 PM
....BTW: I think it is a shame that we do not have two fingers and an opposing thumb. That would result in using a balanced base 3 notation using -, 0 & + as digits. This number system has some interesting properties. For example: There is no special sign logic required for arithmetic. The high order nonzero digit of positive numbers is +, while - is the high order nonzero digit of negative numbers.

You obviously know a lot more than me about number systems (don’t get too big a head by this - I know very little, most of which will be displayed in this post.) I have thought a little bout your post’s final coments and don’t understand. Please teach me a little.

Let me count in your base three system, in the way I think is conventional, but use “a” for zero, b for 1 and c for 2. (not your - , 0 ,+ as that confuses me) Starting at zero:
a, b, c, ba, ca, bb, bc, ca, cb, baa, bab … I hope I got it right.

I won’t try to do simple math in this base 3 system as I would just cheat (work it out in the base 10 system and then convert), but I don’t see how it eliminates the need for a symbol for the addition operation that is distince from the subtraction operation etc. (which is what I thought you were telling me was “interesting” about the “-, 0, +’ system.)

Consequently I thought perhaps any negative number (or the subtracted quanity is written using only two of the symbols (the - and 0) so this is a binary system, limited to negative numbers. And like wise only 0 & + are used in a binary system for positive numbers. I can imagine that some sort of “dual binary system “ might remove the need for the add and subtract operators, but I am not sure this is what your final comments were saying either. Can you give me some more information, perhaps even a simple example like 3 - 2 = 1?

Thanks.

Aer
08-24-05, 04:34 PM
Let me count in your base three system, in the way I think is conventional, but use “a” for zero, b for 1 and c for 2. (not your - , 0 ,+ as that confuses me) Starting at zero:
a, b, c, ba, ca, bb, bc, ca, cb, baa, bab … I hope I got it right. a, b, c, ba, bb, bc, ca, cb, cc, baa, bab - we both got to bab in 11 steps but didnt follow the same route! Anyway, I am not so sure about yours since you have ca twice :). Either way, Dinosaurs post confuses me because I don't know how we can count in base 3 with only 2 fingers unless we ignore 0? oh well.

Billy T
08-24-05, 04:43 PM
...Anyway, I am not so sure about yours since you have ca twice :)....Thanks I won't try to correct - I would probably just make another error. :eek: My point is clear even with the error.

Dinosaur
08-24-05, 04:50 PM
There was a fleeting moment in prehistoric times when it was believed that electronic components with 3 stable states were on the verge of being designed. On a computer using such components, Radix 3 or trinary arithmetic is likely to be better than Radix 2 or binary arithmetic. I worked for a company which considered designing a trinary system.

There were some disappointed designers when the tri-state components never became a reality. An odd radix makes a balanced number system possible (see below). One wise-a** suggested that a trinary radix could never be used because the digits would be called tits and that was an unpublishable word in prehistoric times.

Using 0, 1, & 2 as digits in a trinary system seems intuitively obvious. It is usable, but not likely be the best method. Oddly enough, a system allowing a digit value of minus one is possible and has several advantages. In such a system (referred to as balanced trinary), -, 0, & + are used as digits. Simple counting works is as follows. Both positive numbers (on the left: zero through 15) and negative numbers (on the right: zero though -15) are shown.
0000 0000
000+ 000-
00+- 00-+
00+0 00-0
00++ 00--
0+-- 0-++
0+-0 0-+0
0+-+ 0-+-
0+0- 0-0+
0+00 0-00
0+0+ 0-0-
0++- 0--+
0++0 0--0
0+++ 0---
+--- -+++
+--0 -++0

The digit weights are powers of three: . . . 27, 9, 3, 1, 1/3, 1/9, 1/27, et cetera, while the digit values are minus one, zero, and plus one (referred to as minus, zero, plus or -, 0, + from here on).

The addition of digits is obvious, although the last two rules might take some thought Adding zero is a null operation: The result is the other digit. Plus added to minus or vice versa is zero Plus added to plus is minus with a plus carry. Minus added to minus is plus with a minus carry.Study the above values for zero through 15 and zero through minus 15. Plus is added to each value on the left to get the next value. For the negative numbers, minus is added to each value. It is easier to see the rules in a matrix form, but I do not know how to format it that way on this forum.

Multiplication of digits is more obvious. It follows the ordinary rules for algebraic multiplication among the values plus one, minus one, and zero.

The notation has several interesting properties. There is no position reserved for the sign. The highest order digit (plus or minus) determines whether the number is positive or negative.


There is no special logic for adding a negative number to a positive number. You merely add the digits using the rules for addition of digits.


To obtain a complement (for use in subtraction), reverse Plus/Minus digits, and leave zero digits as is. This is simpler that the rule for twos complement in binary: Reverse one/zero digits and then add one, which can result in carry ripple all the way to the high order bit.


Carry occurs less often because only 2/9 of the possible digit sums result in carry (1/4 cause it in binary). Furthermore, carry ripples tend to be shorter in balanced trinary than in binary. In binary, a carry ripples half the time, while it only ripples 1/3 of the time in balanced trinary.In a CPU with parallel logic for addition, carry ripple is the slowest part of the operation, because it is a serial operation. I do not know how much it can be speeded up by special circuitry, which started to be employed in the first solid state CPU (about 1959). The lower frequency of carry and the shorter ripples could be expected to result in a faster CPU.

There are some anomalies in balanced trinary. Fractional values can have a non-zero digit to the left of the radix point. For example: +.- is equivalent to 2/3 in decimal.


Some pairs of never ending fractional values approach the same limit. For example: +.--------- and 0.++++++++ both approach ˝ in the limit. Note that in decimal, the never ending values .9999999 and 1.000000 approach the same value, but are overlooked because the latter is never written that way. There are more examples in both systems, but the decimal examples all involve repeating nines and zeros, while the trinary examples involve repeating pluses and minuses.


Multiplication is simpler due to no special sign logic being required, but might take longer. In binary, half the bits in the multiplier require only a shift. In balanced trinary, only 1/3 of the tits require a shift-only operation.


Division is more complicated in balanced trinary. The difficulty is related to the two possible never ending equivalents of ˝

Dinosaur
08-24-05, 05:08 PM
Billy T: My knowledge of radix arithmetic in general and balanced radix 3 notation in particular does not make me feel that I am a genius. I happened to have been exposed to radix arithmetic and trinary notation using negative digits values due to a job I had in prehistoric times. The subject interested me and I remembered most of the details.

Your ignorance of the subject is obviously due to lack of exposure, not lack of intelligence. Once given a clue or two, almost anybody can understand how balanced trinary notation works. Any odd radix tends to be better dealt with using digits with negative values, but base 5, 7, 9 et cetera would be a bit of a problem because previously used symbols do not exist for minus 1, minus, 2, minus 3, et cetera. Radix 3 using -, 0 & + for digits seems easy to grasp because we are familiar with the symbols - & +

BTW: Why not use (0, 1, 2) as digits in ordinary radix 3 notation? (a, b, c) confuse me in this context.

Billy T
08-24-05, 05:21 PM
...BTW: Why not use (0, 1, 2) as digits in ordinary radix 3 notation? (a, b, c) confuse me in this context.Have not yet read your longer post, but quick look tells me I need to say thank you agian. In answer to this question, I did not want to repeat your "0" not knowing what it ment, so I just took first three symbols that came to mind.

Aer
08-24-05, 05:35 PM
I happened to have been exposed to radix arithmetic and trinary notation using negative digits values due to a job I had in prehistoric times.
You really are a dinosaur..

Anyway, the system is very interesting. Thanks for sharing.

funkstar
08-25-05, 07:24 AM
The notation has several interesting properties.
There is no position reserved for the sign. The highest order digit (plus or minus) determines whether the number is positive or negative.


There is no special logic for adding a negative number to a positive number. You merely add the digits using the rules for addition of digits.


To obtain a complement (for use in subtraction), reverse Plus/Minus digits, and leave zero digits as is. This is simpler that the rule for twos complement in binary: Reverse one/zero digits and then add one, which can result in carry ripple all the way to the high order bit.


Carry occurs less often because only 2/9 of the possible digit sums result in carry (1/4 cause it in binary). Furthermore, carry ripples tend to be shorter in balanced trinary than in binary. In binary, a carry ripples half the time, while it only ripples 1/3 of the time in balanced trinary.

That's actually very nice.

In a CPU with parallel logic for addition, carry ripple is the slowest part of the operation, because it is a serial operation. I do not know how much it can be speeded up by special circuitry, which started to be employed in the first solid state CPU (about 1959). The lower frequency of carry and the shorter ripples could be expected to result in a faster CPU.

There's a thing called carry-lookahead, which is far better than a simple ripple carry. Quite clever, but it takes up a bit of real estate on the chip, and there are some long signal paths for certain necessary carry bits...