Waves, Sand n Sun

Today I've been to the seashore. It's the Muzhapilangad beach, which is a famous drive-in beach in the whole of Kerala. I had company - my mom, dad and my partner in crime.. sis! There were bikes and cars running in both directions. C'mon.. you can't even run free without fear on such a beautiful beach?! I preferred the sea! It was great walking in it. I just felt like diving down into the water, but left the fun for yet another occasion. It's been so long, I had even forgotten the feeling of the sand flowing away from under the feet when the waves strike in..

Silhouette on Sand : Me n Sis

The pictures taken with my mob cam are too gloomy. I don't want to ruin the beauty of the place with that... hence the greyscale! :)

Walking to the Sun : My sis

Lets think Mathematics!

Lets get geeky!
Did you know? - My mom is a maths teacher! Well, it doesn't mean anything like I'm a genius in maths :P . In this vacation the Kerala government is conducting funny courses to the teachers in all subjects to train them the new aspects of revised syllabus. The teachers are actually divided into groups, given assignments, some tricky questions and even homeworks!

Now today.. mom came up with two tricky questions.

Q #1
Take 4 numbers.
The sum of the first two numbers should be double the sum of the other two.
But the product of the first two should be half the product of the other two.

Actually we can find more than one set of such numbers.
Eg: 33 1, 11 6
11+6=17=2 x 34

33 x 1 = 33
11 x 6 = 66 =2 x 33

Got it?!

To solution..
Okey, so we burned our brains on various combinations of numbers, looking out for general properties and all. Not to mention we ended up with nothing more. :(

And then this thought struck me "Why don't I leave it to the computer?"
I wrote a very simple program in Java and amazingly the computer showed me a list of such numbers satisfying the above condition!

Below is the algorithm behind it..

if(a+b==2.0*(p+q) && a*b==p*q/2.0)
// Print a,b, c,d

The numbers that we needed(below 100) are..
1 33 , 6 11
1 45 , 18 5
2 60 , 15 16
2 66 , 12 22
2 90 , 36 10
3 91 , 21 26
3 95 , 30 19
3 99 , 33 18

When was I ever gonna find 'em without my computer? After all.. studying Java at school proves a little useful! :O

Q #2
Let us think (a + b) x a x b = 4545
The question is that "Are a and b natural numbers?"

To solution..
This time I left it to the computer with no other option!

The idea was to check all combinations of a and b where I ranged a from 1 to 50, and b from 1 to 200. But none of them gave 4545. So they must be some fractions!! :D

Now I made a program to check fractions in an attempt to find a and b. But I failed in this attempt. So far no such a and b exists :( .

Can you find them??

The algorithm used to find a and b is as follows..

//Print a,b

//Print "Over!"

I really think no such numbers exist!