5

Click here to load reader

Lec07-CS110 Computational Engineering

Embed Size (px)

DESCRIPTION

A keynote on Problem Solving using Computers

Citation preview

Page 1: Lec07-CS110 Computational Engineering

CS110: Models of Computing

Lecture 7V. Kamakoti

17th January 2008

Page 2: Lec07-CS110 Computational Engineering

• Revision• How to write binary numbers in order

quickly• Two’s complement arithmetic

Today’s Lecture Contents

Page 3: Lec07-CS110 Computational Engineering

Creative Exercise – 5The Celebrity problem

0 0 0 0 0 0 0 0

Celebrity is a person who is known to everyone butdoes not know anyone. To find a celebrity among “n”people by questioning them. You can ask only onetype of question. You can ask person X whether he

knows Y.

Page 4: Lec07-CS110 Computational Engineering

Creative Exercise – 5The Celebrity problem

0 0 0 0 0 0 0 0

n(n-1) is trivial solution. Can you do better than that?

Reduce the number of questions significantly.

Page 5: Lec07-CS110 Computational Engineering

Thank You