some simple questions (1 Viewer)

Status
Not open for further replies.

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
1) Prove log_10 15 is irrational. (log base 10)


2) find gcd( 5!20!, 10!15!)



for 1), I was thinking something like 10<sup>x</sup> = 15 where x needs to be an integer, which is not true;

for 2), I was told to "simplified" those factorials, but i did it on a smaller scale(ie with 2s and 4s) but found out that you cannot find the "exact" gcd.
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
1) yes, BUT: it's not "prove it is non-integer" but rather irrational. Therefore the equation is 10^x=15^y

2) Simplify them by considering the number of 2's multiplied together on LHS, then RHS, and repeat.
eg in 5! there are 3 powers of 2, 20! there are 18, so 21 on LHS. RHS: similarly you get 19. Hence the gcd has 2^21 in it. Repeat for 3, 5, 7, 11, 13..
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
okay... the way you do 2) is to find the prime factor decomposition of both sides.
5!20!=2^21*3^9*5^5*7^2*11*13*17
10!15!=2^19*3^10*5^5*7^3*11*13

the way we find this out? Umm.. okay. I'll demonstrate with 2 and 5.
for 5!20!, we want to find how many 2's there are in the product. in 5!=5*4*3*2*1, there are [5/2] (the integer part of 5/2) numbers divisible by 2, ie 2 numbers divisible by 2. There is also one number divisible by 4. Therefore, we can count the 2's by counting a 2 in 2, a 2 in 4. But because 4 is divisible by 2 twice, we add another one. Similarly for 20!: there are 10 numbers divisible by 2, 5 divisible by 4, 2 divisible by 8, 1 divisible by 16

so I'll try to demonstrate this graphically...

16= 2*2*2*2
8= 2*2*2
4= 2*2
2= 2

in the first count (ie numbers divisible by 2) we take care of all the 2's in the first column. In the second count (divisible by 4) we take the ones in the second column (because that belongs to the ones divisible by 4/8/16) etc etc..
thus we get 18 powers of 2 in 20!. Add that to the 3 we got for 5!, get 2^21.

Similarly, for powers of 3 in 10!15!: There are 3 numbers div by 3 in 10!, 1 div by 9 -> 4 powers of 3 in 10!. Similarly there are 6 powers of 3 in 15! -> 3^10 is the right power in the prime decomposition of 10!15!.

Once we have the prime decompositions we can just read off the lower power of each prime as the gcd ie 2^19*3^9*5^5*7^2*11*13.
 

who_loves_maths

I wanna be a nebula too!!
Joined
Jun 8, 2004
Messages
600
Location
somewhere amidst the nebulaic cloud of your heart
Gender
Male
HSC
2005
Hi ... ,

Question 1:

i'm not sure if you still need the solution to your first question of irrationality, but here it is anyways:

let 'log' from here on denote "logarithm of base 10" :

log(10) = 1 ---> log(15) > 1

ie. log(15) = a/b ; where 'a' & 'b' are mutually prime integers, and where a > b

---> 10^(a/b) = 15 ---> 10^a = 15^b ;

since a > b, then let a = b + k ; where 'k' is integral.

ie. 10^b.10^k = 15^b -----> 10^k = (3/2)^b

LHS = 10^k is always integral for all integer 'k'
but, (3/2) is non-integral and can't be reduced/simplified further, and since 'b' is integral, then RHS = (3/2)^b is always non-integral for all integer 'b'.

hence, we arrive at the contradiction that although LHS = RHS, no numbers in the real system can be both integral and non-integral simultaneously.

ie. initial assumption of rationality is refuted.


Question 2:

As to your second question of Greatest Common Divisor, there is nothing wrong with what turtle_2468 has done, except that his method is a bit unnecessarily lengthy for my liking... so here's what i would have done:

consider the ratio {or fraction}: (10!15!)/(5!20!)

the (5!) in the denominator cancels completely against (10!), and the (15!) in the numerator also cancels completely against (20!) to give:
(10!15!)/(5!20!) = (6.7.8.9.10)/(16.17.18.19.20)

