Академический Документы
Профессиональный Документы
Культура Документы
Level 1(75 points): The king may be located at any point on the chess board. The
knight has to reach the king in the most efficient way (least number of moves).
The knight begins from the top left corner which shall be the starting point.
Let (m,n) be the position of the king. Then the knight at (1,1) has to reach
his king in the least number of moves possible while the king remains in the same
position. Remember how the knight moves on the chess board! Let him rush to
his king’s aid as soon as he can.
The input will be the position of the king on the chess board (m,n). So (8,8)
can be the farthest distance possible between king and knight. The output should
be in column form containing the row and column values of the knight’s position
after each move. The position is represented as (row,column).
Format: knight=rtk1(m,n)
Output:
knight =
1 1
3 2
5 3
Remember that you have to make the least number of moves to reach the king. If
you take a longer route, it may be too late to save the king!
Bonus:
Level 2(+50 points):O.K. you solve the above problem this should also be a piece
of cake. Assume that the knight can start from any position on the board. We
choose the knight’s starting position as (a,b).So in this case the input should be in
this format(use rtk2 as file name for this question):
knight = rtk2(a,b,m,n)
Output should show the starting point (a,b ) and the ending point (m,n)
Level 3(+100 points): Lets take the problem to the next level. Now, assume that
the king can also move as it normally moves on the chessboard. So after the first
move from the knight, the king makes a move. Then the knight moves. This goes
on. They should meet in the least number of moves! If you can solve this question
using level 1 condition, you get half the points. Solve it using level 2 conditions
and you get all of them!! (Use rtk3 as file name for this question)
Output:
knight =
1 1
2 3
4 2
king =
5 3
4 2
2. Simple separation (50points)
In this problem the input is a color image containing two types of boxes in
rectangular are circular shape. The dark ones are filled with coal while the white
boxes are empty. Just perform the simple task of reporting how many filled and
empty boxes are present. A sample image is given for your reference:
All input images used to test your code will be of size 200*200 and in jpg format.
Let X be the image stored in a matrix form.
filled =
empty =
Ashish sends a message to Laxman who is standing on the opposite side of a big
lake. But Laxman faces a problem because of the echoes of sound due to the hills
which were present on the other two sides of the lake. The message received by
Laxman is recorded in the file “echo.wav”. Now your task is to make a Matlab
program (pwe.m) to extract the original message (which is free of echoes).
Specifications:
1) There is 20% loss of sound amplitude due to reflection.
2) Neglect the phase change due to reflection.
3) The different path lengths are AB = 960 m, CO=200 m, DO = 360 m.
4) Take velocity of sound as 300 m/s.
5) Sampling rate:11025samples/s.
Note: wav files for each “right”, ”left”, ”up”,” down” are given in the same names.
Sample File:”command.wav”
LOCK: YEKEHTTEGDNASIHTEVLOS
Now Benzun starts thinking how can I decode this message without a KEY? So he
tries to contact Rajiv and finally succeeded. But they have to converse in short
and in an unclear way so that enemy even if they intercept them gets nothing.
Benzun: you have sent me only LOCK, where is the KEY?
Rajiv: that’s enough…
And the line went dead after this
Still Benzun doesn’t get anything. Now as the senior of SPY Benzun your job is
To decode the above message.
To get the operation to be performed on voice.wav.
To obtain the original message.
You are given 4 bars connected to each other in a single plane as shown in the
figure. The bar L4 is fixed, and cannot be rotated about any joint. However, L1, L2
and L3 can be rotated freely. Given the lengths L1, L2, L3 and L4 of the 4 bar
mechanism shown in the figure, you are required to calculate whether it is
possible to make the bar L2, parallel with respect to the bar L4.
Write a MATLAB program (*.m) which takes in a blurred image and gives out
the de-blurred image and blur length. Motion blurring will be only in the
horizontal direction and blur lengths will have a range from 100 pixels to 200
pixels.
Note:
1) image input is a color image.
2) Better results will be getting more points.
Write a matlab program to get the original signal. Find the duration between
peaks of two pulses in the de-noised signal.
Note:
1)File to be used is ‘signal.mat’.
2) Use ‘load‘function to get the noise signal named ‘inputSignal’.
3) The output variable ‘duration’ should be given in milliseconds.
One fine day, while browsing through these photos, you see a challenge.
Considering any image with triangles and circles, you try to count the number of
squares and circles. The figures are all solid. Your objective is to now write a code
that will take in an image matrix, and count the number of squares and circles you
find in them.
ncircle =
2
ntrianlge =
3
Note:
1)Input is a color image with objects in bright colors and background in black.
2)triangles are having all angles more than 10degrees.
3) Objects don’t overlap each other.
Arvind, nicknamed ‘Jar’, is a prodigy. He wrote his first successful C program when
he was 5. He built a line follower robot when he was ten. When he was 11,he
entered a prominent institute for doing his undergraduate studies in electronics
and communication engineering. One of his interview questions was to design a
model that uses only a single DC power supply of 12 V to generate two sinusoidal
signals of frequency ‘x’ and ‘2x’ .Then ,treat the signal with frequency ‘2x’as a
carrier and signal with frequency ‘x’ as the message and perform amplitude
modulation with modulation index 0.8.
Jar is addicted to matlab and carries his laptop with him everywhere. For the
above question Jar used ‘simulink’ to create a model that performed the required
operations and produced a plot of the amplitude modulated waveform.
Jar, who is 21 years old now likes to see how many fans of simulink are out there
who can do what he did back then. Best of luck!
Jar’s best friend Santosh Raj is crazy about digital electronics. He likes to see if
anyone can use simulink to design a sequence detector that detects 101101 or
10010
For parts ‘a’ and ‘b’ upload required simulink models with file names
simulink1.mdl and simulink2.mdl respectively.