Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

The number of diagonals can be drawn in a hexagon is ______(a) 9(b) 32(c) 16(d) 21I have been asked this question in an online interview.My question is taken from Counting in portion Counting of Discrete Mathematics

Answer»

The correct option is (a) 9

Easiest EXPLANATION: A hexagon has 6 sides. We obtain the diagonals by JOINING the vertices in pairs.

Total number of sides and diagonals = ^6C2 = \(\frac{6 * 5}{2 * 1}\) = 5×3 = 15. This INCLUDES its 6 sides ALSO. So, Diagonals = 15 – 6 = 9. Hence, the number of diagonals is 9.

102.

How many substrings (of all lengths inclusive) can be formed from a character string of length 8? (Assume all characters to be distinct)(a) 14(b) 21(c) 54(d) 37This question was posed to me by my college director while I was bunking the class.My query is from Counting in division Counting of Discrete Mathematics

Answer»

Correct option is (d) 37

The explanation: Let’s CONSIDER the given STRING is CLEAN, so set of string of length 1 = {C,L,E,A,N} ; cardinality of set = 5 set of string of length 2 = {CL,EE,EA,NN}, set of string of length 3 = {CLE,LEE,EAN}, set of strings of length 4 = {CLEN,LEAN}, set of strings of length 5 = {CLEAN} and set of string of length 0 = {} and we cannot have any substring of length 6 as given string has only 5 length. So total no of SUBSTRINGS are possible = 0 length substring + 1 length substring + 2 length substrings +3 length substrings + 4 length substrings + 5 length substrings = 1 + 5 + 4 + 3 + 2 + 1 = 16 means for 1 length string to n length substrings it will sum of the n natural no from 1 to n.

so 1+2+3+…+n = \(\FRAC{n(n+1)}{2}\) so total no substrings possible = 0 length strings + \(\frac{n(n+1)}{2}\) = 1+ \([\frac{n(n+1)}{2}]\) so total no of substrings possible in n length string (All length inclusive )= 1 + \([\frac{n(n+1)}{2}] = \frac{8(8+1)}{2}\) = 37.

103.

A bag contains 25 balls such as 10 balls are red, 7 are white and 8 are blue. What is the minimum number of balls that must be picked up from the bag blindfolded (without replacing any of it) to be assured of picking at least one ball of each colour?(a) 10(b) 18(c) 63(d) 35I got this question in exam.My question comes from Counting topic in chapter Counting of Discrete Mathematics

Answer»

Right answer is (b) 18

The BEST I can explain: Consider three buckets red, WHITE and blue and we WANT the total number of balls such that each bucket contain at least one ball. Now consider the state of picking up a ball without replacement : (normally you consider the worst CASE scenario in these cases) Starting 10 balls all are red and thus goes to bucket NAME Red. Now again picking up the ball gives 7 balls which are of same colour and put all of them in a bucket named White. The next pick will definitely be of different colour thus: we picked 10 + 7 + 1 = 18.

104.

In how many ways can 8 different dolls be packed in 5 identical gift boxes such that no box is empty if any of the boxes hold all of the toys?(a) 2351(b) 365(c) 2740(d) 1260This question was posed to me during an interview.The origin of the question is Counting topic in division Counting of Discrete Mathematics

Answer»

The correct option is (d) 1260

For explanation: Dolls are different but the boxes are identical. If none of the boxes is to remain empty, then we can pack the dolls in one of the FOLLOWING ways:

Case i. 2, 2, 2, 1, 1

Case II. 3, 3, 1, 1

Case i: Number of ways of achieving the first option 2, 2, 2, 1, 1. Two dolls out of the 8 can be selected in ^8C2 ways, another 2 out of the remaining 6 can be selected in ^6C2 ways, another 2 out of the remaining 4 can be selected in ^4C2 ways and the last two dolls can be selected in ^1C1 ways each. However, as the boxes are identical, the two different ways of selecting which box holds the first two dolls and which one holds the second set of two dolls will look the same. Hence, we need to divide the result by 2. Therefore, TOTAL number of ways of achieving the 2, 2, 2, 1, 1 is = (^8C2 * ^6C2 * ^4C2* ^1C1* ^1C1) / 2 = 1260.

105.

During a month with 30 days, a cricket team plays at least one game a day, but no more than 45 games. There must be a period of some number of consecutive days during which the team must play exactly ______ number of games.(a) 17(b) 46(c) 124(d) 24I had been asked this question in examination.I'm obligated to ask this question of Counting topic in portion Counting of Discrete Mathematics

Answer»

Correct answer is (d) 24

