discrete math prob: Suppose you live at (7, 44) and you....

mooshupork34

Junior Member
Joined
Oct 29, 2006
Messages
72
I'm not sure how to approach this problem, so if anyone could help, I would be REALLY grateful!

Suppose you live at the point (7, 44) and you go to school at the point (2, 51). How many shortest paths are there between home and school?

There is a diner at (5, 48) and a pet shop at (3, 50). How many shortest paths are there from home to school that go past both the diner and the pet shop? And how many shortest paths go past neither the diner and the pet shop?

Thank you!
 
Without any constraints, it is likely that there is only one "shortest path". Are you on a rectangular grid and you must stay on the streets?

Think on the case where you live at (0,0) and you want to get to (1,1). There are two shortest paths. You can go to (1,0) first or first to (0,1). Both paths take two legs and there is none shorter.
 
Re: discrete math prob: Suppose you live at (7, 44) and you.

mooshupork34 said:
Suppose you live at the point (7, 44) and you go to school at the point (2, 51). How many shortest paths are there between home and school?
There is a diner at (5, 48) and a pet shop at (3, 50). How many shortest paths are there from home to school that go past both the diner and the pet shop? And how many shortest paths go past neither the diner and the pet shop?
You understand that there are several things we must assume.
We assume a ‘city block’ space, i.e. we go up/down & left/right never through.
By ‘shortest path’ we mean making steady process.

Thus, going from home to school you go 5 blocks to the left and 7 blocks up.
How many ways can you arrange 5-L’s and 7-U’s? \(\displaystyle \frac{{12!}}{{\left( {7!} \right)\left( {5!} \right)}}\)

To go to both the diner and pet shop:
From home to diner, 2-L’s & 4-U’s; from diner to pet shop, 2-L’s & 2-U’s; from pet shop to school, 1-L and 1-U. How many to arrange each of those? Multiply them together.
 
Thank you both for your help!

So this is what I got:

From the home to the diner, there are 15 paths.
Then from the diner to the pet shop, there are 6 paths.
And lastly, from the pet shop to the school, there are 2 paths.

I multiplied them together and got 180, the total number of paths that go past both the diner and the pet shop.

Then, I subtracted 180 from 792 (the total number of paths from home to school) to get 612, the number of paths that don't go past the diner or pet shop.

Does this sound correct?
 
mooshupork34 said:
Then, I subtracted 180 from 792 (the total number of paths from home to school) to get 612, the number of paths that don't go past the diner or pet shop. Does this sound correct?
No it is not correct. Use inclusion/exclusion principle.
If T is the total number from the first, then let P be the number passing through the pet shop, D be the number passing through the diner, lastly PD be the number passing through the pet shop and the diner.
So the number not passing through either is: T-P-D+PD.
 
pka said:
mooshupork34 said:
Then, I subtracted 180 from 792 (the total number of paths from home to school) to get 612, the number of paths that don't go past the diner or pet shop. Does this sound correct?
No it is not correct. Use inclusion/exclusion principle.
If T is the total number from the first, then let P be the number passing through the pet shop, D be the number passing through the diner, lastly PD be the number passing through the pet shop and the diner.
So the number not passing through either is: T-P-D+PD.

Sorry, I'm confused. I get the part about the equation - but how do I find the number of paths that just go past the pet shop or just go past the diner? Or did I already find that?
 
In my reply above: \(\displaystyle D = \frac{{6!}}{{\left( {2!} \right)\left( {4!} \right)}}\frac{{6!}}{{\left( {3!} \right)\left( {3!} \right)}}.\) That is number of paths from home to school by way of the diner. Any one of those may or may not go through the pet shop.
You must also do the same thing for the pet shop.
Remove both of these from the total. But we have removed some paths twice, namely those that include both the shop & diner. So add them back.
 
Thank you! I hope I did this right...

I calculated 6!/(2! 4!) * 6!/(3! 3!) and got 300, the number of paths from home to school through the diner.

To get the number of paths from home to school through the pet shop, I did:
10!/(4! 6!) * 2!/(1!1!) and got 420.

And earlier, I found that the number of paths that went past both the pet shop and diner was 180.

I did 792-420-300 + 180 and got 252 for a final answer.

Not sure if that's correct, though.
 
Hi mooshupork. The way in which you did it looks right, but I'm wondering if you added the numbers in the wrong order (for your final answer, that is)?
 
Top