Download Edward Knote

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Edward Knote
Homework fraction conversion
Qestion1:
In this we were asked to convert fractions into decimals of base 2, 3, and 5. This is
done by using the following steps:
1) multiplying your base number times the fraction
2) then we check if it is improper now or proper
a) if it is proper place a zero in the first position behind the decimal and multiply
again
b) if it is improper divide the fraction and place the whole number in the first
position and use the remainder as the numerator of the next fraction.
3) repeat steps 1 and 2 till you see a repeating pattern or a fraction is repeated.
Ex:
1
in base 2
2
1
2
2 
2
2
Now we divide and get 1 so we place this behind the decimal as .1 since there is no
fraction left we would stop.
1
in base 3
2
1
3
3 
2
2
Now we divide and get 1 as the whole number so we place this behind the decimal as .1
and we get a remainder of 1 so that is our numerator for the next fraction but this makes
1
again so we can stop and see we will just keep getting 1 remainder 1 with this process
2
so our decimal is .11111….
1
in base 5
2
1
5
5 
2
2
Now we divide and get 2 as the whole number so we place this behind the decimal as .2
and we get a remainder of 1 so that is our numerator for the next fraction but this makes
1
again so we can stop and see we will just keep getting 2 remainder 1 with this process
2
so our decimal is .222222….
Base
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
1
10
1
11
Base 2
Base 3
Base 5
0.1
0.1
0.2
0.01
0.1
0.13
0.01
0.02
0.1
0.0011
0.0121
0.1
0.001
0.01
0.04
0.001
0.010212
0.032412
0.001
0.01
0.03
0.000111
0.01
0.023421
0.00011
0.0022
0.02
0.0001011101
0.00211
0.02114
As you can see I have explored this process with the fractions above and shown the
resulting decimals.
2)
I used the saw-tooth in excel and notice the same pattern we saw in class as you go
further down the decimal it seems the pattern gets messed up. This is because of the
rounding capability of the machine. Excel can only go so many decimal places out and
as it rounds it gets worse and worse. This causes the pattern to look like it stops when in
fact it keeps going.
3)
As the saw tooth for base 2 was the formula
1

when 0  x 
2 x,
2
f ( x)  
2 x  1, when 1  x  1

2
Because of the intervals [0,1/2] ,[1/2,1] in the first interval if you multiply by 2 you end
up with a proper fraction so we place a zero and multiply again. In the second interval
you end up with an improper fraction but since it is base 2 the only new option is a 1 so
we subtract 1 and end with our new fraction. In base 3 we have 3 posible remainders so
we need 3 regions and subtract our values 0, 1, and 2. This is shown in the step function
below.
1

when 0  x 
3 x,
3

1
2

f ( x)  3 x  1, when  x 
3
3

2

3 x  2, when 3  x  1

This function will enable you to do the process of conversion with base 3. if the fraction
lands in the first region place a 0 if it is in the second region use a 1 and in the third
region put a 2.
4) Given x = 1/2, find values for y, so that |x-y| < 1/64, <1/128, <1/256, <1/512, <1/1024
and |fk(x) - fk(y)| > 1/2, for some k.
First look at this as a 2 part question:
The first part is to find out what will solve the absolute value equations. Since absolute
value is a distance and we know x=1/2 then, you are really looking to find numbers with
in a certain interval around 1/2.
Ex:
1
1
y 
2
64
Is solved with this compound inequality
1 1
1
 y
64 2
64
Then we subtract ½ fro both sides and get

31
33
y
64
64
This interval is show here for each y value
1
64
31
33
y
64
64
1
128
63
65
y
128
128
1
256
127
129
y
256
256
1
512
255
257
y
512
512
1
1024
511
513
y
1024
1024
Now we need to look at this in the chaos applet and iterate this with the saw-tooth
function to find a k value that saticfies the function |fk(1/2) - fk(y)| > 1/2. Since we know
that when you iterate the value ½ it goes strait to zero we only need to look at two parts
those values above ½ and below 1/2. The values below ½ take only 1 step for every case
and since that is not interesting we check the ones above ½. It seems to follow that the
first interval takes 6 steps so k is 6. Then the second interval is k=7 and the next is k=9.
The last 2 follow this pattern of increasing by 1 so we get k=9 and then k=10. We can
relate these numbers back to the fractions by using powers of 2 in the denominator.
1
So if the fraction is n then the k=n.
2
5) I use Anna’s reply in the forum to come up with a reason for the numbers to work.
I came up with this reason:
If you start by looking at the intervals as a saw-tooth with that base so [0,1/16]
[1/16,2/16][2/16,3/16] and so on. We can look at these regions in the base of 16 and to
include all we would use the decimal in base 16, .0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
because it hits all the regions of base 16 then change this to its number in base 10 and then
when we change it to binary we end up with
.0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
and because of how it looks in base 16 is the reason it hits every region though. This also
works with 1/4 regions. The number .0123 in base 4 is 27/256 and in binary it is .00 01 10 11
and this hits every region [0,1/4][1/4,2/4][2/4,3/4][3/4,4/4] but it does this because of its
look in base 4 that it hits all the regions in base 2
Also if you mix the numbers up it works as well like .3210 in base 4 is .11100100 in base
2 and it hits every region. So if you want to hit every 1/16 region make sure the number
in base 16 includes every possible remainder and it will work. I think this will work if
you want to hit each region 2 times make sure the remainder shows up 2 times in that
base.
6) The results are as follows for x =.1 and the subsequent y values
y=.11 k=7
y=.101 k=9
y=.1001 k=11
At this point I thought the pattern would be increase by 2 but then the next messed that up
y=.10001 k=15
y=.100001 k=23
now I was thinking a pattern of alternating primes and and multiples of 3 but the next few
messed this up. So I I came up with is that there is no real pattern for adding a zero
between the 1’s and the k value.