PROGRAMMING METHODOLOGY
(Assignment - 1)

Due Date: 11 August 2010

A PDF Version is here.


Study the given problems. Generalize and then restrict the scope. Finally identify and enumerate cases.
Each carries 5 Marks.
  1. Given a number, find if it is divisible by (a) 11 or (b) 17.
  2. Given a 20x10 matrix A such that A(i,j) is any of the digits 0 - 9 chosen randomly, find if the current year 2010 is found in any row of A. In other words, there should be four consecutive cells in any row containing the digits '2', '0', '1' and '0' respectively.
  3. Given a list of 1000 numbers, each of 4 digits, find all sets of numbers that contain the same digits. For example, if the list contains 2010, 1002, 2001 and 1020 then they belong to the same set as they contain two 0s, one 1 and one 2. The program should find all such sets of numbers from the list.
  4. Given an English dictionary and a word, find all words in the dictionary that contain the given word. For example, if the given word is para, the program should return words such as separate, paragraph, parachute and comparative.
  5. Given a book, separate the book into words, and find how many words contain an apostrophe, i.e, the symbol ' that you find in words such as Venu's, it's etc.