which then easily cancels down again to: (6.7.8.9.10)/(16.17.18.19.20) = (3.7)/(4.17.19)

this does not reduce further, hence the GCD is very simply:

GCD{10!15!, 5!20!} = (10!15!)/(3.7) = (5!20!)/(4.17.19)


hope that helps :)


P.S. personally, if you encounter this type of question in an exam, i'd advise you not to use the technique of decomposing into prime factors and adding up the exponents one by one as turtle_2468 suggested ... since it's very easy to make a mistake that way. But cancelling out and reduction using fractions is much easier and more expedient.
 
Last edited:

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
boo. Your method doesn't generalise...
so if the question were like 100! then you'd take forever!

Granted, though, for this question it's probably safer... if not quicker.. :p I reckon I'd do my method quicker than you'd do yours..
but then, now I'm just being annoying. Both methods work.
 

who_loves_maths

I wanna be a nebula too!!
Joined
Jun 8, 2004
Messages
600
Location
somewhere amidst the nebulaic cloud of your heart
Gender
Male
HSC
2005
^ lol, you can say the same thing about your method as well. and if the question were 100! i personally wouldn't take forever no :p ; your way of finding the possible prime factors and the number of them for 100! would take a lot of people much longer to complete - not to mention the risk of getting a small thing wrong here and there.

in terms of generalisation - my method DOES generalise. when asked to find the GCD of ANY two integers, you can always use the ratio/fraction method - as long as a person knows how to simplify fractions, then it'd work ALL THE TIME.

you're method generalises as well - but in a very inconvenient fashion. because for any large number, not only do we have to count carefully the number of exponents of one particular prime factor - but also that the number of different constituent prime factors may be very, very, many! and you wouldn't know which ones to look for unless you use trial and error - or divisibility rules (which is only commonly known for low-order primes).

don't forget that the set of prime numbers is infinite ... how do i know which of the numbers {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, ......} will be a factor of a very large number without trial and error ?
 
Last edited:

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
I stand by my method.. having actually used it in exams where no calculators are allowed... but then, you're entitled to your opinion. BTW, you don't just "count" like I did in the example, you use floor functions eg [100/2]+[100/2^2]+....

but anyway. Work to do. I do accept the point about infinite prime factors.. but obviously you haven't tried cancelling out 40 or so factors against each other and seeing how many mistakes one tends to make :)
 

who_loves_maths

I wanna be a nebula too!!
Joined
Jun 8, 2004
Messages
600
Location
somewhere amidst the nebulaic cloud of your heart
Gender
Male
HSC
2005
^ you can use my method with equal efficiency in exams where no calculators are allowed... but even more importantly, you can use my way where calculators ARE allowed too - it's a simple division of numbers. your method of counting exponents and guessing which primes are constituents, etc..., are not in-built processes in a normal calculator.

so my way's a win-win situation ;)
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
shall we do gcd of {(100!25!60!),(10!10!10!10!10!10!)} and see how long it takes you to do it? and how long it takes me?

also, the calculator's fraction function is WAY overrated. doesn't work with most exponentials... the numbers involved are simply too large..

I guess this is no longer to the thread. But people arguing with me when I'm in an argumentative mood strikes my fancy... apologies to all who have to put up with this. BUt then you don't have to read the thread...
 

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
ENOUGH!!!


