Professional Documents
Culture Documents
1. Faster is better. The judges are very impatient, one of them cannot sit in a place for too long. So
programs running longer than they should, will be marked negatively. If two competing teams
programs give correct results, the one which runs faster will get higher marks.
2. Transparency is very important. You should write comments. It will help us to understand your
code even if it does not work in some cases.
Test Case
2/3
27/23
10
52/43
15
11/9
20
102/83
The table Test Case gives equivalent resistance at the port for five different values of the variable
resistance . Suppose, your MATLAB function is named Eqv_Res. If it is called like,
Req=Eqv_Res( [0 5 10 15] , [ 2/3 27/23 52/43 11/9] , 20);
Then Req will be 102/83.
2. Series of Blocks.
There are three single port linear electrical networks named for = 1,2,3. Each of these networks have
two terminals and . For example, Network 2,
has two terminals
and . When any two of those
networks are connected, their terminals with the same name are shorted respectively. As shown in the
figure, to connect
and ,
and
are shorted and so are and . The current from
to
are
defined as . Voltage between and terminals are denoted as
. Given
,
,
and
,
,
find out the current if the three blocks are connected in series (
with ,
with and
with
).
Test Case
3/2
2/3
17/10
4
64/3
24/5
23/14
If the name of your MATLAB function is Sers_Cur, then if it is called like,
I_s=Sers_Cur(
);
if divided by
0< , , ,
< 10
0.5
0
-1.5
-1
-0.5
0.5
1.5
-0.5
-1
-1.5
1
1
1 or 1
0
0
where
The guru replied, That my son, is not going to happen. The best I can do is to tell you the value of ( )
at equally spaced points in the complex unit circle. To say it in another way, I can give you ( ) for all
=
, where
= 0,1,2, ,
1 and
Can you do the same? Given the value of a function ( ) at equally spaced points in the complex unit
circle, can you uniquely determine what the function is? 100000.
for
, where
1 . C is an array (of length N) which should contain the coefficients of the polynomials
6. Brilliant Kanto
Kanto has recently graduated and got his first job. Quite the happy and excited Kanto soon finds his
excitement to vanish like a leaked balloon as soon as he gets his first assignment from his boss, a techy
dilettante. His company is planning to buy a new instrument and have collected samples from several
competing suppliers. Kanto has to test all the samples and prepare a comprehensive report. The
performance of the machine is measured by the current it draws. His boss has asked him to monitor the
current drawn for a complete task period (which is a long time actually) of each machine. But Kanto is
too smart for that he analyzed the circuit of the machine and figured out that the current drawn is a
function of time and has Nth order dependence on time. Then he made a schedule to monitor the currents
at only a few number of times at regular intervals and wrote a function in MATLAB[F]=I_was_not_here_the_whole_time ( IWAS , N, IWASNT)
It took the current readings that Kanto did took(IWAS), the order of dependence on time(N) and the time
instants (not monitored) at which he wanted to know the current readings(IWASNT) and the function
returned the correct readings(F). Can you write the same function that Kanto wrote?
7. Locating target
In an indoor positioning system, every target being tracked has an onboard transceiver that can
approximately determine its distance from the transmitters located at fixed points over the area. Ideally, if
the measured distances were free from errors, distances from two transmitters would be enough to give
the exact location of the target. However, the measured distances have considerable errors. Therefore, the
system utilizes measured distances from more than two transmitters to reduce the error and get the best
approximation of the location of the target.
Assume the system is employed on a xy-plane. Write a function[x_target , y_target] = locate_target(x_trans, y_trans, r_trans )
x_trans and y_trans are the vectors that contain the x and y co-ordinates of the transmitters placed at fixed
positions (N, number of transmitters, can be no less than 3) and r_trans is the vector containing the
measured distances of the target from the transmitters. The function returns the x & y co-ordinate
(x_target, y_target) of the target.
Test case:
[x_target , y_target] = locate_target( [0, 1, 0], [0, 0, 1], [1.41, 1, 1.01] );
Then x_target=1 and y_target=1(approximately). Since this will always return an approximate value, an
answer with small margin of error will be accepted as correct.
121
122
122
121