To elaborate: Let a1 be the number of games played until day 1, and so on, AI be the no games played until i. Consider a sequence like a1,a2,…a30where 1≤ai≤45, ∀ai. Add 14 to each element of the sequence we get a new sequence a1+14, a2+14, … A30+14where, 15 ≤ ai+14 ≤ 59, ∀ai. Now we have two sequences 1. a1, a2, …, a30 and 2. a1+14, a2+14, …, a30+14. having 60 elements in total with each elements taking a value ≤ 59. So according to pigeon hole principle, there must be at LEAST two elements taking the same value ≤59 i.e., ai = aj + 14 for some i and j. THEREFORE, there exists at least a period such as aj to ai, in which 14 matches are played.

106.

When four coins are tossed simultaneously, in _______ number of the outcomes at most two of the coins will turn up as heads.(a) 17(b) 28(c) 11(d) 43I got this question in class test.My question is taken from Counting in division Counting of Discrete Mathematics

Answer»

The correct CHOICE is (c) 11

The explanation is: The question REQUIRES you to find number of the outcomes in which at most 2 coins TURN up as heads i.e., 0 coins turn heads or 1 coin turns head or 2 coins turn heads. The number of outcomes in which 0 coins turn heads is ^4C0 = 1 outcome. The number of outcomes in which 1 coin turns head is ^4C1 = 6 outcomes. The number of outcomes in which 2 coins turn heads is,

^4C2 = 15 outcomes. Therefore, total number of outcomes = 1 + 4 + 6 = 11 outcomes.

107.

How many numbers must be selected from the set {1, 2, 3, 4} to guarantee that at least one pair of these numbers add up to 7?(a) 14(b) 5(c) 9(d) 24This question was posed to me in a national level competition.The query is from Counting topic in chapter Counting of Discrete Mathematics

Answer»

Right option is (b) 5

To elaborate: With 2 elements pairs which give sum as 7 = {(1,6), (2,5), (3,4), (4,3)}. So choosing 1 ELEMENT from each group = 4 elements (in worst case 4 elements will be either {1,2,3,4} or {6,5,4,3}). Now using pigeonhole principle = we NEED to choose 1 more element so that sum will definitely be 7. So NUMBER of elements must be 4 + 1 = 5.

108.

In a group of 267 people how many friends are there who have an identical number of friends in that group?(a) 266(b) 2(c) 138(d) 202The question was posed to me during an internship interview.The origin of the question is Counting topic in section Counting of Discrete Mathematics

Answer»

Correct choice is (b) 2

The best explanation: Suppose each of the 267 members of the group has at least 1 friend. In this case, each of the 267 members of the group will have 1 to 267-1=266 friends. Now, consider the numbers from 1 to n-1 as holes and the n members as pigeons. Since there is n-1 holes and n pigeons there MUST exist a hole which must CONTAIN more than one pigeon. That means there must exist a number from 1 to n-1 which would contain more than 1 member. So, in a group of n members there must exist at least TWO persons having equal number of friends. A similar case occurs when there exist a PERSON having no friends.

109.

The least number of computers required to connect 10 computers to 5 routers to guarantee 5 computers can directly access 5 routers is ______(a) 74(b) 104(c) 30(d) 67The question was asked in semester exam.My question comes from Counting topic in section Counting of Discrete Mathematics

Answer» RIGHT answer is (c) 30

The explanation: Since each 5 COMPUTER need DIRECTLY CONNECTED with each router. So 25 connections + now remaining 5 computer, each connected to 5 different routers, so 5connections = 30 connections. Hence,
110.

A head boy, two deputy head boys, a head girl and 3 deputy head girls must be chosen out of a student council consisting of 14 girls and 16 boys. In how many ways can they are chosen?(a) 98072(b) 27384(c) 36428(d) 44389I had been asked this question in an international level competition.My doubt is from Fundamental Principle of Counting in section Counting of Discrete Mathematics

Answer»

Right option is (B) 27384

Explanation: There are 16 × 15 × 14 + 14 × 13 × 12 × 11 = 27384 WAYS to choose from a student council.

111.

A drawer contains 12 red and 12 blue socks, all unmatched. A person takes socks out at random in the dark. How many socks must he take out to be sure that he has at least two blue socks?(a) 18(b) 35(c) 28(d) 14This question was addressed to me in a national level competition.The query is from Counting in division Counting of Discrete Mathematics

Answer»

The correct option is (d) 14

For EXPLANATION I WOULD say: Given 12 RED and 12 blue socks so, in order to take out at least 2 blue socks, first we need to take out 12 shocks (which might end up red in worst case) and then take out 2 socks (which would be definitely blue). THUS we need to take out total 14 socks.

112.

Amit must choose a seven-digit PIN number and each digit can be chosen from 0 to 9. How many different possible PIN numbers can Amit choose?(a) 10000000(b) 9900000(c) 67285000(d) 39654900This question was addressed to me during a job interview.This interesting question is from Fundamental Principle of Counting topic in portion Counting of Discrete Mathematics

Answer»

The correct answer is (a) 10000000

Best explanation: By the BASIC COUNTING principle, the TOTAL NUMBER of PIN numbers Amit can choose is 10 × 10 × 10 × 10 × 10 × 10 × 10 = 10,000000.

