IF YOU LIKE THIS BLOG AND WANT MORE POSTS TELL ME IN THE COMMENTS! I HAVE A LOT OF PUZZLES AND TECH CONCEPTS TO SHARE. ESPECIALLY CONCEPTS CONCERNING C/ C++. IF YOU WANT ANSWERS TO ANY QUESTIONS, PLEASE E-MAIL ME info.edu.programming@gmail.com

I'LL CREATE POSTS THAT SPECIFICALLY CLARIFIES YOUR DOUBTS AND HELPS YOU IF YOU ASK FOR IT.

Pages

Sunday, 29 May 2016


THIS BLOG'S FIRST PUZZLE




There are 5 people. A, B, C, D and E. All five of them are to be seated in a linearly placed chairs. Each of them have specific preferences with sitting near each other. A wishes to sit next to C and B wishes to sit next to D. E prefers to sit on the right corner and D does not wish to sit besides A. How many arrangements are possible? list out the solution(s).


Solution: 

ACBDE,CABDE, BDCAE, DBCAE, DBACE, ACDBE. Number of possible solutions:6



We could arrive at this answer by looking at all the possible combinations under which we may arrange the seating of five people. But it is not literally necessary to check all possibilities, which comes to 5! combinations. Because, we are certain of rules like A sits near C, we can know that the solution should have A besides C. So rather than considering the elements separately, let's consider "pairs" of element.


So we have 2 pairs. AC and BD. C is always going to remain fixed at the rightmost end. So let's neglect it. There are two possible configurations for each of the pairs. AC can also be CA and BD can also be DB. Hence, total possibilities assuming we reorder each of the pair independently, we have $2\times2$. We got the number two because AC can be written in two ways: AC and CA and this also applies for BD. 
Now, this isn't over yet. The position of the pair also counts. Let X be the first pair (containing A and C) and let Y be the second pair. We can reorder them in two ways. XY and YX. So here again we have two possibilities. And each of these pairs have 2 possible orders. So we have, $2\times(2\times2)$ number of possibilities. But we are neglecting D's preference not to sit near A.


So, in each of these possibilities XY and YX, just one possibility where A is seated near D should be avoided. For each of these arrangements XY and YX we have, 2 undesirable seating allocations. Hence, the final answer would be: $8−2=6$

If you like this post and want more posts like this, tell me in the comments! I have a lot of puzzles and tech concepts to share.

1 comment:

  1. Hello, Let's start a conversation here on topics like C++, C and mathematics. Ask your doubts and let's start a conversation!

    ReplyDelete