i only wanted to know the "algorithm" :(:(:(:(

turle, are you confident with languages(ie strings?) ??
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
hehe... the apology was aimed at you mostly I guess. But I guess I'm too competitive...

I've done quite a few olympiad questions involving manipulation of strings etc, but if you're thinking about the more programming side of things, I'm not that sure... post up the question, if I don't know the answer I will direct you to someone who does (assuming of course that this is an answerable question)..
 

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
sweet!!

1)
Write down regular expressions for the languages consisting of all binary strings(ie languages on the alphabet A=(0,1) satisfying the following description:
(c) All strings containing at least two 1s and an odd number of 0's
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
Umm, this isn't a uni assignment is it? is it worth marks?

I know the answer, I can describe it to you,but if you have a definition of "regular expression" that'd be nice..
 

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
turtle_2468 said:
Umm, this isn't a uni assignment is it? is it worth marks?

I know the answer, I can describe it to you,but if you have a definition of "regular expression" that'd be nice..
that was a tutorial question, the answer i was given seems awfully out of place(ie there could be a neater answer)


um, regular expressions, isn't that like the "general form" for the string

ie something like.
(00)* + 1* etc etc
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
... said:
sweet!!

1)
Write down regular expressions for the languages consisting of all binary strings(ie languages on the alphabet A=(0,1) satisfying the following description:
(c) All strings containing at least two 1s and an odd number of 0's
hmm. I just learnt about regular expressions :) http://www.cs.princeton.edu/introcs/72regular/
it's from princeton so it can't be that far off..

After thinking about this for a few minutes, I think that the answer IS quite ugly. For firstly you want to try to get rid of the at least two 1's requirement, then you get ugly odd or even requirements... ie consider the whole string. Now take the first two 1's, and "highlight" them. Between the two 1's and before the first one you'd get a whole string of 0's... so putting X1Y1Z, and f(X) etc equal to the number of 0's in that substring:
{f(X),f(Y),f(Z)}={Odd,Odd,Odd} OR {Odd,Even,Even} OR {Even,Even,Odd} OR {Even,Odd,Even}. eg if the sequence was 00001000000010000 then f(x)=4, f(y)=7, f(z)=4.

so firstly, what is the regular expression for any expression with an even number of 1's? Obviously (1*01*01*)*. Similarly the expression for any expression with an odd number of 1's is 1*0((1*01*01*)*). I know this looks very long, but there IS a reason.. suppose you have 111110 and 011111. How do you put both of those in the same thing yet allow for more 0's? I think this is the shortest way...

anyway. so for the case where f(x), f(y), f(z) are all odd, we can get away with
X=0(00)* (notice this is much simpler because we only have 0's so can get rid of all the 1*'s)
Y=0(00)*
Z=(1*01*01*)*
So the string is 0(00)*10(00)*11*0(1*01*01*)*.
{odd,even,even}: 0(00)*1(00)*1(1*01*01*)*.
{even,odd,even}:(00)*10(00)*1(1*01*01*)*.
{even,even,odd}: (00)*1(00)*1*0(1*01*01*)*.
so alternate these and you have the answer.

Did this version of the notation make sense to you? Sorry, I'm going to sleep in 10 minutes, will check for reply before that..

a* | a*ba*(a*ba*ba*ba*)*a*ba*
 

...

^___^
Joined
May 21, 2003
Messages
7,723
Location
somewhere inside E6A
Gender
Male
HSC
1998
alright, i need time to re-think what you wrote

thanks

and here was the answer:
(00)*((10+01)(00)*1+(1+010)(00)*1+0)(01*0+1)*


HAHAHAHHAHAHAHAHHAH
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
lol... and you thought that one was short?
Umm.. I think that + in your one means "or" right?
In that case, I think that 0 is a valid string (take none of first, none of last, and the 0 in the middle one)... which is dodgy...
 

turtle_2468

Member
Joined
Dec 19, 2002
Messages
408
Location
North Shore, Sydney
Gender
Male
HSC
2002
turtle_2468 said:
lol... and you thought that one was short?
Umm.. I think that + in your one means "or" right?
In that case, I think that 0 is a valid string (take none of first, none of last, and the 0 in the middle one)... which is dodgy...
A shorter version of what I wrote before:

(0(00)*(10+01)(00)*(10+01)(01*0+1)*)+(1(00)*(10+01)(01*0+1)*)

I know it's still longer than their answer but I understand how it works:
the (10+01) is brilliant. It allows you to put in a 1 no matter the parity of 0's before it and preserve the parity of 0's... however if you use two of them like I did in the first bracket you get even numbers of zeroes. Therefore put a zero at the start..

the only case where this doesn't work is when there are no zeroes at the start. Which is where the second bracket comes in... similar principle.

The (01*0+1)* is all the bits after the second 1.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top