113.

The code for a safe is of the form PPPQQQQ where P is any number from 0 to 9 and Q represents the letters of the alphabet. How many codes are possible for each of the following cases? Note that the digits and letters of the alphabet can be repeated.(a) 874261140(b) 537856330(c) 549872700(d) 456976000The question was posed to me by my college professor while I was bunking the class.My enquiry is from Fundamental Principle of Counting in portion Counting of Discrete Mathematics

Answer»

The correct answer is (d) 456976000

To ELABORATE: 10^3 × 2^64 = 456976000 possible codes are FORMED for the SAFE with the alphanumeric digits.

114.

There are two different Geography books, five different Natural Sciences books, three different History books and four different Mathematics books on a shelf. In how many different ways can they be arranged if all the books of the same subjects stand together?(a) 353450(b) 638364(c) 829440(d) 768700I had been asked this question in semester exam.This intriguing question comes from Fundamental Principle of Counting topic in division Counting of Discrete Mathematics

Answer»

Right option is (c) 829440

Best explanation: There are FOUR GROUPS of BOOKS which can be arranged in 4! different ways. Among those books, two are Geography books, FIVE are Natural Sciences books, three are History books and four are Mathematics books. Therefore, there are 4! × 2! × 5! × 3! × 4! = 829440 ways to arrange the books.

115.

For her English literature course, Ruchika has to choose one novel to study from a list of ten, one poem from a list of fifteen and one short story from a list of seven. How many different choices does Rachel have?(a) 34900(b) 26500(c) 12000(d) 10500The question was posed to me during an interview for a job.Enquiry is from Fundamental Principle of Counting topic in section Counting of Discrete Mathematics

Answer»

Correct choice is (d) 10500

Best EXPLANATION: By the BASIC Counting Principle, the number of different choices is 10 × 15 × 7 = 10500.

116.

How many five-digit numbers can be made from the digits 1 to 7 if repetition is allowed?(a) 16807(b) 54629(c) 23467(d) 32354This question was addressed to me during an internship interview.My question is from Fundamental Principle of Counting in portion Counting of Discrete Mathematics

Answer»

Correct OPTION is (a) 16807

Easy EXPLANATION: 7^5 = 16807 ways of making the numbers consisting of five DIGITS if REPETITION is allowed.

117.

Neela has twelve different skirts, ten different tops, eight different pairs of shoes, three different necklaces and five different bracelets. In how many ways can Neela dress up?(a) 50057(b) 14400(c) 34870(d) 56732I have been asked this question in my homework.My enquiry is from Fundamental Principle of Counting topic in section Counting of Discrete Mathematics

Answer» CORRECT answer is (b) 14400

Explanation: By the BASIC counting principle, the number of different ways = 12 × 10 × 8 × 3 × 5 = 14400. Note that shoes come in pairs. So she must choose one pair of shoes from ten pairs, not one shoe from TWENTY.
118.

How many words with seven letters are there that start with a vowel and end with an A? Note that they don’t have to be real words and letters can be repeated.(a) 45087902(b) 64387659(c) 12765800(d) 59406880This question was posed to me in an interview for job.My query is from Fundamental Principle of Counting topic in division Counting of Discrete Mathematics

Answer»

Right option is (d) 59406880

Explanation: The first letter must be a vowel, so there are 5 choices. The second letter can be any one of 26, the THIRD letter can be any one of 26, the fourth letter can be any one of 26 and fifth and sixth letters can be any of 26 choices. The last letter must be an A, so there is only 1 CHOICE. By the basic COUNTING principle, the number of ‘words’ is 5 × 26 × 26 × 26 × 26 × 26 × 1 = 59406880.

119.

In a multiple-choice question paper of 15 questions, the answers can be A, B, C or D. The number of different ways of answering the question paper are ________(a) 65536 x 4^7(b) 194536 x 4^5(c) 23650 x 4^9(d) 11287435I have been asked this question in an interview for job.This intriguing question comes from Fundamental Principle of Counting in division Counting of Discrete Mathematics

Answer» CORRECT option is (a) 65536 x 4^7

The explanation is: There are 4^15 = 65536 x 4^7 DIFFERENT ways of ANSWERING the exam PAPER of 15 MCQs.
120.

How many even 4 digit whole numbers are there?(a) 1358(b) 7250(c) 4500(d) 3600The question was asked in an online quiz.This intriguing question comes from Fundamental Principle of Counting in division Counting of Discrete Mathematics

Answer»

Right option is (C) 4500

To elaborate: The thousands digit cannot be zero, so there are 9 choices. There are 10 possibilities for the hundreds digit and 10 possibilities for the tens digit. The units digit can be 0, 2, 4, 6 or 8, so there are 5 choices. By the basic counting principle, the NUMBER of EVEN five digit WHOLE numbers is 9 × 10 × 10 × 5 = 45,00.