Professional Documents
Culture Documents
Names: M ~~H -
Contact numbers: ~bllC/"1 7og3,
Age: I~
College/Sch ool: _<;.&. . T ~~ ~~
Start time. \ 2. \ 7
I J
ECEnigma
A sneak peak .
into the research @ECE-IISc
1. Coins and b
Th a lances
e puzzle requires to .
experiment . design the best possibl .
experime s to identif'j the defective coin with e scheme w1ll1 n sequc11c0 of wc1gl1111u
side B nt '-:1th a physical balance gives o least numb01 of we1gh1ngs. I c1ch wo1ghing
and side A< side B A ne of the three outruts s1do A side 8 s1do A'-
· . In essence· the
defective c om sequence
pr bl . such we·19 h ing cxpernnenls sl1ou lcl lend 'us to th o
of
se~uence of outputs in ea~h expe~ em is to identify the defective coin mc1l<111g uso of tll 0
T his relat es t o a classical co . . of we1gh1ng wi·111 minimum numbo1 of cxpe1imonts
nment
minim um Iength for either mmunicatIon
st problem o f encoding· symbols with codcwo1ds of·
communication is called dat orage or transm1ss1on of info1 motion 1 his problem in
by th e Sh annon entropy th a compression
t b . source co d.ing . D ala compression is govemocf
or
h ere can be modeled a, e IimI elow which a so urce canno t be compressed. The puzz le
. s a source compression bl
mInImum number of we· h' pro em where th e entropy provid es th e
19 Ings needed
2 · Confused traveller
In this puzzle the traveller is needed to . . . .
The kiosks provide logical outputs to his mak~ a binary dec1s1on of choosing the right path .
these outputs are reliable He h t queries. However he may not be c:iware of which of
path he needs to take Th . as o come up with a right logical question to determine th e
. is is equ ivalent to des1gn1ng a logic circuit or comin u with a
Boo lean function based on the funct1onal1t1 es of th e kio sks provided Th1·s ·is ll1 g pd I .
r' · I f d. · I · · · e un e1 y1ng
P IncIp e o 1gIta logi c design which is extensively used in VLSI chips.
n u m be rs such th it ti~ :- 11 11 s ance of "parti a l soi tin g" wh ere it is requir ed to arran ge the 25
e ,,,g 1est th ree num be . • d .
ros t o f th e numb ,.,r
' · rs c1ppear In escen d1ng order at the top and the
•5
-.. s arc not relc v::i' nt · The re 1 d ..
com pw e m ore ti1 r.. nn a d1t1on al constraint th at it is not possi ble to
s
c1n o numb et s 'c1 t Onee. upp ose th e above opera tion needs to be
p e rrorm eci by . . , .
1
a og ,c cIrc uIt · Avo,l 'abl e comp on ent rs •
a s l a single ' co mparator" which takes 5
numb e rs · •
rnpu and outpu ts th e n um b e,.s sorte d in desce nding order. Every comp arato r
co s ts Rs C and . .
is of interest to desig n an
a l{lor,t l th r ~q~ur cs energ y of E joules per co mpari son . It •
:., im at m rnIrnIz cs th o· t0 taI cost and total energy consu mptio n of the circui t. If you
so 1ved th e p uzz le, you have done just th at!
8. A line of ants
intuiti ve that the numb er of ants on the sc3le
F rom a firs t obse rvatio n of the puzzle, it is
, as some of them shoul d fall off over the
d ecrea ses no matte r what , as time progr esses
e d ge. F urthe r, notic e that if supp ose there are
25 ants at prese nt, it does not matte r how t he
were orient ed . Proce sses in which the past is
re m a ining 25 fell off the sca le nor how they
t~rrned a~ Mark ov proce sses. _For e\.am ple,
ind ep e nden t of the future given the prese nt are
chain where in your next state will depe nd t.) O
th e s nake s and /adde rs game is a Mark ov
you reach ed there . We often mode l c ert~1":
wh e re you are at prese nt irresp ective of how
ge and queui n~ theor y as MJrh.ov, c,h.:i11: s ,, no
sy s te m s in comm unica tion netwo rks, data stora
of funda ment nl intere st. Analogou::-1\ . ht.re \\E'
th e lo ng-te rm evo lution of such proce sses are
ants to fall off the sc31e r.e the 10119 te1111
are int e reste d in how long it takes for all the
be havio ur of th e ants on the scale .
1. Of scales and weights
You are given a physical balance and 12 identical looking coins out of which exactly 1 is
defective i.e.it is lighter or heavier than the other normal coins. You don't know whether it is
heavier or lighter. What is the minimum number of weighings you need to determine the
defective coin?
~ rP /X O,
/.} 11 f 4 1' / X0 1
ox 0
f}
I' {;- l .
I Q
~!
~
-i_v'~.)
V t
\\
~
r~, ~
"
l > a '1 \,.
>----> \ i
LJ
(; I
0
,, 6 \ '
~
\
V
T' ' 1 cr
2.
Confu sed travel ler ✓
A travell er comes at a fork on the road. He doesn 't know
which path to take to reach his
destin ation . There are two kiosks (A and B) on the roadsid
e each of which when asked a
questi on give directions at the cost of a Rupee . The travelle
r was warned that one of the
kiosks w as faulty and always gives the wrong answer. But
he doesn 't know which is the
faulty one. Moreo ver the travell er has only 1 Rupee : What questio
n does he need to ask and
to which kiosk so that he can find the correct path to his destina
tion?
~
I ,..,,,-j,,, ) (
J Jv)/ .Jbr ,
i
\
4. Of blood and wine
The King of a small country invites 1000 senators to his annual party. As a tradition,
each senator brings the King a bottle of wine. Soon after, the Queen discovers that
one of the senators is trying to assassinate the King by giving him a bottle of
poisoned wine . Unfortunately, they do not know which senator, nor which bottle of
wine is poisoned , and the poison is completely indiscernible. However, the King has
10 prisoners he plans to execute. He decides to use them as taste testers to
determine which bottle of wine contains the poison. The poison when taken has no
effect on the prisoner until exactly 24 hours later when the infected prisoner suddenly
dies. The King needs to determine which bottle of wine is poisoned by tomorrow so
that the festivities can continue as planned. Hence he only has time for one round of
testing. How can the King administer the wine to the prisoners to ensure that 24
hours from now he is guaranteed to have found the poisoned wine bottle?
5. Equestrian canter
It is needed to determine the fastest three horses among 25 horses. At a single time, only 5
horses can be raced together. You are standing at the finish line and do not hnve c1ny device
to measure time . You can only see which horse came first, second etc. What 1s the 1ninimu111
number of races you need to determine the fastest three? (Assume t11ere are no ties)
uu
,J (
7
.{
1
,,
I•
1l
1
IY
) ,-
I ..) l
~J s
2
\
~fx5
-t
'>
t 2111,;,k
5
'll
1
1/J + t
~
>
i. 1 l
s~3 -...-
..., of ,.,. . ~
t II r.P-
-I- ~
c\ ,-\. I,..,~
4 ~
'/
l. r 4 .... I
,r
't
b )
'
\/ "
\,
t"
'I>
6 - Pirates of the
Caribbean
1 OO
pirate s aboard a ship need to divide a treasure of 100
gold coins. The eldest pirate
propo ses an allotm ent of the 100 coins and if it is
agreeable to 50% or more of the
pirate s(inclu ding the eldest one) , then the division is accept
ed. Otherwise the eldest pirate is
throw n overboard the ship and the process repeats with
the second eldest pirate proposing a
schem e and this contin ues . If you are the eldest pirate,
what would be the division of the 100
gold coins you would propose to maximize your portion
of the treasure at the same time not
gettin g yours elf killed .
N /< Pf
'v
\ ,\ \ 'v \I
.,
7. I hu 11lt in1.1l1) 1 .11 d h h k
IWll 11i.1qll i.111i, , /\ ,IIHI I\ , fH 11lu1111 .t lilt k Wi lli ,I t, l11lllh 1d d111:k o l t'. ,11tl·, , 1nko1• i
lt'llh>\i<·d \ ,1•,k•, ,1 1111 1111l1t 11 1il lilt) i111dh 1 11 c11 lu :wlt wl l1 vu t:, 11d•, 1d 1, 111drn11 l1rn11 lllu
d1 1 t k I ll1 1 ,llltll1 11111 1 1111 11nlH 1 1 p,1n:,11 : , !11t 1 l1 v1 1 1 i11d ~, lu /\, wllo tlXrn 11i11u:, IIH )lll , ,111d
ll.111th 0111 1 h,1t k /\ IIH 111 .111,H1u1 1n 1l1t 1 11 1111.1111il1u 101 11 (' t11d :: i11 t; u111 u w,,y .11Hl pl.1c1ii,
ll11'n1 l,H'l' dt)WI\ , 111 11 lll'<ll pill' I\ , wllti lh 1:1 111 11 w1l1111:,rn 1d ll1t i:.1i p1tw1 iucl111 ~r:, 1110 11
1'lll1 1 1t; tl1v 1u1)111 , lnul\t; -1t tin• l1H11 11. 11d ~:, ,111d d l1 (1 •1n1i1u 1u tilt! nii:u1111u l1llli G,11d, li uld
by \Ill' .1ud11 11w1 1 1m1 1\\l1t 11 I lt1w i:; lllki 1111'1\ d1l11t 1 ?
1
NnlL.' l lw 1)1) \y 1~t)l1\t\l lll1i rnl11 H1 lil'lw1 1u 11 /\ i11Hl 111n v1.1 ll1 u ,11rrn1ur• 11H 11! ol !11 <' fo ur
1
l', \ld g I lh'll' m Ill) lllH~lHh 1 d ti fH'l 'l'II 01 1l.111d :, iu1111IH ()I' I SI ,. 11 0 1)1 111· () I lll dll<t•d
c,11d~. no du1 1 ii\ \lw 1)1111 11t,,lin11 ul 1111 1 pil1 1 nl lour c11111!, ...
8. A line of ants
SO ants are put randomly on a (1 D)meter scale with individual orientations either to the left or
the right independently. They start moving forward at a velocity of 1cm/s. When any two ants
collide both of them reverse their direction . On reaching the ends of the scale i. e. either O or
100 they fall off the scale. What is the maximum time you need to wait for all the ants to fall
off"
9. Ciphers and Secrecy
Decipher the following to obtain clues for some of the questions above. The ciphers are
explained in the next sheet.
1. Decipher the ciphers applied on the quoted letters.
• Hint for the 'EHMBRDTX' puzzle: (Playfair cipher, key : OPENDAY)
• You must •xWF\JYMCYKYATWYSHWEOYTJ' to get the solution. (Vigenere
cipher, key: ECEDEPT)
~ LI 5 &. l
e.. y
,-\ ~
-N R_. p
A,
t 6 r N
€,.
,...
o I
5
"',-.J l
e,
7
• ~
1-J
rvt6 Rv
j
pl- i<r:t Tl 5 Z- 0 p ~ ,-J 'v
A ¥ B C. p 5
(s H J:. K L
K
/14 ~ f'- 5
-v Iv w ~ 1Z ~
-
,-
L-
f"\
N
0
t'
~
Description of the ciphers
1. Caesar cipher
1
It is • mono-~1lph.:ib0t1c cipher wherein each letter of tho plainteyt is substituted by
c\110lbL~, lcttc, lo for rn lhc ciphertext. The subs titution is by shifting the plaintext letter by a
c01t<11n fixed number· to bt . ti . . . .
o ain 1e crpherlext. For example, rf the shift rs 2, the letter A 1s
rep, 8Scntcd by C, B by D and so on .
2. Playfair cipher
th
In is scheme, pairs of letters are encrypted, instead of single letters as in the case of
s st
rrnple sub itution cipher. Initially a key table is created. The key table is a 5x5 grid of
th
ctl~habets at acts as the key for encrypting the plaintext. Each of the 25 alphabets must be
unique and one letter of the alphabet (usually J) is omitted from the table as we need only 25
alphabets instead of 26. The sender and the receiver decide on a particular key, say
'TUTORIALS'. In a key table, the first characters (going left to right) in the table is the
phrase , excluding the duplicate letters. The rest of the table will be filled with the remaining
letters of the alphabet, in natural order. The key table works out to be -
T u 0 R I
A L s B C
D E F G H
K M N p Q
V w X y z
• First, a plaintext message is split into pairs of two letters. If there is an odd number of
fetters, a Z is added to the last letter. Let us say we want to encrypt the message
'hide money". It will be written as -
• HI DE MO NE YZ
If both the lett ers are in the same column , take the letter below each one (going back
to the top 1f nt the bottom) Example HI > QC
• If botll letters me ,n the same row, take the letter to the nght of each one (going back
to the left rf nt t11o fnr t11est right) Therefore DE ► EF
• If noit11t~r of the p1 cccdrng two rules rn e tru e, form a rectangle with the two letters ond
!Ok(-> 11,11 lotter s on tl1e 11011zontc1I opposite corner of the rectangle. Hence \\e haV"~
MO ,NU
• u..,1 ,,g tht"•sc• 11.1les, the result of tile l'nc.rvpt1on of 'h1cle nwney' \\Ith tho key of
tuw11nl5' would htl - QC n- zv
NU Ml~
o, cn1t trng m, I 1n-,f 111 c1pll1 r 1<1 ,s sl mplt 1s dc rno tho s ,mo procc~.-; 11, ft'•\'er~o Receiver
ha Ult OITlt kt y oncl C Ill CfOl\l(l If IU 1111 0 koy t ,tito, 111d th 11 t l elCf) pt my nies<::nges mode
u 1119 llmt koy
3. Viuomno c.ipt,or
This SCh ef'Y'e of c 1pncr
' - uses a text st .
shifts on +he Pa ntext ring as a re, which is then used for doing a number of
• Tre sender ard th .
. e receiver decide on a key. Say POINT' is the key. Numeric
representation of this i,- , · ,
r b e'/ IS 16 15 9 14 20 (The natural mapping of letters in the
:•P a et to numbers from 1 to 26).
.
• re sender Nants t 0 .
encrypt the message say 'attack from south east'. He wi ll
~h,.rarge pla·ntext and numeric rey as follows and shifts each plaintext alphabet by
• e nulT'ber Nritten b I
e ow 1t to create ciph ert ex t ass hown be Iow.
a t J
t a C k f I
r 0 m s 0 u t h e a s t
i6 15 9 I 14 20 16 15 9 14 20 16 15 9 14 20 16 15 9 14
Q I cio w A u A C p
G I D D H B u B H
• For decryption the · . . .
· receiver uses the same key and shi fts received c1phertext 1n
reverse order to obtain the plaintext
Q I C 0 w A u A C G I D D H B u p B H
16 15 9 14 20 16 15 9 14 20 16 15 9 14 20 16 15 9 14
a t t a C k f r 0 m s 0 u t h e a s t
4. Transposition cipher
It is another type of cipher where th e letters in the plaintext are rearranged to create the
ciphertext. The plaintext is written horizontally with a certain alphabet width . Then the
ciphertext is read vertically as shown. For example, the plaintext is "golden statue is in
eleventh cave". We arrange thi s text horizontally in table with number of columns equal to
key value.
g 0 d e
n s t a t
u e s
n e e V
e n t h C
a V e
The ciphertext is obtained by reading columns vertically downward from first to last column .
The ciphertext is 'gnuneaoseenvltiltedasehetivc'. To decrypt, the receiver prepares similar
table. The number of columns is equal to key number. The number of rows is obtained by
dividing number of total ciphertext alphabets by key value and rounding of the quotient to
next integer value. The receiver then writes the received ciphertext vertically down and from
left to right column . To obtain the text, he reads horizontally left to right and from top to
bottom row.