Tuesday, August 7, 2007

Future Engineer questions (niha)

1)A power unit is there by the bank of the river of 750 meters width. A cable is made from power unit to power a plant opposite to that of the river and 1500mts away from the power unit. The cost of the cable below water is Rs. 15/- per meter and cost of cable on the bank is Rs.12/- per meter. Find the total of laying the cable.?


2. The temperature at Kochi is given by the function: -t2/6+4t+12 where t is the elapsed time since noon. What is the percentage rise (or fall) in temperature between 3.00 PM and 6.00 PM?
(a) 37.9% (b) 32.9% (c) 36% (d) 39% (e) 30%

3. A Two-dimensional array X(7,9) is stored linearly column-wise in a computer's memory. Each element requires 8 bytes for storage of the value. If the first byte address of X(1,1) is 3000, what would be the last byte address of X(2,3)?
(a) 3247 (b) 3567 (c) 3127 (d) 3225 (e) 3765

4. A file is transferred from one location to another in 'buckets'. The size of the bucket is 10 kilobytes. The bucket gets filled at the rate of 0.0001 kilobytes per millisecond. The transmission time from sender to receiver is 10 milliseconds per bucket. After the receipt of the bucket the receiver sends an acknowledgement that reaches sender in 100 milliseconds. Assuming no error during transmission, write a formula to calculate the time taken in seconds to successfully complete the transfer of a file of size N kilobytes.
(a) 10.11 N (b) 11.011 N (c) 11.01 N (d) 10.101 N (e) 10.011 N

5.In a mixture, R is 2 parts, S is 1 part. In aoder to make S to 25% of the mixture, how much R is to be added?

6.Three companies working independently and get savings 10%, 20%, 25%. if the companies work just opposite then what will be the net saving?


7.If A, B and C are the mechanisms used separately to reduce the wastage of fuel by 30%, 20% and 10%. What will be the fuel economy if they were used combined.

8. Decimal no 319 is equal to 1234.This 1234 belongs to which Number systems

9. In which of the system, decimal number 384 is equal to 1234?
10.The cost of one pencil, two pens and four erasers is Rs.22 while the cost of five pencils, four pens and two erasers is Rs.32.How much will three pencils, three pens and three erasers cost?


11. There is a circular pizza with negligible thickness that is cut into 'x' pieces by 4 straight line cuts. What is the maximum and minimum value of 'x' respectively?
a) 12,6 b) 11,6 c) 12,5 d) 11,5

Thursday, July 26, 2007

number puzzle

being in 'information technology' industry has a lot of drawbacks. biggest of them all is you start thinking in terms of loops and variables.

as soon as someone tell you to find a solution for a math puzzle, i would say, easy - do this do that and you have the solution. but actually coming up with a valid reason for the solution mathematically is way tougher then the program.

i read a puzzle (http://blogs.msdn.com/jmstall/default.aspx)

ABC
+DEF
----
GHI

Where each letter represents a unique digit between 1 and 9, such that all digits are used exactly once.

Now for once you can write a program which will solve this
iterate through two loop for x and y from 1 to 999
number x and y should not have common digits
find x and y whos sum(s) is another 3 digit number
number x, y and s should not have common digits
x,y,s is a solution


if you can write a program; can you explain the mathematic logic?

i have a detailed explanation on the blog by a person named DAVID

Explanation

Let x = A+B+C+D+E+F and y = G+H+I
Note that x + y = 1+2+3+4+5+6+7+8+9 = 45
Hence x + y = 45 and y = 45 - x
If there is no overflow then x = y, so x = 45 - x => x = 22.5 => impossible
If there is one overflow then x - 10 + 1 = y (10 lost on one digit, 1 gained on other digit), that is x = y + 9
Therefore x = y + 9 = 45 - x + 9 = 54 - x => 2x = 54 => x = 27 => eventually possible
If there are two overflows then by same argument x = y + 2*9 => ... => impossible
Hence there is exactly one overflow
Now note that we can without loss of generality assume that:
A < D
B < E
C < F
A + D < 10
B + E < 10
C + F > 10 (overflows)

Hence if we have one solution, we can produce 16 other by swapping pars A-D, B-E, C-F and by moving the first column to the back - that is:

BCA
EFD
HIG
Also observe that under these constraints:

G = A + D
H = B + E + 1
I = C + F - 10
Now, consider possible triplets (C,F,I): (under the constraint C < F and C + F > 10)

2 9 1;
3 9 2; 3 8 1
4 9 3; 4 8 2; 4 7 1
5 9 4; 5 8 3; 5 7 2; 5 6 1
6 9 5; 6 8 4; 6 7 3
7 9 6; 7 8 5
8 9 7;
Consider triplet (2,9,1):
Numbers 1,2,9 are taken so 3,4,5,6,7,8 is left for A,D,G, B,E,H which are related by
G = A + D
H = B + E + 1
Thus G + H = A + B + D + E + 1
left hand side <= 7 + 8
left hand side <= 15
right hand side >= 3 + 4 + 5 + 6 + 1
right hand side >= 19
so there can not be equality and there can not be solution for triple (2,9,1)
Similarly we eliminate triples (3,9,2) and (3,8,1).

Other tripes have a solution. For example consider (4,9,3):

Numbers 4,9,3 are taken. Numbers 1,2,5,6,7,8 are left.
G = A + D
H = B + E + 1
7 = 1 + 6
8 = 2 + 5 + 1
(or
7 = 2 + 5
8 = 1 + 6 + 1
)
So this yields solutions:
124
659
783
and
214
569
783
In conclusion, we have 13 possible triplets for (C,F,I), each should yields at least one solution and each solution can be permutated 16 times. Thus, we have at least 208 solutions.


lesson leart
start reasoning and minimize solving