Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 math problem
Index -> Off Topic
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HeavenAgain




PostPosted: Mon Jul 09, 2007 10:30 pm   Post subject: math problem

Ten people are to be seated at a rectangular table fro dinner. Tanya will sit at the head of the table. Henry must not sit beside either Wilson or Nancy. In how many ways can the people be seated for dinner?

can anyone show me the steps of solving this problem? Rolling Eyes
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Mon Jul 09, 2007 11:44 pm   Post subject: RE:math problem

Let's see....

Since Tanya is fixed... we could have 9! ways to arrange the rest, but we have certain restrictions.

We could attempt the following strategy: case of no restriction - case that fails the restriction criteria. That should give us the solution to the problem.

Case of no restriction (assuming tanya sits at the head) I believe is 9!.

Case that fails the restriction criteria is a bit tricky. Think of sets here.
1] Henry sitting near Wilson.
2] Henry sitting near Nancy.
We could add those two up, but then you have to realize that we would be counting a particular subset twice! That is Henry sitting near Wilson and Nancy.

Assuming Tanya sits at the head, then the case of Henry sitting near Wilson would result in:
2!(8!) ways of arrangement. We multiply by 2! Because Henry and Wilson could be arranged in 2! ways. (Henry first or Wilson first)
We have an 8! there because, well think of the number of seats remaining assuming we grouped two of them together: it's 8 seats!
Like consider the slots: T H W _ _ _ _ _ _ _. Here we grouped two of them together. We account for the arrangement of the individuals within that group of two with the 2!, but we account for them as 1, when arranging them with the rest.

The case where Henry is sitting near Nancy is the same 2!(8!) ways, similarly.

The case where Henry is sitting near both Nancy and Wilson would be 2!(7!) ways. Here we multiply by 2! because once again there are just 2! ways of arranging Henry, Wilson and Nancy such that Henry is in the centre of the two.


So our final solution would be: 9! - (2!8! + 2!8! - 2!7!) = whatever...

Anyway, that's what I think. I'm quite rusty on this though.
HeavenAgain




PostPosted: Tue Jul 10, 2007 10:14 pm   Post subject: RE:math problem

eh, nope thats not the answer?
the answer on the text its 201 600

and i think i solved it, equation is like this

9! - 4(8!)

why? i dont know.... lucky guess.....

but the logic is the same as yours, assuming Henry sitting at 2nd seat, theres 8! ways for Nancy to sit next to him, and another 8! for Wilson sitting next to him. that is only for 2nd seat

and that only takes care of 2nd seat, and there is the last seat, and its the same thing as the first
so therefore you mutilply by total of 4
and subtract it from the total (without restriction)

please correct me if im wrong!!
Cervantes




PostPosted: Tue Jul 10, 2007 11:13 pm   Post subject: RE:math problem

But that doesn't take into account the times when Henry is sitting somewhere further away from Tanya and when either Nancy or Wilson are next to him. The answer should be less than 201,600, shouldn't it?
rizzix




PostPosted: Wed Jul 11, 2007 1:06 am   Post subject: RE:math problem

9! - 4(8!) you say? It appears to me (following my own reasoning: above) that they do not subtract the case that they count twice. It's either that or I did something terribly wrong.
HeavenAgain




PostPosted: Wed Jul 11, 2007 4:55 am   Post subject: RE:math problem

Cervantes @ Tue Jul 10, 2007 11:13 pm wrote:
But that doesn't take into account the times when Henry is sitting somewhere further away from Tanya and when either Nancy or Wilson are next to him. The answer should be less than 201,600, shouldn't it?

it is counted, in the 9!, total without any restrictions

because i think you look at herny sitting beside Nancy or Wilson as 1 object, so it becomes 8 and do that for 4 times?
4 times, because 2 times for Nancy or Wilson and Henry sitting at the left or Tanya, and 2 times more for sitting on the right of Tanya

wrong?
Cervantes




PostPosted: Wed Jul 11, 2007 10:11 am   Post subject: RE:math problem

No...

The 9! gives you the number of ways of arranging everyone except for Tanya around the table. It doesn't take into account the restrictions for henry and nancy and wilson. What I was saying is that 9! - 4(8!) is too much because that calculates the number of ways of arranging the table with tanya at the head but without henry at either side of tanya with wilson or nancy next to henry. But there are so many other ways that nancy or wilson could be next to henry.

It's weird that the textbook says 201,600.

I agree with rizzix's answer. I've verified it by getting the same number with another approach--count only the ways that work.


Place Tanya at the head of the table. Let x be the number of valid ways of arranging the table with henry sitting at seat 1 (assuming Tanya is seat 0 and it goes up to seat 9). Let y be the number of valid ways of arranging the table with henry sitting in at seat 2.

Calculate x: There are 7 seats left in which nancy and wilson can safely sit, so let's place them first. 7P2 = 42 ways to place them. Fill in the rest of the attendees into the 6 seats remaining. 6! = 720 ways to arrange them. x = 42* 720 = 30,240

Calculate y: There are 6 seats left that are safe for nancy and wilson. Place them: There are 6P2 = 30 ways of arranging them safely. Place the rest of the attendees into the 6 seats remaining: 6! = 720. y = 30 * 720 = 21,600.

Then sum up for any position of Henry. He could sit at seat 1 or seat 9, and these situations are identical. So that's 2*x. Then he could sit at any seat 2 through 8, and these are all identical. 7*y.

So, final answer is 2*x + 7*y = 2*30,240 + 7*21,600 = 211,680.

Oh yeah, and please ignore my previous comment about the answer being less than 201,600. Razz
Display posts from previous:   
   Index -> Off Topic
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: